* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #faf9f7;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --text-muted: #888;
    --border: #e5e5e5;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --false: #dc2626;
    --false-bg: #fef2f2;
    --misquote: #f59e0b;
    --misquote-bg: #fffbeb;
    --unverified: #6366f1;
    --unverified-bg: #eef2ff;
    --partial: #10b981;
    --partial-bg: #ecfdf5;
    --misattributed: #8b5cf6;
    --misattributed-bg: #f5f3ff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

header h1 .emoji {
    display: inline-block;
    transform: rotate(-10deg);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: var(--shadow);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg), 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.75rem;
    background: transparent;
    font-family: inherit;
}

#search-input::placeholder {
    color: var(--text-muted);
}

#search-btn {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#search-btn:hover {
    background: var(--accent-hover);
}

.hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

/* Results Section */
.results-section {
    margin-bottom: 2rem;
}

.result-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--border);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card.FALSE { border-left-color: var(--false); }
.result-card.MISQUOTE { border-left-color: var(--misquote); }
.result-card.UNVERIFIED { border-left-color: var(--unverified); }
.result-card.PARTIAL { border-left-color: var(--partial); }
.result-card.MISATTRIBUTED { border-left-color: var(--misattributed); }
.result-card.MISUNDERSTOOD { border-left-color: var(--misattributed); }

.quote-text {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.quote-text::before { content: '"'; }
.quote-text::after { content: '"'; }

.attributed-to {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.attributed-to::before { content: '— Attributed to '; }

.verdict-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.verdict-badge.FALSE { background: var(--false-bg); color: var(--false); }
.verdict-badge.MISQUOTE { background: var(--misquote-bg); color: var(--misquote); }
.verdict-badge.UNVERIFIED { background: var(--unverified-bg); color: var(--unverified); }
.verdict-badge.PARTIAL { background: var(--partial-bg); color: var(--partial); }
.verdict-badge.MISATTRIBUTED { background: var(--misattributed-bg); color: var(--misattributed); }
.verdict-badge.MISUNDERSTOOD { background: var(--misattributed-bg); color: var(--misattributed); }

.truth-section {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.truth-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.truth-section p {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.actual-source {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.actual-source strong {
    color: var(--text-primary);
}

.sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sources-list a {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 4px;
    transition: background 0.2s;
}

.sources-list a:hover {
    background: rgba(37, 99, 235, 0.1);
    text-decoration: underline;
}

/* Browse Section */
.browse-section {
    margin-bottom: 1.5rem;
}

.browse-section h2 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.verdict-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Quotes List */
.quotes-list {
    display: grid;
    gap: 1rem;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.no-results .emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    text-align: center;
}

.tip {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.resources {
    margin-bottom: 2rem;
}

.resources h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.resources ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.resources a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
}

.resources a:hover {
    text-decoration: underline;
}

.credit {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.credit a {
    color: var(--text-secondary);
    text-decoration: none;
}

.credit a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .quote-text {
        font-size: 1.1rem;
    }

    .verdict-filters {
        justify-content: center;
    }

    .resources ul {
        flex-direction: column;
        gap: 0.75rem;
    }
}
