:root {
    --neon-blue: #00f5ff;
    --neon-purple: #8a2be2;
    --dark-bg: #0a0a0f;
    --card-bg: #1a1a2e;
    --accent-bg: #16213e;
}

body {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #16213e 100%);
    font-family: 'Inter', sans-serif;
}

.neon-border {
    border: 2px solid transparent;
    background: linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
                linear-gradient(45deg, var(--neon-blue), var(--neon-purple)) border-box;
    border-radius: 12px;
}

.neon-text {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.winner-badge {
    background: linear-gradient(45deg, #00ff41, #00f5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.performance-bar {
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    border-radius: 4px;
    transition: all 0.3s ease;
}

.chart-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.comparison-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin: 10px;
    border: 2px solid transparent;
}

.comparison-card.selected {
    border: 2px solid var(--neon-blue);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

.spec-better {
    color: #00ff41;
    font-weight: bold;
}

.spec-worse {
    color: #ff4757;
}

select {
    background: var(--card-bg);
    color: white;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 8px;
    font-size: 16px;
}

/* Navigation Styles */
.nav-container {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-item {
    padding: 12px 20px;
    margin: 0 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(0, 245, 255, 0.1);
    border-color: var(--neon-blue);
}

.nav-item.active {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    color: white;
    font-weight: bold;
}

/* Page Styles */
.page {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.page.active {
    display: block;
}

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

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
}

@media (max-width: 768px) {
    .text-6xl { font-size: 2.5rem; }
    .text-4xl { font-size: 1.875rem; }
    .text-3xl { font-size: 1.5rem; }
    .text-2xl { font-size: 1.25rem; }
    .comparison-card { margin: 5px 0; }
    .grid { gap: 1rem; }

    .mobile-nav-toggle {
        display: block;
    }

    .nav-items {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: rgba(26, 26, 46, 0.98);
        border-top: 1px solid #333;
    }

    .nav-items.active {
        display: flex;
    }
}

/* Quiz Styles */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-question {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.quiz-question.active {
    display: block;
}

.quiz-option {
    padding: 15px 20px;
    margin: 10px 0;
    border: 2px solid #333;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.quiz-option:hover {
    border-color: var(--neon-blue);
    background: rgba(0, 245, 255, 0.1);
}

.quiz-option.selected {
    border-color: var(--neon-purple);
    background: rgba(138, 43, 226, 0.2);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    width: 0%;
    transition: width 0.5s ease;
}

/* Game Performance Predictor Styles */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.game-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.game-card:hover {
    border-color: var(--neon-blue);
}

.fps-bar {
    width: 100%;
    height: 20px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    margin: 5px 0;
}

.fps-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
}

.fps-excellent { background: linear-gradient(90deg, #00ff41, #00f5ff); }
.fps-good { background: linear-gradient(90deg, #ffd700, #ff8c00); }
.fps-playable { background: linear-gradient(90deg, #ff6b6b, #ffa500); }
.fps-poor { background: linear-gradient(90deg, #ff4757, #ff3742); }

/* TDP Slider Styles */
.slider-thumb::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.slider-thumb::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.slider-thumb::-webkit-slider-track {
    background: linear-gradient(90deg, #334155, #475569);
    height: 6px;
    border-radius: 3px;
}

.slider-thumb::-moz-range-track {
    background: linear-gradient(90deg, #334155, #475569);
    height: 6px;
    border-radius: 3px;
}

.slider-thumb:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.8);
}

/* Purchase Link Styles */
.message a {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: underline;
    text-decoration-color: var(--neon-blue);
    transition: all 0.3s ease;
}

.message a:hover {
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
    text-decoration-color: var(--neon-purple);
}

/* AI Chat Styles */
.ai-chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--neon-blue);
}

.chat-header {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    padding: 20px;
    text-align: center;
    color: white;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    color: white;
}

.message.ai {
    align-self: flex-start;
    background: var(--accent-bg);
    color: white;
    border: 1px solid #333;
}

.message.ai .device-recommendation {
    margin-top: 15px;
    padding: 20px;
    background: rgba(0, 245, 255, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--neon-blue);
}

.ai-device-card {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    transition: all 0.3s ease;
}

.ai-device-card:hover {
    border-color: var(--neon-blue);
    transform: translateY(-2px);
}

.ai-device-title {
    color: var(--neon-blue);
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-device-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin: 12px 0;
    font-size: 0.9em;
}

.ai-device-spec {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-device-reason {
    background: rgba(0, 255, 65, 0.1);
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #00ff41;
    margin-top: 10px;
    font-size: 0.9em;
}

.ai-tradeoffs {
    background: rgba(255, 193, 7, 0.1);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #ffc107;
    margin-top: 15px;
}

.ai-tradeoffs h4 {
    color: #ffc107;
    font-weight: bold;
    margin-bottom: 8px;
}

.ai-section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    margin: 20px 0;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    background: var(--accent-bg);
    border: 1px solid #444;
    border-radius: 25px;
    color: white;
    outline: none;
}

.chat-input input:focus {
    border-color: var(--neon-blue);
}

.chat-input button {
    padding: 12px 24px;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-input button:hover {
    transform: scale(1.05);
}

.chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.typing-indicator {
    align-self: flex-start;
    padding: 12px 16px;
    background: var(--accent-bg);
    border-radius: 18px;
    color: #888;
}

.typing-dots {
    display: inline-block;
    animation: typing 1.4s infinite;
}

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

/* Method Selection Styles */
.method-btn {
    transition: all 0.3s ease;
}

.method-btn.active {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    color: white;
    transform: scale(1.05);
}

/* Video Review Styles */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.video-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.video-card:hover {
    border-color: var(--neon-blue);
    transform: translateY(-5px);
}

.video-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.video-info {
    padding: 15px;
}

/* Print stylesheet for clean printing */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    .neon-border {
        border: 2px solid #333 !important;
        background: white !important;
    }
    .neon-text {
        color: #333 !important;
        -webkit-text-fill-color: #333 !important;
    }
    .winner-badge {
        color: #00aa00 !important;
        -webkit-text-fill-color: #00aa00 !important;
    }
    .nav-container {
        display: none !important;
    }
}

/* AI patch badge styles */
.badge-better {
    display: inline-block;
    margin-left: .5rem;
    padding: .1rem .4rem;
    border-radius: .375rem;
    font-size: .65rem;
    background: #043;
    color: #a7f3d0;
    border: 1px solid #065f46;
}
.badge-worse {
    display: inline-block;
    margin-left: .5rem;
    padding: .1rem .4rem;
    border-radius: .375rem;
    font-size: .65rem;
    background: #300;
    color: #fecaca;
    border: 1px solid #7f1d1d;
}

/* ─── Multi-Device Comparison Picker ──────────────────────────────────────── */

#devicePickerGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
@media (min-width: 480px)  { #devicePickerGrid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px)  { #devicePickerGrid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { #devicePickerGrid { grid-template-columns: repeat(5, 1fr); } }

.device-picker-card {
    cursor: pointer;
    display: block;
    user-select: none;
    -webkit-user-select: none;
}

.device-picker-card .device-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.picker-inner {
    position: relative;
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px solid #374151;
    background: var(--card-bg);
    transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.device-picker-card:hover .picker-inner {
    border-color: #6b7280;
}

.picker-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 3px;
}

.picker-price {
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.comp-year-badge {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    color: #d1d5db;
    font-size: 0.58rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 3px;
    vertical-align: middle;
    letter-spacing: 0.03em;
}

/* Remove × badge on selected picker cards */
.comp-remove-x {
    position: absolute;
    top: 5px;
    right: 7px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    line-height: 1;
    pointer-events: none;
    transition: color 0.15s;
    letter-spacing: 0;
}
.device-picker-card:hover .comp-remove-x {
    color: #f87171;
}

/* Picker header row */
.comp-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.comp-picker-count {
    font-size: 0.8rem;
    color: #9ca3af;
}

.comp-picker-count strong {
    color: #00f5ff;
    font-weight: 700;
}

.comp-picker-actions {
    display: flex;
    gap: 6px;
}

.comp-picker-btn {
    font-size: 0.7rem;
    padding: 4px 12px;
    border-radius: 6px;
    background: #1f2937;
    color: #9ca3af;
    border: 1px solid #374151;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.comp-picker-btn:hover {
    background: #374151;
    color: #fff;
}

/* ─── Comparison Table ─────────────────────────────────────────────────────── */

.comp-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid #374151;
    background: var(--card-bg);
    margin-top: 1.25rem;
}

.comp-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 440px;
}

/* Sticky spec-label column */
.comp-spec-header {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #111827;
    text-align: left;
    padding: 11px 14px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    border-bottom: 2px solid #374151;
    min-width: 95px;
    white-space: nowrap;
}

.comp-device-header {
    text-align: center;
    padding: 12px 8px;
    border-bottom: 2px solid #374151;
    border-left: 1px solid #1f2937;
    min-width: 115px;
    vertical-align: top;
}

.comp-device-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 auto 5px;
}

.comp-device-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.comp-device-price {
    font-size: 0.74rem;
    font-weight: 600;
    margin-top: 3px;
}

.comp-label-cell {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #111827;
    text-align: left;
    padding: 9px 14px;
    font-size: 0.8rem;
    color: #d1d5db;
    font-weight: 500;
    border-bottom: 1px solid #1f2937;
    min-width: 95px;
    white-space: nowrap;
}

.comp-row:hover .comp-cell,
.comp-row:hover .comp-label-cell {
    background: rgba(255, 255, 255, 0.03);
}

.comp-row:hover .comp-label-cell {
    background: rgba(17, 24, 39, 0.96);
}

.comp-cell {
    text-align: center;
    padding: 9px 8px;
    font-size: 0.8rem;
    color: #e5e7eb;
    border-bottom: 1px solid #1f2937;
    border-left: 1px solid #1f2937;
    vertical-align: middle;
    white-space: nowrap;
}

.comp-best {
    color: #34d399 !important;
    font-weight: 700;
    background: rgba(52, 211, 153, 0.08);
}

.comp-worst {
    color: #f87171 !important;
    background: rgba(248, 113, 113, 0.06);
}

.comp-icon {
    font-size: 0.55rem;
    margin-left: 3px;
    vertical-align: middle;
    opacity: 0.75;
}

.comp-section-divider th {
    padding: 6px 14px;
    background: rgba(0, 245, 255, 0.04);
    border-bottom: 1px solid #374151;
    border-top: 2px solid #374151;
}

.comp-section-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fbbf24;
    font-weight: 700;
}

.comp-footnote {
    text-align: center;
    color: #6b7280;
    font-size: 0.7rem;
    margin-top: 10px;
    padding-bottom: 4px;
}

/* ════════════════════════════════════════════════════════════════════════════
   APP LAYOUT — Sidebar + Main Content + Bottom Tabs
   ════════════════════════════════════════════════════════════════════════════ */

/* ── App wrapper ──────────────────────────────────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar {
    width: 236px;
    flex-shrink: 0;
    background: #0b1120;
    border-right: 1px solid rgba(99, 102, 241, 0.16);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.28s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.14);
    gap: 0.5rem;
    flex-shrink: 0;
}

.sidebar-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #f1f5f9;
    line-height: 1.2;
}

.sidebar-subtitle {
    font-size: 0.6rem;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.15rem;
}

.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 0.375rem;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
    line-height: 1;
    align-items: center;
    justify-content: center;
}

.sidebar-close-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.07);
}

.sidebar-nav {
    flex: 1;
    padding: 0.6rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.sidebar-group-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #374151;
    padding: 0.85rem 0.75rem 0.3rem;
    text-transform: uppercase;
    user-select: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    line-height: 1.3;
}

.sidebar-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #e2e8f0;
    text-decoration: none;
}

.sidebar-item.active {
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    font-weight: 600;
}

.sidebar-icon {
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.875rem;
    opacity: 0.85;
}

.sidebar-footer {
    padding: 0.875rem;
    border-top: 1px solid rgba(99, 102, 241, 0.14);
    flex-shrink: 0;
}

.sidebar-youtube-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.8rem;
    text-decoration: none;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    transition: color 0.15s, background 0.15s;
}

.sidebar-youtube-link:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.08);
    text-decoration: none;
}

/* ── Sidebar overlay (mobile drawer backdrop) ─────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 199;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sidebar-overlay.active { display: block; }

/* ── Main content area ────────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: 236px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Mobile sticky top bar ────────────────────────────────────────────────── */
.mobile-topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 17, 32, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.18);
    padding: 0.75rem 1rem;
    align-items: center;
    gap: 0.875rem;
    min-height: 52px;
}

.mobile-topbar-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: color 0.15s;
    flex-shrink: 0;
}

.mobile-topbar-btn:hover { color: #e2e8f0; }

.mobile-topbar-title {
    font-weight: 600;
    color: #f1f5f9;
    font-size: 0.95rem;
    flex: 1;
}

/* ── Bottom tab bar (mobile only) ─────────────────────────────────────────── */
.bottom-tabs {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: rgba(11, 17, 32, 0.97);
    border-top: 1px solid rgba(99, 102, 241, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 150;
    align-items: stretch;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    background: none;
    border: none;
    color: #4b5563;
    cursor: pointer;
    padding: 0.4rem 0.25rem;
    transition: color 0.15s;
}

.tab-item.active { color: #818cf8; }
.tab-item:hover  { color: #9ca3af; }

.tab-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.tab-label {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1;
}

/* ── Page fade-in transition ──────────────────────────────────────────────── */
.page { display: none; }

.page.active {
    display: block;
    animation: pageIn 0.2s ease;
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive: ≤ 1023px — sidebar becomes a slide-in drawer ────────────── */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 32px rgba(0, 0, 0, 0.55);
    }
    .sidebar-close-btn {
        display: flex;
    }
    .main-content {
        margin-left: 0;
        padding-bottom: 58px;
    }
    .mobile-topbar {
        display: flex;
    }
    .bottom-tabs {
        display: flex;
    }
}

/* ── YouTube Lazy Player ──────────────────────────────────────────────────── */
.yt-lazy {
    position: relative;
    display: block;
    width: 100%;
    height: 256px;
    cursor: pointer;
    background: #000;
    overflow: hidden;
    border-radius: 0.375rem;
}
.yt-lazy img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
    display: block;
}
.yt-lazy:hover img { opacity: 0.72; }
.yt-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: rgba(255, 0, 0, 0.88);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    pointer-events: none;
}
.yt-lazy:hover .yt-play {
    background: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}
.yt-play::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 20px;
    border-color: transparent transparent transparent #fff;
    margin-left: 5px;
}

/* ── Scroll-to-top button ─────────────────────────────────────────────────── */
#scrollTopBtn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.5);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.2s;
    pointer-events: none;
    z-index: 1000;
}
#scrollTopBtn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
#scrollTopBtn:hover {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    box-shadow: 0 6px 22px rgba(168, 85, 247, 0.7);
}

/* ── Share comparison button ──────────────────────────────────────────────── */
.share-comp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.share-comp-btn:hover {
    background: rgba(99, 102, 241, 0.38);
    color: #e0e7ff;
    border-color: #6366f1;
}

/* ── Buy link button ──────────────────────────────────────────────────────── */
.buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.7rem;
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.38);
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.buy-btn:hover {
    background: rgba(245, 158, 11, 0.38);
    color: #fef3c7;
    text-decoration: none;
}

/* ════════════════════════════════════════════════════════════════════════════
   PRO POLISH — Scroll Reveal · Micro-interactions · Sticky Table
   ════════════════════════════════════════════════════════════════════════════ */

/* ── 1. Scroll Reveal ───────────────────────────────────────────────────── */
.auto-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}
.auto-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── 2. Neon card glow on hover (no transform — avoids conflict w/ reveal) ─ */
.neon-border {
    transition: box-shadow 0.25s ease;
}
.neon-border:hover {
    box-shadow: 0 0 0 1px rgba(0, 245, 255, 0.22),
                0 10px 40px rgba(0, 245, 255, 0.08),
                0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ── 3. Device picker card — hover lift ─────────────────────────────────── */
.device-picker-card {
    cursor: pointer;
}
.device-picker-card .picker-inner {
    transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}
.device-picker-card:hover .picker-inner {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
.device-picker-card:active .picker-inner {
    transform: scale(0.96) !important;
}

/* ── 4. Press-down active states ────────────────────────────────────────── */
.buy-btn {
    transition: background 0.2s, color 0.2s, transform 0.13s ease, box-shadow 0.2s ease;
}
.buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}
.buy-btn:active {
    transform: scale(0.94) !important;
    box-shadow: none;
}
.share-comp-btn {
    transition: background 0.2s, color 0.2s, transform 0.13s ease, box-shadow 0.2s ease;
}
.share-comp-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}
.share-comp-btn:active {
    transform: scale(0.94) !important;
}
.tab-item {
    transition: color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.tab-item:active {
    transform: scale(0.90);
}
.sidebar-item {
    transition: background 0.15s ease, color 0.15s ease, transform 0.13s ease;
}
.sidebar-item:active {
    transform: scale(0.97);
}
#scrollTopBtn:active {
    transform: scale(0.90) !important;
}

/* ── 5. Focus-visible — keyboard navigation accessibility ───────────────── */
:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 3px;
}
.sidebar-item:focus-visible,
.tab-item:focus-visible,
.buy-btn:focus-visible,
.share-comp-btn:focus-visible,
button:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 3px;
    border-radius: 6px;
}

/* ── 6. Sticky comparison table headers ─────────────────────────────────── */
/* Top-left corner cell — sticky on both axes */
.comp-spec-header {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 4;
    background: #0f172a;
    padding: 10px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6b7280;
    border-bottom: 2px solid #374151;
    white-space: nowrap;
}
/* Device column headers — sticky top only */
.comp-device-header {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #0f172a;
}
/* Spec label column — sticky left only; ensure solid bg */
.comp-label-cell {
    background: #111827;
    z-index: 2;
}
/* Mobile: push sticky headers below the ~52px mobile topbar */
@media (max-width: 1023px) {
    .comp-device-header,
    .comp-spec-header {
        top: 52px;
    }
}

/* ─── Performance Heatmap ──────────────────────────────────────────────────── */
.heatmap-scroll-hint {
    text-align: center;
    font-size: 0.75rem;
    color: #475569;
    margin-bottom: 6px;
}
.heatmap-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}
.heatmap-table {
    border-collapse: collapse;
    min-width: 700px;
    width: 100%;
    font-size: 0.78rem;
}
.heatmap-table thead th {
    background: #0f172a;
    color: #94a3b8;
    font-weight: 600;
    padding: 6px 4px;
    text-align: center;
    border: 1px solid #1e293b;
    white-space: nowrap;
    font-size: 0.7rem;
    line-height: 1.2;
    position: sticky;
    top: 0;
    z-index: 2;
}
.heatmap-game-col {
    min-width: 140px;
    text-align: left !important;
    padding-left: 10px !important;
    position: sticky !important;
    left: 0;
    z-index: 3 !important;
    background: #0f172a !important;
}
.heatmap-dev-col { min-width: 62px; }
.heatmap-game-name {
    background: #111827;
    color: #e2e8f0;
    font-size: 0.72rem;
    padding: 5px 10px;
    border: 1px solid #1e293b;
    white-space: nowrap;
    position: sticky;
    left: 0;
    z-index: 1;
}
.heatmap-cell {
    text-align: center;
    padding: 5px 3px;
    border: 1px solid #1e293b;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
    line-height: 1;
    color: #fff;
}
.heatmap-cell:hover { filter: brightness(1.25); transform: scale(1.07); z-index: 1; position: relative; }
.hm-excellent    { background: rgba(34, 197, 94, 0.35); }
.hm-good         { background: rgba(163, 230, 53, 0.30); }
.hm-playable     { background: rgba(234, 179, 8, 0.30); }
.hm-unplayable   { background: rgba(239, 68, 68, 0.30); }
.hm-incompatible { background: rgba(71, 85, 105, 0.30); color: #64748b; font-size: 0.65rem; }
.hm-na           { background: rgba(30, 41, 59, 0.5); color: #334155; }
.heatmap-legend  { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 12px; justify-content: center; }
.hm-legend-item  { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: #94a3b8; }
.hm-dot {
    width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0;
}
.hm-dot.hm-excellent    { background: rgba(34, 197, 94, 0.7); }
.hm-dot.hm-good         { background: rgba(163, 230, 53, 0.7); }
.hm-dot.hm-playable     { background: rgba(234, 179, 8, 0.7); }
.hm-dot.hm-unplayable   { background: rgba(239, 68, 68, 0.7); }
.hm-dot.hm-incompatible { background: rgba(71, 85, 105, 0.7); }

/* Heatmap floating tooltip */
.heatmap-tooltip {
    position: absolute;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 14px 16px;
    min-width: 230px;
    max-width: 290px;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    animation: tooltipFadeIn 0.15s ease;
}
@keyframes tooltipFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.hm-tooltip-close {
    position: absolute; top: 8px; right: 10px;
    background: none; border: none; color: #64748b;
    cursor: pointer; font-size: 0.8rem; padding: 2px 5px;
    transition: color 0.15s;
}
.hm-tooltip-close:hover { color: #e2e8f0; }
.hm-tooltip-title   { font-weight: 700; font-size: 0.95rem; color: #f1f5f9; margin-bottom: 2px; }
.hm-tooltip-device  { font-size: 0.78rem; color: #94a3b8; margin-bottom: 6px; }
.hm-tooltip-fps     { font-size: 1.5rem; font-weight: 800; color: #00f5ff; line-height: 1; margin-bottom: 4px; }
.hm-tooltip-settings { font-size: 0.72rem; color: #64748b; line-height: 1.4; margin-bottom: 4px; }
.hm-tooltip-power   { font-size: 0.72rem; color: #818cf8; }

/* ─── FPS vs TDP Curve Chart ────────────────────────────────────────────────── */
.fps-curve-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.fps-curve-controls label { color: #94a3b8; font-size: 0.85rem; font-weight: 500; }
.fps-curve-select {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #e2e8f0;
    padding: 6px 12px;
    font-size: 0.85rem;
    min-width: 200px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.fps-curve-select:focus { outline: none; border-color: #818cf8; }
.fps-curve-canvas-wrap {
    position: relative;
    height: 340px;
    background: #0f172a;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #1e293b;
}
.fps-curve-note {
    text-align: center;
    font-size: 0.72rem;
    color: #475569;
    margin-top: 8px;
}

/* ─── Will It Run? ──────────────────────────────────────────────────────────── */
.wir-search-wrap {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.wir-input {
    flex: 1;
    min-width: 180px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #f1f5f9;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
.wir-input:focus { outline: none; border-color: #818cf8; }
.wir-input::placeholder { color: #475569; }
.wir-search-btn {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.1s;
}
.wir-search-btn:hover  { opacity: 0.9; }
.wir-search-btn:active { transform: scale(0.96); }
.wir-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.wir-chip {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    color: #94a3b8;
    font-size: 0.75rem;
    padding: 4px 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.wir-chip:hover { background: #334155; color: #e2e8f0; border-color: #818cf8; }
.wir-loading {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}
.wir-spinner {
    width: 36px; height: 36px;
    border: 3px solid #1e293b;
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: wirSpin 0.75s linear infinite;
    margin: 0 auto 14px;
}
@keyframes wirSpin { to { transform: rotate(360deg); } }
.wir-result {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 20px 22px;
    animation: tooltipFadeIn 0.25s ease;
}
.wir-game-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #00f5ff;
    margin-bottom: 12px;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 10px;
}
.wir-ai-body p    { color: #94a3b8; font-size: 0.88rem; line-height: 1.6; margin-bottom: 6px; }
.wir-ai-body p:first-child { color: #e2e8f0; font-size: 0.92rem; margin-bottom: 14px; }
.wir-device-row {
    background: #111827;
    border-left: 3px solid #334155;
    border-radius: 0 6px 6px 0;
    padding: 7px 12px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.5;
}
.wir-verdict {
    margin-top: 14px;
    padding: 10px 14px;
    background: #1e293b;
    border-radius: 8px;
    color: #e2e8f0 !important;
    font-weight: 500 !important;
    font-size: 0.88rem !important;
}
.wir-disclaimer {
    margin-top: 14px;
    font-size: 0.72rem !important;
    color: #475569 !important;
    margin-bottom: 0 !important;
}
.wir-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 14px 18px;
    color: #fca5a5;
    font-size: 0.88rem;
}
/* Result header with live badge */
.wir-result-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; border-bottom: 1px solid #1e293b; padding-bottom: 10px; }
.wir-result-header .wir-game-title { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.wir-live-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #4ade80;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
    padding: 3px 9px; border-radius: 20px;
}
/* Citations */
.wir-citations {
    margin-top: 14px;
    padding: 10px 14px;
    background: #0a1628;
    border: 1px solid #1e293b;
    border-radius: 8px;
}
.wir-citations-label { font-size: 0.7rem; color: #475569; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.wir-citations-list { display: flex; flex-wrap: wrap; gap: 6px; }
.wir-citation-link {
    display: inline-block;
    background: #1e293b; border: 1px solid #334155;
    border-radius: 6px; padding: 3px 10px;
    font-size: 0.72rem; color: #64748b;
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}
.wir-citation-link:hover { color: #94a3b8; border-color: #475569; }

/* ─── WIR Device Cards (compact format) ─────────────────────────────────────── */
.wir-device-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 12px;
    background: #111827;
    border-radius: 8px;
    padding: 9px 14px;
    margin-bottom: 6px;
    border-left: 4px solid #334155;
    transition: border-color 0.15s;
}
.wir-device-card:hover { background: #161f2e; }

/* Left border color per rating */
.wir-rating-excellent   { border-left-color: #22c55e; }
.wir-rating-good        { border-left-color: #eab308; }
.wir-rating-playable    { border-left-color: #f97316; }
.wir-rating-unplayable  { border-left-color: #ef4444; }
.wir-rating-incompatible{ border-left-color: #64748b; }

.wir-device-card-left {
    flex: 0 0 auto;
    min-width: 140px;
}
.wir-device-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
}
.wir-device-card-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    justify-content: flex-end;
}
.wir-device-card-rating {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
}
.wir-device-card-fps {
    font-size: 0.78rem;
    color: #00f5ff;
    background: rgba(0, 245, 255, 0.07);
    border: 1px solid rgba(0, 245, 255, 0.18);
    border-radius: 5px;
    padding: 2px 8px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.wir-device-card-settings {
    font-size: 0.74rem;
    color: #64748b;
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── FPS Mode Toggle (FPS / Efficiency) ────────────────────────────────────── */
.fps-mode-toggle {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #334155;
    margin-left: auto;
}
.fps-mode-btn {
    background: transparent;
    color: #64748b;
    border: none;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.03em;
}
.fps-mode-btn:first-child { border-right: 1px solid #334155; }
.fps-mode-btn.active { background: #818cf8; color: #fff; }
.fps-mode-btn:not(.active):hover { background: #1e293b; color: #94a3b8; }

/* ─── Should I Buy? ──────────────────────────────────────────────────────────── */
.sib-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.sib-chip {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sib-chip:hover { background: #334155; color: #e2e8f0; border-color: #818cf8; }

.sib-chat-wrap {
    max-height: 480px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    padding: 4px 2px;
    scroll-behavior: smooth;
}
.sib-message { display: flex; max-width: 85%; }
.sib-message.user      { align-self: flex-end; }
.sib-message.assistant { align-self: flex-start; }
.sib-bubble {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.875rem;
    line-height: 1.6;
}
.sib-message.user .sib-bubble {
    background: #4f46e5;
    color: #e0e7ff;
    border-bottom-right-radius: 4px;
}
.sib-message.assistant .sib-bubble {
    background: #111827;
    border: 1px solid #1e293b;
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
}
.sib-bubble ul { margin: 6px 0 4px 16px; padding: 0; }
.sib-bubble li { margin-bottom: 3px; }
.sib-bubble strong { color: #00f5ff; }
/* Typing dots */
.sib-typing { display: flex; align-items: center; gap: 5px; padding: 14px 18px; }
.sib-typing span {
    width: 7px; height: 7px; background: #475569;
    border-radius: 50%; display: inline-block;
    animation: sibDot 1.2s infinite;
}
.sib-typing span:nth-child(2) { animation-delay: 0.2s; }
.sib-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes sibDot {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
    40%           { transform: scale(1.0); opacity: 1.0; }
}
.sib-input-wrap { display: flex; gap: 10px; }
.sib-input {
    flex: 1;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    color: #e2e8f0;
    padding: 11px 16px;
    font-size: 0.9rem;
    transition: border-color 0.15s;
}
.sib-input:focus { outline: none; border-color: #818cf8; }
.sib-input::placeholder { color: #475569; }
.sib-send-btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s, transform 0.1s;
}
.sib-send-btn:hover  { opacity: 0.9; }
.sib-send-btn:active { transform: scale(0.96); }

/* ─── News Feed ──────────────────────────────────────────────────────────────── */
.news-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.news-filter-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #64748b;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.news-filter-btn:hover  { background: #334155; color: #e2e8f0; }
.news-filter-btn.active { background: #1e3a5f; color: #38bdf8; border-color: #38bdf844; }
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.news-card {
    display: flex;
    flex-direction: column;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.15s;
}
.news-card:hover { border-color: #334155; transform: translateY(-2px); }
.news-card-source-bar { height: 3px; flex-shrink: 0; }
.news-card-body { padding: 12px 14px; flex: 1; }
.news-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.news-source-badge {
    font-size: 0.68rem;
    font-weight: 700;
    border: 1px solid;
    border-radius: 5px;
    padding: 2px 7px;
    letter-spacing: 0.03em;
}
.news-card-date  { font-size: 0.68rem; color: #475569; }
.news-card-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.45;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-desc {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Upgrade Path Calculator ───────────────────────────────────────────────── */
.upgrade-select {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    padding: 10px 14px;
    font-size: 0.9rem;
    width: 100%;
    max-width: 360px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}
.upgrade-select:focus { outline: none; border-color: #818cf8; }
.upgrade-placeholder {
    text-align: center;
    color: #475569;
    padding: 40px 20px;
    font-size: 0.9rem;
}
.upgrade-header { margin-bottom: 16px; }
.upgrade-from-label { font-size: 1rem; font-weight: 600; color: #94a3b8; margin-bottom: 4px; }
.upgrade-current-name { color: #f1f5f9; }
.upgrade-current-stats {
    display: flex; gap: 20px; font-size: 0.82rem; color: #64748b;
}
.upgrade-current-stats strong { color: #94a3b8; }
.upgrade-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.upgrade-card {
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.upgrade-card:hover { border-color: #334155; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
.upgrade-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.upgrade-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}
.badge-value { background: rgba(234,179,8,0.15); color: #fbbf24; border: 1px solid rgba(234,179,8,0.3); }
.badge-perf  { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.upgrade-card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 10px; margin-bottom: 12px;
}
.upgrade-card-name { font-size: 0.95rem; font-weight: 700; color: #f1f5f9; }
.upgrade-card-price-block { text-align: right; }
.upgrade-target-price { display: block; font-size: 1rem; font-weight: 700; color: #e2e8f0; }
.upgrade-price-diff { display: block; font-size: 0.72rem; font-weight: 600; }
.price-more { color: #f97316; }
.price-less { color: #4ade80; }
.price-same { color: #64748b; }
.upgrade-stats {
    display: flex; gap: 12px; margin-bottom: 12px;
    background: #0f172a; border-radius: 8px; padding: 10px 12px;
}
.upgrade-stat { flex: 1; text-align: center; }
.us-label { font-size: 0.68rem; color: #475569; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.us-value { font-size: 0.95rem; font-weight: 700; color: #e2e8f0; }
.upgrade-stat-gain .us-value { color: #4ade80; }
.fps-gain { color: #4ade80; }
.fps-bar-row {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 4px; font-size: 0.72rem;
}
.fps-bar-label { width: 26px; color: #475569; flex-shrink: 0; }
.fps-bar {
    height: 7px; border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
    min-width: 4px;
}
.fps-bar-curr { background: #334155; }
.fps-bar-new  { background: linear-gradient(90deg, #4ade80, #22d3ee); }
.fps-bar-val  { color: #64748b; flex-shrink: 0; width: 24px; text-align: right; }
.upgrade-spec-line {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 10px; font-size: 0.68rem; color: #475569;
}
.upgrade-spec-line span {
    background: #1e293b;
    border-radius: 4px;
    padding: 2px 7px;
}
.upgrade-max {
    text-align: center; padding: 40px 20px;
}
.upgrade-max-icon { font-size: 3rem; margin-bottom: 10px; }
.upgrade-max h3   { font-size: 1.2rem; font-weight: 700; color: #fbbf24; margin-bottom: 8px; }
.upgrade-max p    { color: #64748b; font-size: 0.88rem; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
