/*
Theme Name: TBA Starter Theme - Letterboxd Pro Edition
Theme URI: https://thebestactors.com
Author: Antigravity
Description: Ultra-premium Cinematic theme inspired by Letterboxd Pro & Cyber Stage. High contrast, dark glassmorphism, glowing accents, and optimized performance.
Version: 3.0.0
*/

/* ==========================================================================
   1. DESIGN TOKENS & SYSTEM VARIABLES (Letterboxd Pro / Cyber Stage)
   ========================================================================== */
:root {
    /* Color Palette: Deep Space Canvas */
    --bg-base: #070c18;
    --bg-surface: #0e1628;
    --bg-surface-elevated: #152238;
    --bg-surface-hover: #1c2c48;
    --bg-glass: rgba(14, 22, 40, 0.82);
    --bg-glass-card: rgba(18, 29, 52, 0.65);
    
    /* Neon & Cinematic Accents */
    --accent-teal: #00f0ff;
    --accent-cyan: #38bdf8;
    --accent-indigo: #6366f1;
    --accent-violet: #8b5cf6;
    --accent-amber: #f59e0b;
    --accent-gold: #fbbf24;
    --accent-emerald: #10b981;
    --accent-crimson: #f43f5e;
    
    /* Text Hierarchy (High Contrast Cinephile - WCAG AA compliant >= 4.5:1) */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dim: #94a3b8; /* Upgraded from #64748b to meet 4.5:1 contrast against #0e1628 */
    --text-subtle: #cbd5e1;
    
    /* Borders & Outlines (Calibrated for Low Eye-Strain) */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.14);
    --border-glow: rgba(0, 240, 255, 0.2);
    --border-amber-glow: rgba(245, 158, 11, 0.2);

    /* Shadows & Glows */
    --glow-teal: 0 0 25px -4px rgba(0, 240, 255, 0.3);
    --glow-indigo: 0 0 25px -4px rgba(99, 102, 241, 0.3);
    --glow-amber: 0 0 25px -4px rgba(245, 158, 11, 0.25);
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
    --shadow-card-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 240, 255, 0.25), var(--glow-teal);

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Transitions */
    --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 0.2s;
    --duration-normal: 0.35s;

    /* Backwards-compatible aliases */
    --primary-color: var(--bg-surface);
    --accent-color: var(--accent-cyan);
    --bg-color: var(--bg-base);
    --text-main: var(--text-primary);

    color-scheme: dark;
}

/* ==========================================================================
   2. GLOBAL RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    scrollbar-color: rgba(255, 255, 255, 0.18) var(--bg-base);
}

body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at 50% 0%, #121c32 0%, var(--bg-base) 60%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.4);
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--duration-fast) ease, transform var(--duration-fast) ease;
}
a:hover {
    color: var(--accent-teal);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

p {
    margin-top: 0;
    margin-bottom: 1.25em;
    color: var(--text-secondary);
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.site-main {
    flex: 1;
    padding: 30px 0 60px;
}

/* ==========================================================================
   3. GLASSMORPHISM & UTILITY PANELS
   ========================================================================== */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
}

.glass-card {
    background: var(--bg-glass-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    transition: transform var(--duration-normal) var(--ease-cinematic),
                box-shadow var(--duration-normal) var(--ease-cinematic),
                border-color var(--duration-normal) var(--ease-cinematic);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-glow);
}

/* Neon Glow Badges */
.badge-neon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-neon-teal {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--accent-teal);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

.badge-neon-gold {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: var(--accent-gold);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.18);
}

.badge-neon-indigo {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
}

/* Glass Pills & Tag Buttons */
.tag-glass {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--duration-fast) ease;
}
.tag-glass:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.35);
    color: var(--accent-teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.15);
}

/* Neon Glow Buttons */
.btn-neon-cyan {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #00f0ff 0%, #3b82f6 100%);
    color: #050a14;
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}
.btn-neon-cyan:hover {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.55);
    transform: translateY(-2px);
    color: #050a14;
}

/* Editorial Glass Card */
.editorial-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
}

/* ==========================================================================
   4. HEADER & NAVIGATION (Letterboxd Pro Stage)
   ========================================================================== */
header.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

a.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.45rem;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

a.logo .logo-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.5));
}

a.logo .pro-pill {
    background: linear-gradient(135deg, #00f0ff 0%, #6366f1 100%);
    color: #050a14;
    font-size: 0.68rem;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all var(--duration-fast) ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* Spotlight Search in Header */
.header-search {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search input[type="search"],
.header-search input[type="text"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: #fff;
    border-radius: 999px;
    padding: 8px 38px 8px 16px;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: all var(--duration-fast) ease;
}

.header-search input:focus {
    background: rgba(18, 29, 52, 0.95);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 16px -2px rgba(0, 240, 255, 0.35);
}

.search-shortcut-badge {
    position: absolute;
    right: 12px;
    color: var(--text-dim);
    font-size: 0.72rem;
    font-family: var(--font-mono);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
    pointer-events: none;
}

/* Search Results Dropdown */
.ajax-search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(12, 19, 36, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), var(--glow-teal);
    overflow: hidden;
    z-index: 1001;
    display: none;
}

.ajax-search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transition: background var(--duration-fast) ease;
}

.search-result-item:hover {
    background: rgba(0, 240, 255, 0.08);
}

.search-result-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   5. CARDS & GRID COMPONENTS (Letterboxd Poster Style)
   ========================================================================== */
/* Actor Poster Card */
.actor-card {
    background: var(--bg-glass-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: transform var(--duration-normal) var(--ease-cinematic),
                box-shadow var(--duration-normal) var(--ease-cinematic),
                border-color var(--duration-normal) var(--ease-cinematic);
}

.actor-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(0, 240, 255, 0.4);
}

.actor-card .poster-wrapper {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: #0f172a;
}

.actor-card .poster-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-cinematic), filter 0.3s ease;
}

.actor-card:hover .poster-wrapper img {
    transform: scale(1.05);
}

/* Bottom Vignette Overlay */
.poster-vignette {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(7, 12, 24, 0.95) 0%, rgba(7, 12, 24, 0) 100%);
    pointer-events: none;
}

/* Star Score Pill */
.score-pill {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(10, 16, 30, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: var(--accent-gold);
    font-weight: 800;
    font-size: 0.82rem;
    padding: 3px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Rank Number Pill */
.rank-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 0.85rem;
    padding: 3px 9px;
    border-radius: 8px;
    backdrop-filter: blur(8px);
}
.rank-pill.gold {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid #fbbf24;
    color: #fbbf24;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}
.rank-pill.silver {
    background: rgba(148, 163, 184, 0.2);
    border: 1px solid #cbd5e1;
    color: #f1f5f9;
}
.rank-pill.bronze {
    background: rgba(217, 119, 6, 0.2);
    border: 1px solid #d97706;
    color: #f59e0b;
}

/* ==========================================================================
   6. STUDIO MIXER UGC SLIDERS (Hardware Fader Aesthetic)
   ========================================================================== */
.tba-ugc-slider {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    transition: border-color var(--duration-fast) ease;
}

.tba-ugc-slider:hover {
    border-color: rgba(0, 240, 255, 0.25);
}

/* Custom Range Input */
.tba-ugc-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #1e293b;
    border-radius: 999px;
    outline: none;
    margin: 12px 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tba-ugc-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-teal);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-teal);
    border: 2px solid #070c18;
    transition: transform var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.tba-ugc-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 18px var(--accent-teal);
}

.tba-ugc-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-teal);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-teal);
    border: 2px solid #070c18;
}

/* Vote Submit Button */
.tba-vote-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    color: #fff;
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.tba-vote-btn:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(99, 102, 241, 0.25) 100%);
    border-color: var(--accent-teal);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
    transform: translateY(-1px);
}

/* ==========================================================================
   7. EDITORIAL CONTENT & TYPOGRAPHY STYLING
   ========================================================================== */
.cinematic-editorial-wrap {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-card);
    font-size: 1.12rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.cinematic-editorial-wrap h2 {
    font-size: 1.65rem;
    color: #fff;
    margin-top: 1.8em;
    margin-bottom: 0.6em;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cinematic-editorial-wrap h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.1em;
    background: linear-gradient(to bottom, var(--accent-teal), var(--accent-indigo));
    border-radius: 4px;
}

.cinematic-editorial-wrap h3 {
    font-size: 1.3rem;
    color: #f1f5f9;
    margin-top: 1.4em;
    margin-bottom: 0.5em;
    font-weight: 700;
}

.cinematic-editorial-wrap p {
    margin-bottom: 1.5em;
    color: var(--text-secondary);
}

.cinematic-editorial-wrap ul,
.cinematic-editorial-wrap ol {
    margin-bottom: 1.5em;
    padding-left: 24px;
    color: var(--text-secondary);
}

.cinematic-editorial-wrap li {
    margin-bottom: 0.5em;
}

.cinematic-editorial-wrap blockquote {
    border-left: 4px solid var(--accent-cyan);
    margin: 2em 0;
    padding: 16px 24px;
    background: rgba(56, 189, 248, 0.05);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #e2e8f0;
}

/* ==========================================================================
   8. FOOTER (Deep Obsidian Cinema Hall)
   ========================================================================== */
footer.site-footer {
    background: #050811;
    border-top: 1px solid var(--border-subtle);
    padding: 60px 0 30px;
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-muted);
    transition: color var(--duration-fast) ease;
}

.footer-col ul li a:hover {
    color: var(--accent-teal);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ==========================================================================
   9. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .header-search {
        display: none;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 0 16px;
    }
}

/* ==========================================================================
   10. ACCESSIBILITY (WCAG 2.1 AA STANDARDS)
   ========================================================================== */

/* Universal High-Visibility Focus Outline */
:focus-visible {
    outline: 2px solid var(--accent-teal) !important;
    outline-offset: 3px !important;
    border-radius: 4px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #00f0ff !important;
    outline-offset: 3px !important;
}

/* Keyboard Skip Link */
.skip-link {
    position: absolute;
    top: -9999px;
    left: 20px;
    z-index: 999999;
    background: #00f0ff;
    color: #050811;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(0, 240, 255, 0.7);
    text-decoration: none;
    transition: top 0.15s ease-out;
}
.skip-link:focus,
.skip-link:focus-visible {
    top: 20px;
    outline: 3px solid #ffffff !important;
    outline-offset: 2px !important;
}

/* Screen Reader Only Utilities */
.screen-reader-text,
.sr-only {
    border: 0 !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important;
}

.screen-reader-text:focus,
.sr-only:focus {
    clip: auto !important;
    -webkit-clip-path: none !important;
    clip-path: none !important;
    height: auto !important;
    margin: auto !important;
    overflow: visible !important;
    width: auto !important;
    white-space: normal !important;
}

/* Motion Sensitivity (Vestibular Protection) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Windows High Contrast / Forced Colors Mode */
@media (forced-colors: active) {
    :focus-visible {
        outline: 3px solid Highlight !important;
        outline-offset: 3px !important;
    }
    .score-pill,
    .badge-neon-teal,
    .badge-neon-gold,
    .badge-neon-indigo,
    .tag-glass,
    .btn-neon-cyan {
        border: 2px solid ButtonText !important;
    }
}

/* Accessible Touch Targets (Minimum 44x44px Hit Target) */
@media (pointer: coarse) {
    a,
    button,
    .tag-glass,
    .btn-neon-cyan,
    .tba-nav a,
    .tba-pagination a,
    .tba-pagination span {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* ==========================================================================
   11. SHOWDOWN MOBILE COMPARISON & STICKY THUMB-ZONE BAR
   ========================================================================== */

/* Mobile Comparison Card Breakdown */
.tba-compare-table-wrap {
    display: block;
}
.tba-compare-mobile-cards {
    display: none;
}

@media (max-width: 640px) {
    .tba-compare-table-wrap {
        display: none !important;
    }
    .tba-compare-mobile-cards {
        display: flex !important;
        flex-direction: column;
        gap: 16px;
    }
    .tba-mobile-metric-card {
        background: rgba(14, 22, 40, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 14px;
        padding: 14px 16px;
    }
    .tba-mobile-metric-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
        font-size: 0.82rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-muted);
        font-weight: 700;
    }
    .tba-mobile-metric-values {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-family: var(--font-heading);
        font-weight: 800;
        font-size: 1.05rem;
        margin-bottom: 8px;
    }
    .tba-mobile-metric-bar {
        height: 6px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.06);
        display: flex;
        overflow: hidden;
    }
}

/* Sticky Thumb-Zone Floating Action Bar on Mobile */
.tba-sticky-action-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(7, 12, 24, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(0, 240, 255, 0.2);
    padding: 10px 16px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tba-sticky-action-bar.is-visible {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .tba-sticky-action-bar {
        display: block;
    }
    body.has-sticky-bar {
        padding-bottom: 70px;
    }
}

/* ==========================================================================
   12. ACTOR PROFILE TABS (DISTILLED HIERARCHY)
   ========================================================================== */
.tba-profile-tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 28px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.tba-profile-tabs-nav::-webkit-scrollbar {
    display: none;
}
.tba-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tba-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}
.tba-tab-btn.active {
    color: var(--accent-teal);
    background: rgba(0, 240, 255, 0.1);
    box-shadow: inset 0 -2px 0 var(--accent-teal);
}
.tba-tab-pane {
    display: none;
    animation: tbaFadeIn 0.3s ease-in-out;
}
.tba-tab-pane.active {
    display: block;
}
@keyframes tbaFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   13. SMART ALGORITHMIC TOOLTIPS & MICRO-POPOVERS
   ========================================================================== */
.tba-tooltip-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.tba-tooltip-trigger .tba-tooltip-content {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(8, 14, 26, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    width: max-content;
    max-width: 300px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.15);
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1050;
    white-space: normal;
}

.tba-tooltip-trigger .tba-tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(8, 14, 26, 0.96) transparent transparent transparent;
}

.tba-tooltip-trigger:hover .tba-tooltip-content,
.tba-tooltip-trigger:focus-visible .tba-tooltip-content,
.tba-tooltip-trigger.is-active .tba-tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.tba-tooltip-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-teal);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tba-tooltip-formula {
    margin: 6px 0 0;
    padding: 6px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.74rem;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tba-tooltip-formula strong {
    color: #fbbf24;
}

/* ==========================================================================
   14. FAVORITES & WATCHLIST SYSTEM (LOCALSTORAGE)
   ========================================================================== */
.tba-fav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    border-radius: 9999px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tba-fav-btn:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fbbf24;
}

.tba-fav-btn.is-favorited {
    background: rgba(251, 191, 36, 0.15);
    border-color: #fbbf24;
    color: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.25);
}

.tba-fav-btn .fav-icon {
    transition: transform 0.2s ease;
}

.tba-fav-btn:hover .fav-icon {
    transform: scale(1.2);
}

/* Favorites Header Trigger */
.tba-fav-header-trigger {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    border-radius: 9999px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tba-fav-header-trigger:hover {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.08);
}

.tba-fav-badge {
    background: #fbbf24;
    color: #050811;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 9999px;
}

/* Favorites Drawer / Modal */
.tba-fav-drawer {
    display: none;
    position: fixed;
    top: 75px;
    right: 20px;
    width: 360px;
    max-width: calc(100vw - 40px);
    max-height: 480px;
    background: rgba(10, 16, 30, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(251, 191, 36, 0.12);
    z-index: 1200;
    overflow: hidden;
    flex-direction: column;
}

.tba-fav-drawer.is-open {
    display: flex;
    animation: tbaFadeIn 0.25s ease;
}

.tba-fav-drawer-header {
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tba-fav-drawer-body {
    padding: 12px 14px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tba-fav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}

.tba-fav-item:hover {
    background: rgba(0, 240, 255, 0.06);
    border-color: rgba(0, 240, 255, 0.2);
}

/* ==========================================================================
   15. TOAST NOTIFICATION SYSTEM
   ========================================================================== */
.tba-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(10, 16, 30, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--accent-teal);
    color: #f8fafc;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), var(--glow-teal);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.tba-toast.is-show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   16. SOCIAL SHARE BAR & SHOWDOWN ASSETS
   ========================================================================== */
.tba-share-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 20px;
    margin-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tba-share-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.tba-share-btn:hover {
    background: rgba(0, 240, 255, 0.12);
    border-color: #00f0ff;
    color: #fff;
    transform: translateY(-1px);
}

/* ==========================================================================
   17. RANKING INSTANT CLIENT-SIDE FILTER BAR
   ========================================================================== */
.tba-ranking-filter-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tba-filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tba-filter-pill-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tba-filter-pill-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.tba-filter-pill-btn.active {
    background: rgba(0, 240, 255, 0.12);
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}

.tba-rank-search-input {
    background: rgba(14, 22, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    border-radius: 9999px;
    padding: 6px 14px 6px 32px;
    font-size: 0.82rem;
    outline: none;
    transition: all 0.2s ease;
    width: 200px;
}

.tba-rank-search-input:focus {
    border-color: var(--accent-teal);
    width: 240px;
}



