/* ============================================
   CEREBRAS FACT CHECKER — SPLIT PANEL LAYOUT
   Dark app aesthetic, gold accents
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    --primary: #d4a853;
    --primary-light: #e8c878;
    --primary-dark: #b8922e;
    --primary-glow: rgba(212, 168, 83, 0.18);

    --success: #4ade80;
    --success-bg: rgba(74, 222, 128, 0.1);
    --success-border: rgba(74, 222, 128, 0.25);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.1);
    --danger-border: rgba(248, 113, 113, 0.25);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --warning-border: rgba(251, 191, 36, 0.25);

    /* Surfaces */
    --bg-app: #0a0c10;
    --bg-nav: #0d0f14;
    --bg-left: #0f1117;
    --bg-right: #0c0e13;
    --bg-card: rgba(20, 23, 32, 0.9);
    --bg-input: rgba(14, 16, 22, 0.95);
    --bg-pill: rgba(22, 25, 35, 0.8);
    --bg-chip: rgba(20, 23, 32, 0.7);

    /* Text */
    --text-primary: #e8e2d6;
    --text-secondary: #9a9384;
    --text-tertiary: #5c5650;
    --text-accent: #d4a853;

    /* Borders */
    --border-subtle: rgba(212, 168, 83, 0.06);
    --border-light: rgba(212, 168, 83, 0.12);
    --border-medium: rgba(212, 168, 83, 0.2);
    --border-focus: rgba(212, 168, 83, 0.45);

    /* Divider between panels */
    --panel-divider: rgba(212, 168, 83, 0.08);

    /* Shadows */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 24px rgba(212, 168, 83, 0.15);

    /* Radii */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;
    --r-pill: 999px;

    /* Transitions */
    --t-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --t-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --t-smooth: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    --t-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --nav-h: 56px;
    --left-w: 640px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* ============================================
   GOLD PARTICLE CANVAS
   ============================================ */
#goldCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   TITLE ANIMATION
   ============================================ */
.input-title {
    display: flex;
    align-items: baseline;
    gap: 0.35em;
    flex-wrap: wrap;
}

.title-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(18px);
    animation: titleWordIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.title-word:nth-child(1) {
    animation-delay: 0.1s;
}

.title-word:nth-child(2) {
    animation-delay: 0.28s;
}

.title-word.accent {
    background: linear-gradient(135deg,
            var(--primary-dark) 0%,
            var(--primary-light) 40%,
            var(--primary) 60%,
            var(--primary-light) 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation:
        titleWordIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.28s forwards,
        goldShimmer 3.5s ease-in-out 1s infinite;
}

@keyframes titleWordIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes goldShimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Blinking cursor after the title */
.title-cursor {
    display: inline-block;
    width: 2.5px;
    height: 1.15em;
    background: var(--primary);
    border-radius: 2px;
    margin-left: 2px;
    vertical-align: middle;
    opacity: 0;
    animation:
        titleWordIn 0.3s ease 0.7s forwards,
        cursorBlink 1.1s ease-in-out 1s infinite;
    box-shadow: 0 0 8px rgba(212, 168, 83, 0.6);
}

@keyframes cursorBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}


/* ============================================
   TOP PROGRESS BAR
   ============================================ */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
    background-size: 200% 100%;
    z-index: 99999;
    transition: width 0.4s ease;
    animation: shimmer 1.5s linear infinite;
    box-shadow: 0 0 10px rgba(212, 168, 83, 0.5);
}

.progress-bar.hidden {
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   APP SHELL
   ============================================ */
.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.nav-right {
    justify-content: flex-end;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    display: flex;
    align-items: center;
    transition: transform var(--t-bounce);
}

.nav-brand:hover .logo-icon {
    transform: rotate(12deg) scale(1.1);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.brand-sub {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}

.brand-highlight {
    background: linear-gradient(to right,
            var(--primary) 0%,
            #fff 50%,
            var(--primary) 100%);
    background-size: 200% auto;
    color: var(--primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
    display: inline-block;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Tabs */
.nav-tab {
    padding: 6px 18px;
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: color var(--t-fast);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    /* align with nav border */
}

.nav-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
    transition: width var(--t-normal);
}

.nav-tab:hover {
    color: var(--text-primary);
}

.nav-tab.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-tab.active::after {
    width: 70%;
}

/* Status */
.nav-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-tertiary);
    transition: background var(--t-normal);
}

.status-dot.connected {
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.error {
    background: var(--danger);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(74, 222, 128, 0);
    }
}

/* Usage Badge */
#usageBadge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--r-pill);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* ============================================
   SPLIT LAYOUT
   ============================================ */
.split-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - var(--nav-h));
}

/* ============================================
   LEFT PANEL
   ============================================ */
.panel-left {
    width: var(--left-w);
    flex-shrink: 0;
    background: linear-gradient(180deg,
            rgba(14, 16, 24, 1) 0%,
            rgba(12, 14, 20, 1) 60%,
            rgba(10, 12, 18, 1) 100%);
    border-right: 1px solid var(--panel-divider);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 168, 83, 0.15) transparent;
    box-shadow: inset -1px 0 0 rgba(212, 168, 83, 0.06), 2px 0 24px rgba(0, 0, 0, 0.5);
}

/* Gold accent bar along the left edge */
.panel-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(212, 168, 83, 0.5) 20%,
            rgba(232, 200, 120, 0.85) 50%,
            rgba(212, 168, 83, 0.5) 80%,
            transparent 100%);
    z-index: 2;
    pointer-events: none;
}

/* Ambient radial glow */
.panel-left::after {
    content: '';
    position: absolute;
    top: 80px;
    left: -80px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.panel-left::-webkit-scrollbar {
    width: 4px;
}

.panel-left::-webkit-scrollbar-track {
    background: transparent;
}

.panel-left::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 83, 0.15);
    border-radius: 4px;
}

/* Particles */
#particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary), transparent);
    animation: particleFloat linear infinite;
    will-change: transform;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100%) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-20px) rotate(360deg);
        opacity: 0;
    }
}

/* Input Section */
.input-section {
    padding: 32px 32px 28px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.input-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}

/* Decorative gold underline accent */
.input-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 2px;
}

.input-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    line-height: 1.2;
}

.input-subtitle {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    line-height: 1.55;
    max-width: 360px;
}

/* Input Group */
.input-group {
    margin-bottom: 18px;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.field-label::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.6;
    flex-shrink: 0;
}

textarea {
    width: 100%;
    border: 1.5px solid var(--border-light);
    border-radius: var(--r-lg);
    padding: 14px 40px 14px 16px;
    /* Right padding for clear button */
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: rgba(8, 10, 16, 0.85);
    resize: vertical;
    transition: all var(--t-normal);
    line-height: 1.6;
    outline: none;
    min-height: 110px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.25);
}

.textarea-wrapper {
    position: relative;
    width: 100%;
}

.clear-input-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    /* Hidden by default */
    transform: scale(0.9);
}

.clear-input-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.clear-input-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    /* Reddish tint */
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1),
        inset 0 2px 10px rgba(0, 0, 0, 0.2);
    background: rgba(6, 8, 14, 0.95);
}

textarea::placeholder {
    color: var(--text-tertiary);
    font-style: italic;
}

/* Controls Row */
.controls-row {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.control-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    height: 38px;
    background: rgba(16, 18, 28, 0.9);
    border: 1px solid var(--border-light);
    border-radius: var(--r-pill);
    flex: 1;
    min-width: 160px;
    transition: all var(--t-normal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 5;
    cursor: pointer;
}

/* ... existing hover styles ... */

.control-pill:hover {
    border-color: rgba(212, 168, 83, 0.28);
    background: rgba(20, 23, 34, 0.95);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(212, 168, 83, 0.06);
}

.control-pill svg {
    color: var(--primary);
    opacity: 0.65;
    flex-shrink: 0;
}

.control-pill label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    cursor: pointer;
    pointer-events: none;
}

/* Custom Select Display */
.select-display {
    flex: 1;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.select-display::after {
    display: none;
}

.dropdown-arrow {
    color: var(--primary);
    width: 10px;
    height: 10px;
    opacity: 0.8;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0;
    display: block;
}

.control-pill.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.select-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 100%;
    background: #14161f;
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: var(--r-md);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    pointer-events: none;
}

.select-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Options */
.select-option {
    padding: 8px 12px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
    text-align: right;
}

.select-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.select-option.selected {
    background: rgba(212, 168, 83, 0.15);
    color: var(--primary);
    font-weight: 700;
}

.control-pill select option {
    background: #1a1d28;
    color: var(--text-primary);
}

/* Verify Button */
.btn-verify {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg,
            var(--primary-dark) 0%,
            var(--primary) 40%,
            var(--primary-light) 100%);
    color: #080a0e;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--t-normal);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow:
        0 4px 20px rgba(212, 168, 83, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        0 -1px 0 rgba(0, 0, 0, 0.2) inset;
    margin-bottom: 28px;
}

.btn-verify::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.15));
    opacity: 0;
    transition: opacity var(--t-fast);
}

.btn-verify:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(212, 168, 83, 0.4);
}

.btn-verify:hover::before {
    opacity: 1;
}

.btn-verify:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(212, 168, 83, 0.2);
}

.btn-verify:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Ripple */
.btn-verify .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Button icon — spinning hexagon */
.btn-icon {
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    animation: hexSpin 4s linear infinite;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.4));
}

@keyframes hexSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.15);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Scan-line sweep across the button */
.btn-scan {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.18) 50%,
            transparent 100%);
    transform: skewX(-20deg);
    animation: btnScan 2.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes btnScan {
    0% {
        left: -100%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    60% {
        left: 160%;
        opacity: 1;
    }

    61% {
        opacity: 0;
    }

    100% {
        left: 160%;
        opacity: 0;
    }
}

/* Disabled / limit-reached state */
.btn-verify:disabled {
    background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
    color: #555;
    cursor: not-allowed;
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.2);
    transform: none !important;
}

.btn-verify:disabled .btn-icon {
    animation: none;
    opacity: 0.3;
}

.btn-verify:disabled .btn-scan {
    display: none;
}

.btn-verify:disabled::before {
    display: none;
}


/* Loader dots */
.btn-loader {
    display: none;
    align-items: center;
    gap: 4px;
}

.btn-loader .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #0a0c10;
    animation: bounce 1.4s ease-in-out infinite;
}

.btn-loader .dot:nth-child(2) {
    animation-delay: 0.16s;
}

.btn-loader .dot:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   EXAMPLE CHIPS
   ============================================ */
.examples-section {
    margin-top: 4px;
}

.examples-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.examples-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.example-chip {
    padding: 6px 12px;
    border-radius: var(--r-pill);
    border: 1px solid var(--border-light);
    background: var(--bg-chip);
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--t-normal);
    font-family: inherit;
}

.example-chip:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: rgba(212, 168, 83, 0.06);
    transform: translateY(-1px);
}

.example-chip:active {
    transform: translateY(0);
}

/* ============================================
   HISTORY
   ============================================ */
.history-section {
    padding: 0 24px 24px;
    position: relative;
    z-index: 1;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.history-title {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-tertiary);
}

.history-clear {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    padding: 3px 8px;
    border-radius: var(--r-sm);
    transition: all var(--t-fast);
}

.history-clear:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all var(--t-normal);
    border: 1px solid transparent;
}

.history-item:hover {
    background: var(--bg-card);
    border-color: var(--border-subtle);
    transform: translateX(3px);
}

.history-verdict {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.history-verdict.true {
    background: var(--success);
    box-shadow: 0 0 5px rgba(74, 222, 128, 0.4);
}

.history-verdict.false {
    background: var(--danger);
    box-shadow: 0 0 5px rgba(248, 113, 113, 0.4);
}

.history-verdict.uncertain {
    background: var(--warning);
}

.history-claim {
    flex: 1;
    font-size: 0.78rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-time {
    font-size: 0.67rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

/* ============================================
   RIGHT PANEL
   ============================================ */
.panel-right {
    flex: 1;
    background: var(--bg-right);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 168, 83, 0.1) transparent;
}

.panel-right::-webkit-scrollbar {
    width: 4px;
}

.panel-right::-webkit-scrollbar-track {
    background: transparent;
}

.panel-right::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 83, 0.1);
    border-radius: 4px;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px 0;
    flex-shrink: 0;
}

.results-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-tertiary);
}

.results-clear-btn {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    padding: 3px 8px;
    border-radius: var(--r-sm);
    transition: all var(--t-fast);
}

.results-clear-btn:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

/* Empty State */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.empty-icon {
    margin-bottom: 20px;
    opacity: 0.6;
    animation: floatIcon 4s ease-in-out infinite;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-sub {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    line-height: 1.6;
    max-width: 280px;
}

.empty-sub strong {
    color: var(--primary);
    font-weight: 600;
}

/* Result Area */
.result-area {
    padding: 20px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   RESULT CARD
   ============================================ */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--r-lg);
    padding: 22px;
    animation: slideInRight 0.45s var(--t-smooth) both;
    transition: border-color var(--t-normal), box-shadow var(--t-normal);
}

.result-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Verdict Row */
.result-verdict-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

/* Verdict Badge */
.verdict-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px 6px 8px;
    border-radius: var(--r-pill);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    animation: verdictPop 0.5s var(--t-bounce) forwards;
}

@keyframes verdictPop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.verdict-icon-wrap {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.verdict-badge.true {
    color: var(--success);
    background: var(--success-bg);
    border: 1.5px solid var(--success-border);
}

.verdict-badge.true .verdict-icon-wrap {
    background: var(--success);
    color: #0a0c10;
}

.verdict-badge.false {
    color: var(--danger);
    background: var(--danger-bg);
    border: 1.5px solid var(--danger-border);
}

.verdict-badge.false .verdict-icon-wrap {
    background: var(--danger);
    color: #0a0c10;
}

.verdict-badge.uncertain {
    color: var(--warning);
    background: var(--warning-bg);
    border: 1.5px solid var(--warning-border);
}

.verdict-badge.uncertain .verdict-icon-wrap {
    background: var(--warning);
    color: #0a0c10;
}

/* Meta */
.verdict-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-item {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Claim */
.result-claim {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(212, 168, 83, 0.04);
    border-radius: var(--r-sm);
    border-left: 3px solid var(--primary);
    line-height: 1.5;
    animation: fadeIn 0.4s ease 0.1s both;
}

/* Reasoning */
.result-reason {
    margin-bottom: 14px;
    animation: fadeIn 0.4s ease 0.2s both;
}

.result-reason h4 {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.result-reason p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ============================================
   PROGRESS TRACKER
   ============================================ */
.progress-tracker {
    margin-bottom: 14px;
    animation: fadeIn 0.4s ease 0.25s both;
}

.progress-tracker-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.progress-steps {
    display: flex;
    align-items: center;
    gap: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    position: relative;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 9px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border-subtle);
    z-index: 0;
}

.progress-step.done:not(:last-child)::after {
    background: linear-gradient(90deg, var(--primary), rgba(212, 168, 83, 0.3));
}

.step-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    background: var(--bg-app);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    position: relative;
    z-index: 1;
    transition: all var(--t-normal);
}

.progress-step.done .step-dot {
    border-color: var(--primary);
    background: var(--primary);
    color: #0a0c10;
    font-weight: 700;
}

.progress-step.active .step-dot {
    border-color: var(--primary);
    background: var(--primary-glow);
    animation: stepPulse 1.2s ease-in-out infinite;
}

@keyframes stepPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(212, 168, 83, 0.4);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(212, 168, 83, 0);
    }
}

.step-label {
    font-size: 0.62rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.progress-step.done .step-label,
.progress-step.active .step-label {
    color: var(--primary);
}

/* ============================================
   SOURCES
   ============================================ */
.result-sources {
    animation: fadeIn 0.4s ease 0.35s both;
}

.result-sources h4 {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.source-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--r-sm);
    background: rgba(212, 168, 83, 0.02);
    border: 1px solid var(--border-subtle);
    transition: all var(--t-normal);
    animation: fadeIn 0.3s ease both;
}

.source-item:hover {
    background: rgba(212, 168, 83, 0.04);
    border-color: var(--border-light);
    transform: translateX(3px);
}

.source-tier {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.source-tier.government {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.source-tier.educational {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
}

.source-tier.major-news {
    background: rgba(212, 168, 83, 0.1);
    color: var(--primary);
}

.source-tier.organization {
    background: rgba(244, 114, 182, 0.1);
    color: #f472b6;
}

.source-tier.other {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
}

.source-info {
    flex: 1;
    min-width: 0;
}

.source-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source-url {
    font-size: 0.68rem;
    color: #60a5fa;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--t-fast);
}

.source-url:hover {
    color: var(--primary);
    text-decoration: underline;
}

.source-cited {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--success);
    background: var(--success-bg);
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

/* ============================================
   SUMMARY BAR (Text Analysis)
   ============================================ */
.summary-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--r-lg);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    animation: slideInRight 0.45s var(--t-smooth) both;
}

.summary-stat {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-stat strong {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-stat.true strong {
    color: var(--success);
}

.summary-stat.false strong {
    color: var(--danger);
}

.summary-stat.uncertain strong {
    color: var(--warning);
}

.summary-divider {
    width: 1px;
    height: 24px;
    background: var(--border-light);
}

/* ============================================
   SKELETON LOADER
   ============================================ */
.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 22px;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg,
            rgba(212, 168, 83, 0.04) 25%,
            rgba(212, 168, 83, 0.09) 50%,
            rgba(212, 168, 83, 0.04) 75%);
    background-size: 400% 100%;
    animation: skeletonShimmer 1.8s ease-in-out infinite;
    margin-bottom: 10px;
}

.skeleton-line.badge {
    width: 90px;
    height: 24px;
    border-radius: 20px;
}

.skeleton-line.medium {
    width: 70%;
}

.skeleton-line.short {
    width: 40%;
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   ERROR CARD
   ============================================ */
.error-card {
    padding: 18px 22px;
    border-radius: var(--r-lg);
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    animation: slideInRight 0.4s var(--t-smooth) forwards;
}

.error-card h4 {
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: var(--danger);
}

.error-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ============================================
   LIMIT OVERLAY
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
   RESULT CARD
   ============================================ */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--r-lg);
    padding: 22px;
    animation: slideInRight 0.45s var(--t-smooth) both;
    transition: border-color var(--t-normal), box-shadow var(--t-normal);
}

.result-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Verdict Row */
.result-verdict-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

/* Verdict Badge */
.verdict-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px 6px 8px;
    border-radius: var(--r-pill);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    animation: verdictPop 0.5s var(--t-bounce) forwards;
}

@keyframes verdictPop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.verdict-icon-wrap {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.verdict-badge.true {
    color: var(--success);
    background: var(--success-bg);
    border: 1.5px solid var(--success-border);
}

.verdict-badge.true .verdict-icon-wrap {
    background: var(--success);
    color: #0a0c10;
}

.verdict-badge.false {
    color: var(--danger);
    background: var(--danger-bg);
    border: 1.5px solid var(--danger-border);
}

.verdict-badge.false .verdict-icon-wrap {
    background: var(--danger);
    color: #0a0c10;
}

.verdict-badge.uncertain {
    color: var(--warning);
    background: var(--warning-bg);
    border: 1.5px solid var(--warning-border);
}

.verdict-badge.uncertain .verdict-icon-wrap {
    background: var(--warning);
    color: #0a0c10;
}

/* Meta */
.verdict-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-item {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Claim quote */
.result-claim {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(212, 168, 83, 0.04);
    border-radius: var(--r-sm);
    border-left: 3px solid var(--primary);
    line-height: 1.5;
    animation: fadeIn 0.4s ease 0.1s both;
}

/* Reasoning */
.result-reason {
    margin-bottom: 14px;
    animation: fadeIn 0.4s ease 0.2s both;
}

.result-reason h4 {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.result-reason p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ============================================
   PROGRESS TRACKER
   ============================================ */
.progress-tracker {
    margin-bottom: 14px;
    animation: fadeIn 0.4s ease 0.25s both;
}

.progress-tracker-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.progress-steps {
    display: flex;
    align-items: center;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    position: relative;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 9px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border-subtle);
    z-index: 0;
}

.progress-step.done:not(:last-child)::after {
    background: linear-gradient(90deg, var(--primary), rgba(212, 168, 83, 0.3));
}

.step-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    background: var(--bg-app);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    position: relative;
    z-index: 1;
    transition: all var(--t-normal);
}

.progress-step.done .step-dot {
    border-color: var(--primary);
    background: var(--primary);
    color: #0a0c10;
    font-weight: 700;
}

.progress-step.active .step-dot {
    border-color: var(--primary);
    background: var(--primary-glow);
    animation: stepPulse 1.2s ease-in-out infinite;
}

@keyframes stepPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(212, 168, 83, 0.4);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(212, 168, 83, 0);
    }
}

.step-label {
    font-size: 0.62rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.progress-step.done .step-label,
.progress-step.active .step-label {
    color: var(--primary);
}

/* ============================================
   SOURCES
   ============================================ */
.result-sources {
    animation: fadeIn 0.4s ease 0.35s both;
}

.result-sources h4 {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.source-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--r-sm);
    background: rgba(212, 168, 83, 0.02);
    border: 1px solid var(--border-subtle);
    transition: all var(--t-normal);
    animation: fadeIn 0.3s ease both;
}

.source-item:hover {
    background: rgba(212, 168, 83, 0.04);
    border-color: var(--border-light);
    transform: translateX(3px);
}

.source-tier {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Tier color classes — match backend quality_tier values */
.source-tier.government {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
}

.source-tier.educational {
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
}

.source-tier.major-news {
    background: rgba(212, 168, 83, 0.12);
    color: var(--primary);
}

.source-tier.organization {
    background: rgba(244, 114, 182, 0.12);
    color: #f472b6;
}

.source-tier.low-quality {
    background: rgba(156, 163, 175, 0.08);
    color: #6b7280;
}

.source-tier.other {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
}

.source-info {
    flex: 1;
    min-width: 0;
}

.source-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source-url {
    font-size: 0.68rem;
    color: #60a5fa;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--t-fast);
}

.source-url:hover {
    color: var(--primary);
    text-decoration: underline;
}

.source-cited {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--success);
    background: var(--success-bg);
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

/* ============================================
   SUMMARY BAR (Text Analysis)
   ============================================ */
.summary-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--r-lg);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    animation: slideInRight 0.45s var(--t-smooth) both;
}

.summary-stat {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-stat strong {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-stat.true strong {
    color: var(--success);
}

.summary-stat.false strong {
    color: var(--danger);
}

.summary-stat.uncertain strong {
    color: var(--warning);
}

.summary-divider {
    width: 1px;
    height: 24px;
    background: var(--border-light);
}

/* ============================================
   SKELETON LOADER
   ============================================ */
.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: 22px;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg,
            rgba(212, 168, 83, 0.04) 25%,
            rgba(212, 168, 83, 0.09) 50%,
            rgba(212, 168, 83, 0.04) 75%);
    background-size: 400% 100%;
    animation: skeletonShimmer 1.8s ease-in-out infinite;
    margin-bottom: 10px;
}

.skeleton-line.badge {
    width: 90px;
    height: 24px;
    border-radius: 20px;
}

.skeleton-line.medium {
    width: 70%;
}

.skeleton-line.short {
    width: 40%;
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   ERROR & LIMIT CARDS
   ============================================ */
.error-card {
    background: rgba(248, 113, 113, 0.06);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: var(--r-lg);
    padding: 20px 22px;
    animation: slideInRight 0.4s var(--t-smooth) both;
}

.error-card h4 {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--danger);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.error-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.limit-card {
    background: var(--bg-card);
    border: 1px solid rgba(212, 168, 83, 0.25);
    border-radius: var(--r-lg);
    padding: 32px 28px;
    text-align: center;
    animation: slideInRight 0.45s var(--t-smooth) both;
    box-shadow: 0 0 40px rgba(212, 168, 83, 0.06), var(--shadow-md);
}

.limit-icon {
    font-size: 2.4rem;
    margin-bottom: 14px;
    animation: verdictPop 0.5s var(--t-bounce) both;
}

.limit-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin-bottom: 10px;
}

.limit-msg {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 18px;
}

.limit-msg strong {
    color: var(--primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */


/* ============================================
   MOBILE COMPONENTS (Global Base)
   ============================================ */
.collapsed-header {
    display: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Laptop/Tablet (Below 1100px) - Narrower split */
@media (max-width: 1100px) {
    :root {
        --left-w: 420px;
    }

    .input-section {
        padding: 24px;
    }
}

/* Tablet/Mobile Stack (Below 900px) - Vertical Column Layout */
@media (max-width: 900px) {
    :root {
        --left-w: 100%;
    }

    body {
        overflow: auto;
        /* Allow native scrolling */
        height: auto;
        min-height: 100vh;
    }

    .app-shell {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .split-layout {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    /* Left Panel (Input) floats to top */
    .panel-left {
        width: 100%;
        height: auto;
        /* Let content dictate height */
        max-height: none;
        overflow: visible;
        border-right: none;
        border-bottom: 1px solid var(--panel-divider);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
        z-index: 10;
    }

    /* Gold accent at bottom instead of right */
    .panel-left::before {
        width: 100%;
        height: 1px;
        top: auto;
        bottom: 0;
        left: 0;
        background: linear-gradient(90deg, transparent, rgba(212, 168, 83, 0.6), transparent);
    }

    /* Right Panel (Results) below */
    .panel-right {
        width: 100%;
        height: auto;
        min-height: 50vh;
        overflow: visible;
        padding-bottom: 40px;
    }

    /* Input Section Adjustments */
    .input-section {
        padding: 24px 20px 32px;
        transition: padding var(--t-normal);
    }

    /* Collapsed State (Mobile) */
    .input-section.collapsed {
        padding: 12px 20px;
        border-bottom: 1px solid var(--border-subtle);
        background: var(--bg-nav);
        /* Blend with nav */
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .collapsed-header {
        display: none;
        /* Hidden by default */
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        cursor: pointer;
        animation: fadeIn 0.3s ease;
    }

    .input-section.collapsed .collapsed-header {
        display: flex;
    }

    .input-section.collapsed .input-header,
    .input-section.collapsed .input-group,
    .input-section.collapsed .controls-row,
    .input-section.collapsed .btn-verify,
    .input-section.collapsed .examples-section {
        display: none !important;
    }

    .collapsed-claim {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-width: 0;
    }

    .collapsed-label {
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--text-tertiary);
        margin-bottom: 2px;
    }

    .collapsed-text {
        font-size: 0.85rem;
        color: var(--text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: 500;
    }

    .collapsed-edit-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: rgba(212, 168, 83, 0.1);
        border: 1px solid rgba(212, 168, 83, 0.2);
        border-radius: var(--r-pill);
        color: var(--primary);
        font-size: 0.75rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .collapsed-edit-btn:hover {
        background: rgba(212, 168, 83, 0.2);
    }

    /* Prevent textarea from blowing up layout */
    textarea {
        min-height: 100px;
        max-height: 300px;
        /* Limit expansion */
    }

    /* Hide nav center on mobile to save space */
    .nav-center {
        display: none;
    }

    .nav-right .nav-status {
        display: none;
    }
}

/* Mobile (Below 600px) */
@media (max-width: 600px) {
    .navbar {
        padding: 0 16px;
    }

    .brand-sub {
        display: none;
    }

    .brand-name {
        font-size: 1.1rem;
    }

    .nav-tab {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .input-title {
        font-size: 1.25rem;
    }

    .input-subtitle {
        font-size: 0.8rem;
    }

    .controls-row {
        gap: 8px;
    }

    .control-pill {
        min-width: calc(50% - 5px);
        /* 2 columns */
        flex: 1 1 auto;
        padding: 0 12px;
    }

    .field-label {
        font-size: 0.65rem;
    }

    /* Simplify particles on mobile */
    .particle {
        display: none;
    }

    /* Adjust Example Chips */
    .examples-grid {
        gap: 6px;
    }

    .example-chip {
        font-size: 0.75rem;
        padding: 8px 12px;
        flex: 1 1 auto;
        text-align: center;
    }
}