:root {
    --bg-base: #0a0a0a;
    --bg-surface: rgba(20, 20, 20, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Theme Defaults */
    --theme-accent: #60a5fa;
    --theme-secondary: #c084fc;
    --theme-accent-muted: rgba(96, 165, 250, 0.1);
    --theme-accent-glow: rgba(96, 165, 250, 0.3);
    --theme-secondary-muted: rgba(192, 132, 252, 0.1);
    --theme-banner: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);

    --border-color: rgba(255, 255, 255, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.6);
}

/* Theme Overrides */
[data-theme="movies"] {
    --theme-accent: #3498db; /* Blue */
    --theme-accent-rgb: 52, 152, 219;
    --theme-accent-vibrant: #00d2ff;
    --theme-secondary: #9b59b6; /* Purple */
    --theme-accent-muted: rgba(52, 152, 219, 0.15);
    --theme-accent-glow: rgba(52, 152, 219, 0.4);
    --theme-secondary-muted: rgba(155, 89, 182, 0.15);
    --theme-banner: linear-gradient(135deg, #0f1c2e 0%, #1b2838 100%);
    --theme-header-bg: url('movies_header.png');
}

[data-theme="movies"] header::before {
    background-image: linear-gradient(rgba(52, 152, 219, 0.4), rgba(52, 152, 219, 0.4)), url('movies_header.png');
    background-blend-mode: multiply;
}

[data-theme="tv-series"] {
    --theme-accent: #e74c3c; /* Red */
    --theme-accent-rgb: 231, 76, 60;
    --theme-accent-vibrant: #ff4757;
    --theme-secondary: #e67e22; /* Orange */
    --theme-accent-muted: rgba(231, 76, 60, 0.15);
    --theme-accent-glow: rgba(231, 76, 60, 0.4);
    --theme-secondary-muted: rgba(230, 126, 34, 0.15);
    --theme-banner: linear-gradient(135deg, #2d0a0a 0%, #30171a 100%);
    --theme-header-bg: url('tv_shows_header.png');
}

[data-theme="tv-series"] header::before {
    background-image: linear-gradient(rgba(231, 76, 60, 0.4), rgba(231, 76, 60, 0.4)), url('tv_shows_header.png');
    background-blend-mode: multiply;
}

[data-theme="tv-series"] .page-banner {
    background-image: linear-gradient(rgba(231, 76, 60, 0.4), rgba(231, 76, 60, 0.4)), url('tv_shows_header.png') !important;
    background-blend-mode: multiply !important;
}

[data-theme="manga"] {
    --theme-accent: #2ecc71; /* Green */
    --theme-accent-rgb: 46, 204, 113;
    --theme-accent-vibrant: #2ed573;
    --theme-secondary: #f1c40f; /* Yellow */
    --theme-accent-muted: rgba(46, 204, 113, 0.15);
    --theme-accent-glow: rgba(46, 204, 113, 0.4);
    --theme-secondary-muted: rgba(241, 196, 15, 0.15);
    --theme-banner: linear-gradient(135deg, #0a1a10 0%, #142e1f 100%);
    --theme-header-bg: url('manga_header.png');
}

[data-theme="manga"] header::before {
    background-image: linear-gradient(rgba(46, 204, 113, 0.4), rgba(46, 204, 113, 0.4)), url('manga_header.png');
    background-blend-mode: multiply;
}

[data-theme="anime"] {
    --theme-accent: #f1c40f; /* Yellow */
    --theme-accent-rgb: 241, 196, 15;
    --theme-accent-vibrant: #fffa65;
    --theme-secondary: #2ecc71; /* Green */
    --theme-accent-muted: rgba(241, 196, 15, 0.15);
    --theme-accent-glow: rgba(241, 196, 15, 0.5);
    --theme-secondary-muted: rgba(46, 204, 113, 0.15);
    --theme-banner: linear-gradient(135deg, #241b0a 0%, #302416 100%);
    --theme-header-bg: url('anime_header.png');
}

[data-theme="anime"] header::before {
    background-image: linear-gradient(rgba(241, 196, 15, 0.4), rgba(241, 196, 15, 0.4)), url('anime_header.png');
    background-blend-mode: multiply;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    letter-spacing: -0.01em;
    touch-action: manipulation;
}

h1, h2, h3, h4, h5, h6, .serif, .font-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--theme-accent);
}

/* Mesh Background Blobs */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(20, 18, 15, 1) 0%, rgba(15, 14, 12, 1) 100%);
}

.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    right: -100px;
    background: var(--theme-accent);
}

.blob-2 {
    width: 600px;
    height: 600px;
    bottom: -150px;
    left: -100px;
    background: var(--theme-accent-glow);
}

.blob-3 {
    width: 300px;
    height: 300px;
    top: 40%;
    left: 30%;
    background: var(--theme-accent);
    opacity: 0.05;
}

/* Skeletons */
.skeleton-card {
    height: 400px;
    background: var(--glass-bg);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.skeleton-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

/* Radar Animation for Suggestions */
.radar-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 2rem auto;
}

.radar-circle {
    position: absolute;
    inset: 0;
    border: 2px solid var(--theme-accent);
    border-radius: 50%;
    opacity: 0;
    animation: radarPulse 2s infinite;
}

.radar-circle:nth-child(2) { animation-delay: 0.5s; }
.radar-circle:nth-child(3) { animation-delay: 1s; }

@keyframes radarPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Stepped Progress for Suggestions */
.suggestion-steps {
    display: flex;
    justify-content: space-between;
    width: 80%;
    max-width: 500px;
    margin: 2rem auto;
    position: relative;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 3;
    flex: 1;
}

.step-dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: background 0.3s, box-shadow 0.3s;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.4);
    transition: color 0.3s;
}

.step-item.active .step-dot {
    background: var(--theme-accent);
    box-shadow: 0 0 10px var(--theme-accent), 0 0 20px var(--theme-accent);
}

.step-item.active .step-label {
    color: #fff;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.step-item.completed .step-dot {
    background: var(--theme-accent);
}

.step-item.completed .step-label {
    color: var(--theme-accent);
}

/* Premium Suggestion Control Panel */
.suggestion-control-panel {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 1.5rem;
}

.premium-suggest-btn {
    background: linear-gradient(135deg, var(--theme-accent), rgba(var(--theme-accent-rgb), 0.6));
    color: white;
    border: none;
    padding: 0.85rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(var(--theme-accent-rgb), 0.3);
}

.premium-suggest-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--theme-accent-rgb), 0.5);
}

.leave-recommendation-btn {
    background: linear-gradient(135deg, var(--theme-accent), rgba(var(--theme-accent-rgb), 0.6));
    color: white;
    border: none;
    padding: 1.4rem 2.5rem;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(var(--theme-accent-rgb), 0.3);
    margin: 2rem auto;
    width: 100%;
    max-width: 450px;
    text-transform: uppercase;
}

.leave-recommendation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--theme-accent-rgb), 0.5);
}

.last-recommendations-footer {
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.premium-segmented-control {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 4px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-segmented-control .tuning-btn {
    flex: 1;
    background: none !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.5) !important;
    padding: 0.75rem !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 2;
    transition: color 0.3s;
    margin: 0 !important;
    box-shadow: none !important;
}

.premium-segmented-control .tuning-btn.active {
    color: #fff !important;
}

.premium-segmented-control .tuning-btn:hover {
    color: #fff !important;
}



.suggestion-control-panel {
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

/* Hub Buttons with White Glowing Outlines */
.hub-category-switcher .pill-tab, 
.info-btn, 
.premium-suggest-btn, 
.premium-segmented-control .tuning-btn {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-category-switcher .pill-tab:hover, 
.info-btn:hover, 
.premium-suggest-btn:hover, 
.premium-segmented-control .tuning-btn:hover {
    border-color: rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.hub-category-switcher .pill-tab.active,
.premium-segmented-control .tuning-btn.active {
    border-color: var(--theme-accent) !important;
    box-shadow: 0 0 25px var(--theme-accent-glow), 0 0 50px rgba(var(--theme-accent-rgb), 0.3);
}


header {
    padding: 3rem 5% 1rem; /* Increased top padding to act as banner */
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 3000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden; /* Ensure pseudo-element doesn't spill */
    min-height: 180px; /* Ensure enough height to show image content */
}

header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: var(--theme-header-bg);
    background-size: cover;
    background-position: right top;
    background-repeat: no-repeat;
    opacity: 0.6; /* Less dark */
    z-index: -1;
    transition: opacity 0.5s ease;
}

.header-main {
    display: flex;
    justify-content: center;
    gap: 3rem;
    align-items: center;
    width: 100%;
}

.header-sub {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
    width: 100%;
    padding-top: 0.5rem;
}


.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.header-filter-actions {
    display: flex;
    align-items: center;
}





.header-hidden {
    transform: translateY(-100%);
}

.footer-hidden {
    transform: translateY(120%);
}

/* Category Banners removed - combined with header */

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}


.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.icon-btn:hover {
    color: var(--text-primary);
}

.hamburger {
    display: none;
}

header .header-content {
    display: flex;
    flex-direction: column;
}

header h1 {
    display: none !important; /* Hide the anime text as requested */
}

.category-nav-desktop {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.category-nav-desktop .pill-tab {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.category-nav-desktop .pill-tab.active {
    background: var(--theme-accent);
    color: #000;
}


header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.3rem;
    margin-bottom: 1.2rem;
    font-style: italic;
    font-family: 'Lora', serif;
}

.page-tabs {
    display: flex;
    gap: 0.5rem;
}

.pill-tab {
    background: transparent;
    border: 1px solid #ffffff; /* Thinner outline with a pure white line */
    padding: 0.75rem 1.8rem;
    border-radius: 24px;
    font-family: 'Nunito', sans-serif;
    color: #ffffff; /* Make text white */
    font-weight: 700;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); /* Softened black shadow */
}

.category-nav-desktop {
    display: flex;
    gap: 0.8rem;
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.category-nav-desktop .pill-tab {
    border: none;
    background: transparent;
    opacity: 0.6;
}

.category-nav-desktop .pill-tab.active {
    background: var(--theme-accent);
    color: #000;
    opacity: 1;
    box-shadow: 0 4px 15px rgba(var(--theme-accent-rgb), 0.3);
}

.pill-tab:hover {
    background: rgba(0, 0, 0, 0.02);
}

.pill-tab.active {
    background: var(--theme-accent);
    border-color: #ffffff; /* Keep white border */
    box-shadow: 0 0 15px var(--theme-accent-glow);
}

.pill-tab-liked {
    color: #c97b7b;
    border-color: rgba(201, 123, 123, 0.4);
}

.pill-tab-liked:hover {
    background: rgba(201, 123, 123, 0.08);
}

.pill-tab-liked.active {
    background: #8b3a3a;
    color: #f5c2c2;
    border-color: #8b3a3a;
}

/* Action buttons in ranking list */
.row-actions {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    /* Clean horizontal spacing */
    z-index: 20;
}

/* Button Reset */
.row-actions .like-btn,
.row-actions .delete-btn {
    position: static;
    transform: none;
}

.row-actions .delete-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ranking-row:hover .delete-btn {
    opacity: 1;
}

/* Heart Like Button */
.like-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(38, 36, 32, 0.85);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
}

.ranking-row:hover .like-btn {
    opacity: 1;
}

.like-btn.liked {
    opacity: 1;
    color: #e05c5c;
    border-color: #8b3a3a;
    background: rgba(139, 58, 58, 0.25);
}

.like-btn:hover {
    color: #e05c5c;
}

/* Heart Like Button — inline in card footer */
.like-btn-inline {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    opacity: 0.4;
}

.media-card:hover .like-btn-inline {
    opacity: 1;
}

.like-btn-inline.liked {
    opacity: 1;
    color: #e05c5c;
}

.like-btn-inline:hover {
    color: #e05c5c;
}

/* Ranking row like btn positioning */
.ranking-row {
    position: relative;
}

.liked-indicator {
    font-size: 0.8rem;
    color: #e05c5c;
    margin-top: 2px;
}

.btn-primary {
    background: var(--theme-accent);
    border: 1px solid var(--theme-accent);
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    color: #171614;
    /* Dark text for better contrast on vibrant accents */
    font-weight: 800;
    font-size: 1.1rem;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px var(--theme-accent-glow);
}

.btn-primary:hover {
    background: var(--theme-accent);
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--theme-accent-glow);
}

.add-card:hover {
    border-color: var(--accent-primary);
    background: rgba(123, 142, 118, 0.05);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.add-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.add-card:hover .add-card-content {
    color: var(--theme-accent);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

#addMediaBtn .mobile-text {
    display: none;
}

@media (max-width: 800px) {
    .filter-controls {
        flex-direction: row !important; /* Keep search and add in same row */
        align-items: center;
        gap: 0.5rem;
    }
    #addMediaBtn, #openAuthBtn, #devConsoleActions, #guestConsoleActions {
        display: none !important;
    }

    .hub-category-switcher {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap;
        gap: 0.5rem !important;
        width: 100%;
        margin: 1.5rem 0 !important;
        background: transparent !important;
        border: none !important;
    }
}

/* Search and Custom Dropdown */
.filter-bar,
.search-container {
    display: flex;
    align-items: center;
}

/* --- Unified Filter System (v160) --- */
.filter-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}


.unified-filter-dropdown {
    position: relative;
}

.filter-trigger {

    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--theme-accent);
    color: var(--theme-accent);
    padding: 0.5rem 1.1rem;
    border-radius: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem;
}

.filter-trigger:hover {
    background: rgba(var(--theme-accent-rgb), 0.2);
    transform: translateY(-1px);
}

.filter-count {
    background: var(--theme-accent);
    color: var(--bg-color);
    font-size: 0.65rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.filter-menu {
    position: fixed;
    top: 80px;
    right: 2rem;
    width: 420px; /* Larger for mobile usability */
    background: #0f0d0c; /* Deeper, richer background */
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1.5rem;
    z-index: 10000;
    display: none;
    flex-direction: column;
    gap: 1.5rem; /* Larger gaps */
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
    animation: filterMenuIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.filter-menu.active {
    display: flex;
}

.filter-section h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--theme-accent);
    margin-bottom: 0.8rem;
    font-weight: 800;
    opacity: 0.9;
}

.filter-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem 1rem; /* Larger gaps */
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.2s;
    padding: 0.4rem 0;
}

.filter-option:hover {
    color: var(--theme-accent);
}

.filter-option input {
    accent-color: var(--theme-accent);
    cursor: pointer;
    width: 18px;
    height: 18px;
    margin: 0;
}

.filter-option span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-actions .btn-primary {
    flex: 2;
    padding: 0.8rem;
    font-size: 0.95rem;
}

.filter-actions .btn-text {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.8rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
}

.filter-actions .btn-text:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Scrollable genre list if it gets too long */
#genreFilterList {
    max-height: 140px;
    overflow-y: auto;
    padding-right: 0.4rem;
}

#genreFilterList::-webkit-scrollbar {
    width: 2px;
}

#genreFilterList::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.custom-dropdown {
    position: relative;
    width: 180px;
    font-family: 'Nunito', sans-serif;
}

.dropdown-header {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.dropdown-header:hover {
    border-color: var(--theme-accent);
}

.dropdown-header::after {
    content: '▼';
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.custom-dropdown.open .dropdown-header::after {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.custom-dropdown.open .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-options li {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.dropdown-options li:hover,
.dropdown-options li.selected {
    background-color: var(--theme-accent-muted);
    color: var(--theme-accent);
}

.search-bar {
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1px solid var(--theme-accent);
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    width: 220px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.search-bar:focus {
    width: 260px;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(123, 142, 118, 0.2);
}

.btn-clear-filter {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.9rem;
    border-radius: 20px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-filter:hover {
    background: #feebe8;
    color: #af574e;
    border-color: #af574e;
}

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

.search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.85rem;
    pointer-events: none;
    opacity: 0.5;
}


.btn-full {
    width: 100%;
    margin-top: 1.5rem;
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    padding: 0.8rem;
    font-size: 1.1rem;
}

.container {
    width: 100%;
    margin: 0 auto 4rem auto;
    padding: 0 1.5rem;
    /* Expanded width to fit cards comfortably */
}

/* Stats page must be full-width block so margin:0 auto centering works inside flex parent */
#hubStatsContainer {
    width: 100%;
    max-width: 900px;
    margin: 0 auto !important;
    padding: 2rem 1.5rem;
    color: var(--text-primary);
    box-sizing: border-box;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Moved to 4 columns */
    gap: 1.5rem;
}

.media-card {
    background: rgba(15, 15, 20, 0.4) !important; /* Slightly darker base for background poster contrast */
    backdrop-filter: blur(15px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    padding: 1.6rem !important; /* Slightly larger padding */
    position: relative;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    display: flex;
    flex-direction: column;
    min-height: 260px !important; /* Enlarge each tile size */
    overflow: hidden;
    opacity: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
}

.card-poster-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(25px) brightness(0.5);
    opacity: 0.35;
    z-index: 0;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.6s ease;
}

.card-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}

.media-card:hover .card-poster-bg {
    opacity: 0.85;
    filter: blur(5px) brightness(0.9);
}



.media-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 
        0 35px 80px rgba(0,0,0,0.8), 
        0 0 80px rgba(var(--theme-accent-rgb), 0.6) !important; /* Massive intensified glow */
    border-color: rgba(var(--theme-accent-rgb), 0.7) !important;
    z-index: 2001 !important; 
}



/* Ensure all card content stays above the poster background */
.card-header, .genre-container, .director-container, .card-badges {
    position: relative;
    z-index: 2;
}




.hub-category-switcher {
    display: inline-flex;
    justify-content: center;
    gap: 1.2rem;
    margin: 3rem 0 2rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 100px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.pill-tab {
    padding: 1rem 2.2rem;
    border-radius: 100px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hub-category-switcher .pill-tab.active {
    background: var(--theme-accent);
    color: #000;
    box-shadow: 0 0 40px var(--theme-accent-glow), 0 15px 40px rgba(0,0,0,0.5);
    transform: scale(1.08);
    font-weight: 800;
}


.card-info {
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.media-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    margin: 0;
}

.card-year {
    font-size: 0.8rem;
    opacity: 0.5;
    font-weight: 500;
}

.card-meta-bottom {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.75rem;
}

.card-rank-badge {
    color: #ffffff !important; /* White text for consistency with other badges */
    font-weight: 800;
    background: rgba(0, 0, 0, 0.45); 
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 215, 0, 0.4); /* Keep gold border for flair */
    text-shadow: 0 1px 1px #000, 0 -1px 1px #000, 1px 0 1px #000, -1px 0 1px #000; /* Prominent outline */
    display: inline-flex;
    align-items: center;
}

/* Top 5 ranked badge: gold text + gold glow */
.card-rank-badge.rank-top5 {
    color: #ffd700 !important;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8), 0 1px 1px #000, 0 -1px 1px #000, 1px 0 1px #000, -1px 0 1px #000 !important;
    border-color: rgba(255, 215, 0, 0.6) !important;
}

.review-badge {
    color: #ffffff !important; /* White text for better pop */
    background: rgba(0, 0, 0, 0.45); 
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(var(--theme-accent-rgb), 0.3);
    opacity: 0.95;
    text-shadow: 0 1px 1px #000, 0 -1px 1px #000, 1px 0 1px #000, -1px 0 1px #000; /* Prominent outline */
    display: inline-flex;
    align-items: center;
}




.card-liked-indicator {
    color: #ff3b4b; /* Brighter vivid red */
    font-size: 1.1rem;
    text-shadow: 0 0 15px rgba(255, 59, 75, 0.9); /* Stronger vivid glow */
    filter: drop-shadow(0 0 8px rgba(255, 59, 75, 0.6));

    pointer-events: none;
    margin-right: 0.3rem;
    display: inline-block;
    vertical-align: middle;
}



.stagger-in {
    animation: staggerInit 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes staggerInit {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}



/* Skeleton Shimmering Placeholder */
.skeleton-card {
    min-height: 240px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.03) 25%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

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

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

.card-spacer {
    flex-grow: 1;
}

/* card-badges: fixed slot at bottom of card, above footer */

.card-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--theme-accent-muted);
    color: var(--theme-accent);
    border: 1px solid var(--theme-accent-glow);
    font-size: 0.65rem;
    padding: 0.12rem 0.5rem;
    border-radius: 20px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.media-card::before {
    /* Little tape/bookmark ribbon accent */
    content: '';
    position: absolute;
    top: -1px;
    left: 24px;
    width: 32px;
    height: 6px;
    background: var(--theme-accent-vibrant, var(--theme-accent));
    border-radius: 0 0 4px 4px;
    box-shadow: 0 0 8px var(--theme-accent-vibrant, var(--theme-accent));
}

.media-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px var(--theme-accent-glow);
    border-color: var(--theme-accent);
    background: rgba(255, 255, 255, 0.05);
}

delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(38, 36, 32, 0.85);
    border: 1px solid var(--border-color);
    color: #af574e;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    z-index: 10;
    transition: all 0.2s ease;
    opacity: 0;
}

.media-card:hover .delete-btn,
.ranking-row:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: #af574e;
    color: white;
    border-color: #af574e;
    transform: scale(1.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem; /* Reduced for genres */
    margin-top: 0.5rem;
}

.genre-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.genre-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    padding: 0.15rem 0.45rem;
    background: rgba(0, 0, 0, 0.35); /* More solid background for legibility */
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--theme-secondary);
    border-radius: 4px;
    opacity: 0.85; /* Increased base visibility */
    transition: all 0.2s ease;
}


.media-card:hover .genre-badge {
    opacity: 1;
}

/* --- Ranking Layout (Leaderboards) --- */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    grid-template-columns: 1fr;
    /* Override grid */
    max-width: 800px;
    margin: 0 auto !important;
}

/* Rankings Page Redesign */
.ranking-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 2rem;
    margin: 3rem 0 4rem 0;
    padding: 0 1rem;
    grid-column: 1 / -1; /* spans full width if inside grid container */
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.podium-item:hover {
    transform: translateY(-10px);
}

.podium-poster {
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1rem;
    border: 2px solid transparent;
}

.podium-rank-1 .podium-poster {
    width: 240px;
    height: 360px;
    border-color: #d4af37;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.podium-rank-2 .podium-poster {
    width: 200px;
    height: 300px;
    border-color: #aaa9ad;
    box-shadow: 0 8px 20px rgba(170, 169, 173, 0.3);
}

.podium-rank-3 .podium-poster {
    width: 200px;
    height: 300px;
    border-color: #cd7f32;
    box-shadow: 0 8px 20px rgba(205, 127, 50, 0.3);
}

.podium-badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-surface);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Lora', serif;
    font-size: 1.3rem;
    font-weight: 700;
    z-index: 2;
}

.podium-rank-1 .podium-badge { color: #d4af37; border: 2px solid #d4af37; }
.podium-rank-2 .podium-badge { color: #aaa9ad; border: 2px solid #aaa9ad; }
.podium-rank-3 .podium-badge { color: #cd7f32; border: 2px solid #cd7f32; }

.podium-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    max-width: 200px;
    color: var(--text-primary);
}

.podium-director {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.2rem;
}

/* Rich Ranking List (#4+) */
.ranking-list-rich {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr)); /* Enlarged width */
    gap: 1.5rem;
    grid-column: 1 / -1;
}

.ranking-row-rich {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem; /* Enlarged padding */
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.ranking-row-rich:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--theme-accent-glow);
    border-color: var(--theme-accent);
}

.ranking-row-rank {
    font-family: 'Lora', serif;
    font-size: 2.5rem; /* Enlarged font size */
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 45px;
    text-align: center;
    opacity: 0.6;
    margin-top: 0.5rem;
}

.ranking-row-thumb {
    width: 90px; /* Enlarged thumb */
    height: 135px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.ranking-row-thumb-fallback {
    width: 90px; /* Enlarged thumb */
    height: 135px;
    border-radius: 8px;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.5rem;
    flex-shrink: 0;
}
.btn-danger-ghost {
    background: rgba(231, 76, 60, 0.05);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger-ghost:hover {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.1);
}

.btn-danger-ghost:active {
    transform: translateY(0);
}

.ranking-row-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* ensure text truncation works */
}

.ranking-row-title {
    font-size: 1.3rem; /* Enlarged font size */
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-row-meta {
    font-size: 1rem; /* Enlarged font size */
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.ranking-row-snippet {
    font-style: italic;
    font-size: 0.95rem; /* Enlarged font size */
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    opacity: 0.7;
}

.ranking-row-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.ranking-row-rich:hover .ranking-row-actions {
    opacity: 1;
}

.media-rating-container {
    display: none;
}

.hover-rating {
    color: var(--text-primary) !important;
    text-shadow: 0 0 30px var(--theme-accent-glow) !important;
    font-weight: 400;
    opacity: 0;
}

/* If there's a second rating to show on hover, we use a slight offset */
.media-card:hover .default-rating {
    transform: translateY(-50%) scale(1);
}

.media-card:hover .hover-rating {
    opacity: 1 !important;
    transform: translateY(-50%) scale(0.85) translateZ(20px);
}

.card-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    min-height: 1.5rem;
    margin-bottom: 0.8rem;
    margin-top: 1rem;
    width: 100%;
}

.badge-slot-left,
.badge-slot-right {
    display: flex;
    align-items: center;
}

.card-actions-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    padding-top: 0.5rem;
}

.media-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff !important;
    line-height: 1.25;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 
        -1px -1px 0 rgba(0,0,0,0.8),  
         1px -1px 0 rgba(0,0,0,0.8),
        -1px  1px 0 rgba(0,0,0,0.8),
         1px  1px 0 rgba(0,0,0,0.8),
         0 3px 6px rgba(0,0,0,0.9) !important;
}

.media-title:hover {
    color: var(--theme-accent) !important;
    transform: translateX(4px);
}

.media-card .card-header h2 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--theme-accent-muted);
    color: var(--theme-accent);
    border: 1px solid var(--theme-accent-glow);
    font-size: 0.65rem;
    padding: 0.12rem 0.5rem;
    border-radius: 20px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.genre-badge {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0.5rem 1rem !important; /* Enlarged padding */
    border-radius: 99px !important;
    font-size: 0.85rem !important; /* Enlarged font size */
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
}

.media-card:hover .genre-badge {
    border-color: rgba(var(--theme-accent-rgb), 0.3) !important;
    color: #fff !important;
}

.director-badge {
    background: rgba(var(--theme-accent-rgb), 0.3) !important; 
    color: #ffffff !important; /* Brighter white text */
    border: 1px solid rgba(var(--theme-accent-rgb), 0.4) !important;
    padding: 0.4rem 1rem !important;
    border-radius: 99px !important;
    text-shadow: 0 1px 1px #000, 0 -1px 1px #000, 1px 0 1px #000, -1px 0 1px #000; /* Outline */


    font-size: 0.75rem !important;
    font-weight: 700 !important;
    font-style: italic !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    margin-top: 0.5rem !important;
}

.director-badge:hover {
    background: rgba(var(--theme-accent-rgb), 0.2) !important;
    box-shadow: 0 0 15px var(--theme-accent-glow) !important;
    transform: scale(1.05);
}


/* Dark Mode Vibrant Badges */
.type-movies {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid #3498db;
    font-weight: 800;
}

.type-tv-series {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
    font-weight: 800;
}

.type-manga {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid #2ecc71;
    font-weight: 800;
}

.type-anime {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid #f1c40f;
    font-weight: 800;
}


.media-card:hover .media-rating {
    opacity: 1;
    transform: translateY(0) scale(1.05);
}

.media-card:hover .card-badges {
    opacity: 1;
    /* Stay visible on hover */
}

.media-genres {
    font-size: 0.85rem;
    color: var(--theme-accent);
    margin-bottom: 0.8rem;
    font-weight: 700;
    opacity: 0.9;
    letter-spacing: 0.2px;
}

.media-review {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}



/* Loader */
.loader {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-left-color: var(--theme-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(45, 40, 36, 0.4);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

@keyframes loginSlideUp {
    from { opacity: 0; transform: scale(0.95) translateY(30px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

#loginModal.show .modal-content {
    animation: loginSlideUp 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.modal-content {
    background: rgba(15, 15, 15, 0.95) !important;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 90%;
    max-width: 600px;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.5s ease;
    box-shadow: var(--shadow-hover);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-backdrop-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.3);
    opacity: 0;
    transition: opacity 1s ease;
}

.modal-backdrop-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.8) 100%);
}

.modal.show .modal-backdrop-image {
    opacity: 1;
}

/* Mobile Bottom Sheet */
@media (max-width: 800px) {
    .modal-content {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100% !important;
        max-width: none !important;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        padding: 2rem 1.5rem 3rem;
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .modal.show .modal-content {
        transform: translateY(0);
    }
    
    .close-btn {
        top: 1rem !important;
        right: 1.5rem !important;
    }
}


.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 0.8;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal h2 {
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'Lora', serif;
}

.review-modal-content {
    /* Explicit px width so resize: both isn't capped by the parent's width: 90% rule */
    width: 680px;
    height: 520px;
    max-width: 95vw;
    max-height: 92vh;
    min-width: 360px;
    min-height: 320px;
    resize: both;
    overflow: hidden;
    /* children handle their own scroll */
    display: flex;
    flex-direction: column;
}

/* Textarea fills all space between title and action buttons */
#reviewModal .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
    min-height: 0;
    /* required for flex shrink to work correctly */
}

#reviewModal #reviewInputBox {
    flex: 1;
    height: 100% !important;
    min-height: 150px;
    resize: none;
    /* the modal itself is the resize target */
    width: 100%;
    box-sizing: border-box;
}

/* ═══════════════════════════════════════
   STATS PAGE
═══════════════════════════════════════ */

.stats-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.stats-header h2 {
    font-size: 2rem;
    font-family: 'Lora', serif;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.stats-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Hero stats row */
.stats-hero-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 1.2rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.stat-card-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--theme-accent, var(--accent));
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.stat-card-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

/* Recently Discovered Card Styles */
#recentDiscoveryCard {
    padding: 1.2rem;
    flex: 2;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, var(--bg-card), rgba(var(--theme-accent-rgb, 147, 112, 219), 0.08));
    position: relative;
    overflow: hidden;
}
.discovery-poster {
    width: 80px;
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.discovery-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.discovery-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    opacity: 0.5;
    margin-bottom: 0.3rem;
    font-weight: 700;
}
.discovery-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.3rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.discovery-date {
    font-size: 0.75rem;
    color: var(--theme-accent);
    opacity: 0.8;
    font-weight: 600;
}


/* Full-width stat cards */
.stats-full-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stats-full-row.single {
    grid-template-columns: 1fr;
}

/* Distribution chart */
.stats-dist-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.dist-card-footer {
    margin-top: auto;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dist-footer-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    opacity: 0.6;
}

.dist-footer-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--theme-accent);
}

.stats-dist-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-bottom: 1.2rem;
}

.dist-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.6rem;
}

.dist-bar-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 42px;
    text-align: right;
    font-weight: 600;
}

.dist-bar-label-decade {
    min-width: 85px;
}

.dist-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 99px;
    overflow: hidden;
}

.dist-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: var(--theme-accent, var(--accent));
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.dist-bar-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
    min-width: 20px;
}
/* Hall of Fame Accordion */
.hof-accordion {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.hof-accordion-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.hof-accordion-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.hof-accordion-title {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hof-count {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--theme-accent);
    line-height: 1;
}

.hof-subtitle {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    color: #fff; /* Make text color white */
    opacity: 1; /* Remove opacity to make it full white */
    text-transform: none;
    letter-spacing: 0;
    margin-top: 0.4rem;
    line-height: 1.4;
    max-width: 90%;
}

.hof-subtitle-mobile {
    display: none;
}

.hof-chevron {
    font-size: 0.7rem;
    opacity: 0.5;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hof-accordion-body {
    max-height: 0;
    overflow-y: auto;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 0px solid var(--border-color);
}

.hof-accordion-body.open {
    max-height: 400px;
    border-top-width: 1px;
}

.hof-accordion.active {
    border-color: var(--theme-accent);
    box-shadow: 0 0 25px rgba(var(--theme-accent-rgb, 100, 180, 255), 0.35);
    transform: translateY(-3px);
}

/* Custom scrollbar for HOF */
.hof-accordion-body::-webkit-scrollbar {
    width: 6px;
}
.hof-accordion-body::-webkit-scrollbar-track {
    background: transparent;
}
.hof-accordion-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.hof-accordion-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hub-accordion {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(var(--theme-accent-rgb), 0.15);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-accordion.open {
    border-color: rgba(var(--theme-accent-rgb), 0.3);
    box-shadow: 0 0 20px rgba(var(--theme-accent-rgb), 0.05);
}

.hub-accordion-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 1.5rem 2rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.hub-accordion-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.hub-accordion-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hub-accordion-body {
    max-height: 0;
    overflow-y: auto;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.1);
}

.hub-accordion.open .hub-accordion-body {
    max-height: 500px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.hub-accordion .fa-chevron-down {
    font-size: 0.8rem;
    opacity: 0.4;
    transition: transform 0.3s ease;
}

.hub-accordion.open .fa-chevron-down {
    transform: rotate(180deg);
}

.rec-entry-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s;
}

.rec-entry-item:last-child {
    border-bottom: none;
}

.rec-entry-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.rec-entry-poster {
    width: 60px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
}

.rec-entry-info {
    flex: 0 1 320px;
    min-width: 0;
    text-align: left;
}

.rec-entry-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
    cursor: pointer;
}

.rec-entry-title:hover {
    color: var(--theme-accent);
}

.rec-entry-meta {
    font-size: 0.9rem;
    opacity: 0.7;
    font-weight: 600;
    line-height: 1.5;
}

.rec-entry-actions {
    display: flex;
    gap: 6px;
}

.rec-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.rec-action-btn.accept {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.2);
}

.rec-action-btn.accept:hover {
    background: #2ecc71;
    color: #fff;
}

.rec-action-btn.delete {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.2);
}

.rec-action-btn.delete:hover {
    background: #e74c3c;
    color: #fff;
}




.hof-entry {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}

.hof-entry:last-child {
    border-bottom: none;
}

.hof-entry:hover {
    background: rgba(255, 255, 255, 0.03);
}

.hof-entry-rank {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    opacity: 0.4;
    min-width: 20px;
    text-align: right;
}

.hof-entry-title {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
}

.hof-entry-year {
    font-weight: 300;
    opacity: 0.55;
    font-size: 0.82rem;
}

.hof-entry-score {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--theme-accent);
    background: var(--theme-accent-muted);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

.example-pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.example-pill {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.2;
}



/* Featured entry cards (highest/lowest) */
.stats-featured-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stats-featured-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
}

.stats-featured-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-bottom: 0.6rem;
}

.stats-featured-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.stats-featured-score {
    display: inline-block;
    background: var(--theme-accent, var(--accent));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
}

/* Recent entry */
.stats-recent-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.stats-recent-text {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-bottom: 0.3rem;
}

.stats-recent-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stats-recent-date {
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0.7;
}

/* ═══════════════════════════════════════
   RATING HISTORY MODAL
═══════════════════════════════════════ */

.history-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-family: 'Nunito', sans-serif;
    padding: 4px 12px;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.3rem;
}

.history-btn:hover {
    border-color: var(--theme-accent, var(--accent));
    color: var(--text-primary);
}

.history-empty {
    text-align: center;
    color: var(--text-secondary);
    opacity: 0.6;
    font-size: 0.9rem;
    padding: 2rem 0;
}

.history-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.history-row:last-child {
    border-bottom: none;
}

.history-old {
    color: var(--text-secondary);
    text-decoration: line-through;
    opacity: 0.6;
}

.history-arrow {
    color: var(--text-secondary);
}

.history-new {
    color: var(--theme-accent, var(--accent));
    font-weight: 700;
}

.history-date {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

/* ── Quick Info Modal ──────────────────────────────────────────────────── */
/* quick-info styles moved to bottom v240 block — stubs kept for reference */
.quick-info-poster-placeholder {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.4;
    text-align: center;
    position: absolute;
    pointer-events: none;
}

/* Ranking ribbon — positioned at bottom-left of the poster */
/* Ranking corner flag — top-left of poster, solid so it never blends */
.rank-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    padding: 0.5rem 1rem 0.5rem 0.8rem;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    border-radius: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.45);
}

.ribbon-gold {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #fff; /* White on gold background */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7), 0 1px 2px rgba(0,0,0,0.6);
}
.ribbon-silver {
    background: linear-gradient(135deg, #d0d5db, #8c949e);
    color: #fff; /* White on silver */
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5), 0 1px 2px rgba(0,0,0,0.6);
}
.ribbon-bronze {
    background: linear-gradient(135deg, #cd8246, #8b4513);
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5), 0 1px 2px rgba(0,0,0,0.6);
}
.ribbon-top5 {
    background: rgba(0, 0, 0, 0.85);
    color: #ffd700; /* Gold text for #4-5 */
    border-right: 1px solid rgba(255, 215, 0, 0.5);
    border-bottom: 1px solid rgba(255, 215, 0, 0.5);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 1px 2px rgba(0,0,0,0.9);
}
.ribbon-ranked {
    background: #000;
    color: #ffffff; /* White text for ranks 6+ */
    border-right: 1px solid rgba(var(--theme-accent-rgb), 0.3);
    border-bottom: 1px solid rgba(var(--theme-accent-rgb), 0.3);
    opacity: 1;
}

/* Movie metadata chips (content_rating / runtime) — director removed to its own section */
.quick-info-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.1rem;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    border: 1px solid var(--border-color);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.04);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* Director — exclusive section in the popup */
.quick-info-director-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.2rem;
}

.director-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.45;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.director-name {
    font-size: 0.9rem;
    font-weight: 700;
    font-style: italic;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.director-container {
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
}

/* Director badge on entry tiles — visually distinct from genre badges */
.director-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.15rem 0.6rem;
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 700;
    font-style: italic;
    background: var(--theme-accent-muted);
    color: var(--theme-accent);
    border: 1px solid var(--theme-accent-glow);
    letter-spacing: 0.02em;
    white-space: nowrap;
    margin-bottom: 0.5rem;
}

.quick-info-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 0;
}

.quick-info-details h2 {
    font-size: 1.4rem;
    line-height: 1.2;
    margin: 0;
}

.quick-info-year {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.6;
}

.quick-info-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.quick-info-rating {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--theme-accent);
    line-height: 1;
    margin-top: 0.5rem;
}

.quick-info-review {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0.5rem 0 0 0;
    max-height: 250px;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    scrollbar-width: thin;
    /* Removed line-clamp to allow full scrolling */
}

.quick-info-review:empty {
    display: none;
}

/* mobile quick-info styles moved to bottom v240 block */


.modal-terminal {
    background: #141414;
    border: 1px solid #333;
    padding: 0;
    max-width: 800px;
    width: 90%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.terminal-header {
    background: #252525;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.terminal-controls {
    display: flex;
    gap: 8px;
    margin-right: 20px;
}

.ctrl {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.ctrl.close {
    background: #ff5f56;
}

.ctrl.minimize {
    background: #ffbd2e;
}

.ctrl.maximize {
    background: #27c93f;
}

.terminal-title {
    color: #999;
    font-size: 0.75rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-grow: 1;
    text-align: center;
}

.terminal-body {
    height: 400px;
    background: #0d0d0d;
    padding: 20px;
    overflow-y: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #eee;
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: #000;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.log-entry {
    margin-bottom: 4px;
    animation: terminalFadeIn 0.1s ease-out;
}

.log-entry.system {
    color: #3498db;
    font-weight: 700;
}

.log-entry.success {
    color: #2ecc71;
}

.log-entry.warning {
    color: #f1c40f;
}

.log-entry.error {
    color: #e74c3c;
}

.terminal-footer {
    padding: 15px 20px;
    background: #1a1a1a;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #333;
}

@keyframes terminalFadeIn {
    from {
        opacity: 0;
        transform: translateY(1px);
    }

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

/* Forms */
.form-group {
    margin-bottom: 1.4rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(123, 142, 118, 0.2);
}

::placeholder {
    color: #b5ada3;
}

.genre-checklist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-top: 0.5rem;
    background: var(--bg-surface);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.genre-checklist label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    margin: 0;
}

.genre-checklist input[type="checkbox"] {
    width: auto;
    accent-color: var(--accent-primary);
}

/* Layout Structure */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar styling (Book/Binder style tabs) */
.sidebar {
    width: 280px;
    height: 100vh;
    background: rgba(30, 28, 25, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    transition: margin 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    z-index: 50;
    position: sticky;
    top: 0;
    overflow-y: auto;
}

.sidebar.collapsed {
    margin-left: -260px;
    transform: translateX(-10px);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-header h2 {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.sidebar-footer {
    margin-top: auto;
    /* Push to bottom */
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Quick Actions Section */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.actions-header {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    font-weight: 800;
    margin-bottom: 0.2rem;
    padding-left: 0.2rem;
    opacity: 0.5;
}

.action-btn {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.action-btn .btn-icon {
    font-size: 1rem;
    filter: grayscale(1) opacity(0.6);
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--text-secondary);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-btn:hover .btn-icon {
    filter: none;
    transform: scale(1.15) rotate(5deg);
}

.action-btn:active {
    transform: scale(0.97) translateX(4px);
}

.action-btn.running {
    cursor: wait;
    opacity: 0.7;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.05);
}

.action-btn.running .btn-icon {
    animation: pulse-gear 1.5s ease-in-out infinite;
    filter: none;
}

@keyframes pulse-gear {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

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

.sidebar-footer .btn-full {
    margin-top: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem 0.8rem 2rem;
    font-weight: 600;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 0 12px 12px 0;
    margin-right: 1.5rem;
    font-family: 'Nunito', sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-count {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 700;
}

.nav-link.active .nav-count {
    background: var(--theme-accent-muted);
    color: var(--theme-accent);
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.02);
}

.nav-link.active {
    color: var(--text-primary);
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--theme-accent);
    box-shadow: 2px 2px 12px var(--theme-accent-glow);
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Deletion Button and Modal */
/* Deletion Button and Modal */
.delete-btn {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

/* Specific for standard cards (not grouped) */
.media-card .delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
}

.media-card:hover .delete-btn,
.ranking-row:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: #e74c3c;
    color: white;
    transform: scale(1.1);
}

.admin-mobile-btn {
    display: none !important;
}

.ranking-row .delete-btn {
    position: relative;
    top: auto;
    right: auto;
    margin-left: 10px;
}

/* Modal specific overrides for deletion */
.modal-sm {
    max-width: 400px;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-secondary.active {
    background: rgba(var(--theme-accent-rgb), 0.2);
    border-color: var(--theme-accent);
    color: var(--theme-accent);
}

/* Toast Notification System */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 1rem 1.6rem;
    background: rgba(38, 36, 32, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-info {
    border-left: 4px solid #3498db;
}

.toast-success {
    border-left: 4px solid #2ecc71;
}

.toast-warning {
    border-left: 4px solid #f1c40f;
}

.toast-error {
    border-left: 4px solid #e74c3c;
}

@media (max-width: 768px) {
    .toast {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}

/* Main Page Header Item Counter */
/* Structured Review System */
.review-step {
    margin-top: 1.5rem;
}

.step-instruction {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.category-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 2rem;
}

.category-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    user-select: none;
}

.category-chip:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.category-chip.selected {
    background: var(--theme-accent-muted, rgba(123, 142, 118, 0.15));
    border-color: var(--theme-accent, #7b8e76);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.step-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.header-count {
    background: var(--theme-accent-muted, rgba(255, 255, 255, 0.06));
    color: var(--theme-accent, var(--text-secondary));
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 0.5rem;
    font-family: 'Nunito', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ====== Read Only Mode for Public Viewers ====== */
body:not(.read-only-mode) #loginAdminBtn {
    display: none !important;
    /* Hide admin prompt if already unlocked/localhost */
}

body.read-only-mode #addMediaBtn,
body.read-only-mode .delete-btn,
body.read-only-mode #saveReviewBtn,
body.read-only-mode #clearReviewBtn {
    display: none !important;
}

/* =========================================
   Mobile UX Overhaul (Phase A) 
========================================= */

/* Mobile Bottom Navigation */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(20, 20, 20, 0.8) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    z-index: 1000;
    height: 64px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.bottom-nav.nav-hidden {
    transform: translate(-50%, 150%);
    opacity: 0;
    pointer-events: none;
}

/* Hide bottom nav when any modal is open */
body.modal-open .bottom-nav {
    transform: translate(-50%, 150%);
    opacity: 0;
    pointer-events: none;
}

.bottom-nav .nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0 !important;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.bottom-nav .nav-text {
    font-size: 0.6rem !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.bottom-nav .nav-link.active {
    color: var(--theme-accent) !important;
}

.bottom-nav .nav-link.active .nav-text {
    opacity: 1;
    text-shadow: 0 0 10px var(--theme-accent-glow);
}

.bottom-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 12px;
    width: 12px;
    height: 3px;
    background: var(--theme-accent);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--theme-accent-glow);
}

/* Mobile Breakpoint (Match JS 800px logic) */
@media (max-width: 800px) {

    /* 1. Remove Desktop Sidebar Remnants */
    .sidebar {
        display: none !important;
    }
    .hamburger {
        display: none !important;
    }

    /* 2. Show Bottom Navigation */
    .bottom-nav {
        display: flex;
    }

    /* 3. Add padding to main content */
    .app-layout {
        padding-bottom: 80px;
    }

    /* 4. Sticky Header Framework */
    header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: rgba(15, 14, 12, 0.95);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        padding: 0.4rem 0.5rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        flex-direction: column;
        gap: 0.3rem !important;
        align-items: stretch;
    }

    .header-sub {
        flex-direction: column !important;
        gap: 0.5rem !important;
        border: none !important;
        padding-top: 0 !important;
        align-items: center !important;
    }

    .category-nav-desktop {
        display: none !important;
    }

    .header-left {
        width: 100%;
        gap: 0.2rem !important;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    #pageTitle {
        font-size: 1.15rem !important;
        margin-bottom: 0;
        line-height: 1.1;
    }

    .header-count {
        font-size: 0.65rem !important;
        padding: 0.1rem 0.4rem !important;
        margin-left: 0.3rem !important;
    }

    /* Make pill tabs scrollable or wrapped */
    .page-tabs {
        width: 100%;
        display: flex;
        justify-content: center !important;
        flex-wrap: wrap; /* Allow wrapping if they don't fit */
        gap: 0.25rem !important;
        padding: 0.1rem 0;
        box-sizing: border-box;
    }

    .page-tabs::-webkit-scrollbar {
        display: none;
    }

    .pill-tab {
        flex: 0 1 auto;
        font-size: 0.65rem !important;
        padding: 0.3rem 0.6rem !important;
    }

    /* Subtler active tab for mobile */
    .pill-tab.active {
        background: rgba(var(--theme-accent-rgb), 0.1) !important;
        color: var(--theme-accent) !important;
        border-color: rgba(var(--theme-accent-rgb), 0.2) !important;
        box-shadow: none !important;
    }

    .header-filter-actions {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 0.2rem;
    }

    /* Group search and filters more cleanly */
    .header-right {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.25rem !important;
        margin-top: 0;
        padding: 0;
    }

    .filter-controls {
        flex-direction: row !important;
        width: 100%;
        gap: 0.4rem !important;
    }

    .search-container {
        flex: 1;
    }

    .unified-filter-dropdown {
        position: static;
    }

    .filter-trigger {
        width: auto !important;
        padding: 0.4rem 0.7rem !important;
        font-size: 0.7rem !important;
        background: #1a1a1a !important;
        color: var(--theme-accent) !important;
        border: 1px solid rgba(var(--theme-accent-rgb), 0.4) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .filter-trigger .filter-icon {
        filter: none !important;
    }
    
    .filter-trigger span:not(.filter-count) {
        display: inline !important;
        margin-right: 0.2rem;
    }

    /* Mobile Bottom Sheet */
    .filter-menu {
        width: 100%;
        left: 0;
        right: 0;
        bottom: 0;
        position: fixed;
        top: auto;
        border-radius: 28px 28px 0 0;
        padding: 2rem 1.5rem 2.5rem;
        z-index: 9999;
        background: #12100e;
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
        animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Add a visual "handle" for the bottom sheet */
    .filter-menu::after {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
    }

    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    /* Modal Backdrop */
    .filter-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: -1;
        pointer-events: none; /* Let clicks pass to menu */
    }

    .admin-mobile-btn {
        position: absolute;
        top: 1.2rem;
        right: 1rem;
    }

    .page-banner {
        /* Hide the large banner on mobile to save vertical space */
        display: none !important;
    }

    h1#pageTitle {
        font-size: 1.5rem;
    }

    /* Shrink upper navigation pill tabs */
    .pill-tab {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .top-controls {
        gap: 0.5rem;
    }

    input.search-bar {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem 0.5rem 2rem;
    }

    /* --- Phase B: Adaptive 3-Column Grid & Touch Interactions --- */
    .media-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem; /* Very tight grid */
    }

    .media-card {
        min-height: 120px !important; /* Fixed: Explicitly override desktop 220px min-height */
        padding: 0.6rem !important;
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        position: relative;
        background: rgba(15, 15, 20, 0.4) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
    }


    .director-container {
        margin-top: 0.1rem;
        margin-bottom: 0.1rem;
    }

    .card-header {
        margin-bottom: 0.1rem;
    }

    h3.media-title {
        font-size: 0.55rem;
        line-height: 1.1;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Target the year badge inside the title */
    h3.media-title span {
        font-size: 0.45rem !important;
    }

    .genre-container {
        gap: 0.15rem !important;
    }

    .genre-badge {
        font-size: 0.42rem !important;
        padding: 0.1rem 0.2rem !important;
        border-radius: 4px !important;
    }

    .director-badge {
        font-size: 0.42rem !important;
        padding: 0.1rem 0.2rem !important;
        margin-bottom: 0.1rem !important;
        border-radius: 4px !important;
    }

    .card-badges {
        margin-bottom: 0;
        min-height: auto;
        flex-wrap: wrap;
        gap: 0.15rem;
        margin-top: auto !important; /* Pushes bottom badges down cleanly */
    }
    
    .card-rank-badge {
        font-size: 0.45rem !important;
        padding: 0.1rem 0.3rem !important;
    }


    .card-badges .card-rank-badge {
        font-size: 0.48rem;
        padding: 0.1rem 0.3rem;
        background: rgba(0,0,0,0.5) !important;
        border: 1px solid rgba(255, 215, 0, 0.4);
        color: #ffffff !important; /* White by default on mobile too */
        text-shadow: 0 1px 1px #000, 0 -1px 1px #000, 1px 0 1px #000, -1px 0 1px #000;
    }

    /* Top 5 override on mobile: gold text + glow */
    .card-badges .card-rank-badge.rank-top5 {
        color: #ffd700 !important;
        text-shadow: 0 0 6px rgba(255, 215, 0, 0.8), 0 1px 1px #000, 0 -1px 1px #000, 1px 0 1px #000, -1px 0 1px #000 !important;
        border-color: rgba(255, 215, 0, 0.6) !important;
    }

    .card-badges .review-badge {
        font-size: 0.48rem;
        padding: 0.1rem 0.3rem;
        background: rgba(0,0,0,0.5) !important;
        border: 1px solid rgba(var(--theme-accent-rgb), 0.4);
        color: #ffffff !important;
        text-shadow: 0 1px 1px #000, 0 -1px 1px #000, 1px 0 1px #000, -1px 0 1px #000;
    }




    .bottom-nav .nav-link[data-sub="Info"] {
        display: none;
    }

    /* Hide date to save space on mobile */
    .media-footer .like-btn-inline {
        font-size: 0.85rem;
        padding: 0.1rem;
    }

    .media-card::before {
        display: none;
    }

    /* ---------------------------------
       Phase B.2: Card Touch-to-Reveal 
       Full Card Glow mechanism
    ---------------------------------- */

    /* Neutralize the container from desktop */
    .media-rating-container {
        position: absolute;
        bottom: 0.8rem;
        right: 0.8rem;
        width: auto;
        height: auto;
        background: transparent;
        border: none;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    /* Remove the explicit TAP box */
    .media-rating-container::after {
        display: none;
    }

    .media-rating.default-rating {
        position: relative;
        font-size: 0.65rem;
        /* Ultra shrunk for 3-column layout */
        font-weight: 900;
        opacity: 0.9; /* Show it subtle by default on mobile for better glanceability */
        transform: none;
        transition: opacity 0.3s ease;
        text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
        color: var(--theme-accent);
    }

    .media-rating.hover-rating {
        display: none !important;
    }

    /* The .revealed state triggered via JS tap applies to the FULL CARD */
    .media-card.revealed {
        border-color: var(--theme-accent);
        box-shadow: 0 0 15px var(--theme-accent-glow);
        background: rgba(255, 255, 255, 0.05);
        /* very subtle highlight */
    }

    .media-card.revealed .media-rating.default-rating {
        opacity: 1;
        text-shadow: 0 0 10px var(--theme-accent-glow);
    }

    /* --- Phase D: Rankings Page Mobile Fixes --- */
    .ranking-podium {
        gap: 0.8rem;
        margin-top: 4rem; /* Give space for rank badges */
        margin-bottom: 2rem;
    }

    .podium-rank-1 .podium-poster {
        width: 110px;
        height: 165px;
    }

    .podium-rank-2 .podium-poster,
    .podium-rank-3 .podium-poster {
        width: 85px;
        height: 128px;
    }

    .podium-badge {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        top: -16px;
    }

    .podium-title {
        font-size: 0.75rem;
        max-width: 90px;
    }

    .podium-director {
        font-size: 0.6rem;
    }

    /* Disable desktop hover scaling on mobile */
    .media-card:hover {
        transform: none;
        box-shadow: none;
        /* override default hover shadow */
    }

    .media-card:not(.revealed) {
        box-shadow: var(--shadow-soft);
        background: var(--bg-surface);
    }

    /* --- Phase C: Centered Mobile Modals --- */
    .modal {
        align-items: flex-start;
        /* Start from top to allow scrolling down */
        padding: 1rem;
        overflow-y: auto;
        /* ENABLE SCROLLING */
        -webkit-overflow-scrolling: touch;
    }

    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 2rem auto !important;
        border-radius: 20px;
        border: 1px solid var(--border-color);
        padding: 2rem 1.2rem 1.5rem 1.2rem;
        transform: translateY(10px);
        transition: transform 0.3s ease;
    }

    .close-btn {
        top: 0.8rem !important;
        right: 1rem !important;
        font-size: 1.8rem !important;
    }

    .modal.show .modal-content {
        transform: translateY(0);
    }

    .modal h2 {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
        text-align: center;
    }

    /* On mobile: disable modal resize, revert to natural height, let textarea resize vertically */
    .review-modal-content {
        width: 100% !important;
        height: auto !important;
        resize: none !important;
        overflow: visible !important;
    }

    #reviewModal #reviewInputBox {
        flex: none !important;
        height: 35vh !important;
        min-height: 200px !important;
        resize: vertical !important;
    }

    .category-selection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .category-chip {
        padding: 10px;
        font-size: 0.85rem;
    }

    /* Make buttons easier to tap */
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        margin-top: 0.5rem;
    }

    .step-actions {
        flex-direction: column;
        gap: 10px;
    }

    .step-actions button {
        width: 100%;
    }

    #subStepIndicator {
        order: -1;
        margin-bottom: 5px;
        text-align: center;
        width: 100%;
    }
}

/* Info Hub Styling */
.info-button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.info-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 3.5rem 2rem;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-btn-text {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 0.02em;
}

.info-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--theme-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 20px var(--theme-accent-glow);
}

.info-btn:active {
    transform: translateY(-2px);
}

.tuning-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 90px;
}

.tuning-btn i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.tuning-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.tuning-btn.active {
    background: var(--theme-accent);
    color: #000;
    border-color: var(--theme-accent);
    font-weight: 700;
}

.tuning-btn.active i {
    opacity: 1;
}

/* Risk Bar Styling */
.risk-bar-wrap {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-top: 2px;
    overflow: hidden;
}
.risk-bar {
    height: 100%;
    background: var(--theme-accent);
    transition: width 0.3s ease;
}
.tuning-btn.active .risk-bar {
    background: #000;
}


/* Enhanced Stats Page Styles */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--theme-accent), transparent);
    opacity: 0.5;
}

.stat-card:hover {
    transform: scale(1.05);
    border-color: var(--theme-accent);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.stat-card-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.02em;
}

.stat-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    font-weight: 700;
}

@media (max-width: 800px) {
    .info-button-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .info-btn {
        padding: 1.5rem;
    }
}

.info-main-title {
    font-size: 4rem;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
}

.info-subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.info-content-body {
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

@media (max-width: 800px) {
    .info-main-title {
        font-size: 1.6rem !important;
    }

    .info-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 1.5rem !important;
    }

    .info-btn {
        padding: 1.2rem !important;
    }

    .info-btn-text {
        font-size: 0.9rem !important;
    }
}


/* =========================================
   Universal Modal & Info Hub Refinement (ELITE UI)
========================================= */
.info-page {
    animation: fadeInHub 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInHub {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Premium Rating Accordion */
.rating-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 2rem;
    padding-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.rating-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
}

.rating-header-click {
    padding: 1.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.rating-score-label {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.score-num {
    font-size: 1.5rem;
    font-weight: 900;
    font-family: 'Plus Jakarta Sans', sans-serif;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    opacity: 0.95;
    letter-spacing: -0.02em;
}

.rating-item.open {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--theme-accent);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 20px rgba(var(--theme-accent-rgb), 0.1);
    transform: scale(1.02);
}

.rating-item.open .score-num {
    background: var(--theme-accent);
    color: #000;
    transform: rotate(-3deg) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.rating-content-pane {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.rating-item.open .rating-content-pane {
    max-height: 1000px;
    opacity: 1;
    padding: 0 1.5rem 2rem 1.5rem;
}

.rating-detail-list {
    list-style: none;
    padding: 1.5rem;
    margin: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rating-detail-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.rating-detail-list li:last-child {
    border-bottom: none;
}

.rating-detail-list li::before {
    content: '→';
    color: var(--theme-accent);
    font-weight: 900;
    margin-top: 2px;
}

.chevron-icon {
    font-size: 0.9rem;
    opacity: 0.3;
    transition: transform 0.4s ease;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 50%;
}

.rating-item.open .chevron-icon {
    transform: rotate(180deg);
    opacity: 1;
    background: var(--theme-accent);
    color: #000;
}

/* Tier Color Coding */
.rating-item:nth-child(1) .score-num {
    border-color: #f1c40f;
    color: #f1c40f;
}

/* 10 */
.rating-item:nth-child(2) .score-num {
    border-color: #f39c12;
    color: #f39c12;
}

/* 9 */
.rating-item:nth-child(3) .score-num {
    border-color: #3498db;
    color: #3498db;
}

/* 8 */
.rating-item:nth-child(4) .score-num {
    border-color: #2ecc71;
    color: #2ecc71;
}

/* 7 */
.rating-item:last-child .score-num {
    border-color: #e74c3c;
    color: #e74c3c;
}

/* 1 */

@media (max-width: 800px) {
    .info-main-title {
        font-size: 1.3rem !important;
        margin-bottom: 0.5rem !important;
    }

    .info-subtitle {
        font-size: 0.8rem !important;
        margin-bottom: 1.2rem !important;
    }

    .info-btn {
        padding: 1rem !important;
    }

    .info-btn-text {
        font-size: 0.85rem !important;
    }

    .rating-item {
        border-radius: 12px;
        margin-bottom: 8px;
    }

    .rating-header-click {
        padding: 0.8rem 0.6rem !important;
    }

    .score-num {
        width: 38px !important;
        height: 38px !important;
        font-size: 0.95rem !important;
        border-radius: 8px !important;
        min-width: 38px !important;
        gap: 0;
    }

    .score-title {
        font-size: 0.85rem !important;
    }

    .rating-item.open .rating-content-pane {
        padding: 0 0.8rem 1.2rem 0.8rem !important;
    }

    .rating-detail-list {
        padding: 0.8rem !important;
        border-radius: 10px !important;
    }

    .rating-detail-list li {
        font-size: 0.8rem !important;
        padding: 0.4rem 0 !important;
    }

    .chevron-icon {
        padding: 0.3rem !important;
        font-size: 0.6rem !important;
    }
}

.info-subtitle-sm {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    opacity: 0.8;
}

@media (max-width: 800px) {
    .info-subtitle-sm {
        font-size: 0.8rem;
        padding: 0 1rem;
    }

    /* Stats Page Mobile Enhancements - EXTREME COMPACTION */
    .stats-header {
        padding: 1.5rem 0.5rem !important;
    }
    .stats-header h2 {
        font-size: 1.6rem !important;
        margin-bottom: 0.2rem !important;
    }
    .stats-header p {
        font-size: 0.75rem !important;
    }
    
    /* Top "Total Entries" Card Row - Forced to TWO columns */
    .stats-hero-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.4rem !important;
        margin-bottom: 0.8rem !important;
    }
    .stat-card {
        padding: 0.6rem 0.3rem !important;
    }
    .stat-card-value {
        font-size: 1.4rem !important;
        margin-bottom: 0.2rem !important;
    }
    .stat-card-label {
        font-size: 0.5rem !important;
        letter-spacing: 0.05em !important;
    }
    
    /* Recently Discovered Mobile Overrides */
    #recentDiscoveryCard {
        grid-column: 1 / -1 !important; /* Full width row on mobile */
        padding: 1.2rem !important;
        gap: 1.2rem !important;
        min-height: 140px !important;
        background: linear-gradient(135deg, var(--bg-card), rgba(var(--theme-accent-rgb), 0.12)) !important;
        border: 1px solid rgba(var(--theme-accent-rgb), 0.2) !important;
    }
    .discovery-poster {
        width: 85px !important;
        height: 120px !important;
    }
    .discovery-title {
        white-space: normal !important; /* Allow wrap on mobile */
        font-size: 1.05rem !important;
    }
    .discovery-label {
        font-size: 0.55rem !important;
        margin-bottom: 0.2rem !important;
    }

    
    /* Distribution & Decade Breakdown - Stacked & Tighter */
    .stats-full-row {
        grid-template-columns: 1fr !important;
        gap: 0.6rem !important;
        margin-bottom: 0.6rem !important;
    }
    .stats-dist-card {
        padding: 0.6rem !important;
    }
    .stats-dist-title {
        font-size: 0.6rem !important;
        margin-bottom: 0.6rem !important;
    }
    .dist-bar-row {
        gap: 6px !important;
        margin-bottom: 0.2rem !important;
    }
    .dist-bar-label {
        font-size: 0.55rem !important;
        min-width: 30px !important;
    }
    .dist-bar-label-decade {
        min-width: 45px !important;
    }
    .dist-bar-track {
        height: 4px !important;
    }
    .dist-bar-count {
        font-size: 0.55rem !important;
        min-width: 15px !important;
    }
    
    /* Top Genres / Top Directors */
    .hof-accordion {
        margin-bottom: 0.6rem !important;
    }
    .hof-accordion-header {
        padding: 0.8rem 0.6rem !important;
    }
    .hof-accordion-title {
        font-size: 0.85rem !important;
    }
    .hof-subtitle-desktop {
        display: none !important; /* HIDE the massive text wall entirely on mobile! */
    }
    .hof-subtitle-mobile {
        display: block !important;
        font-size: 0.6rem !important;
        margin-top: 0.4rem !important;
        line-height: 1.3 !important;
        opacity: 0.8 !important;
    }
    .hof-entry {
        padding: 0.6rem 0.3rem !important;
    }
    .hof-entry-rank {
        font-size: 0.75rem !important;
        margin-right: 0.4rem !important;
        min-width: 12px !important;
    }
    .hof-entry-title {
        font-size: 0.8rem !important;
    }
    .hof-entry-score {
        font-size: 0.6rem !important;
        padding: 0.1rem 0.3rem !important;
    }

    /* Ultra-compact Example Pills */
    .example-pill-container {
        gap: 0.2rem !important;
        margin-top: 0.2rem !important;
    }
    .example-pill {
        padding: 0.1rem 0.3rem !important;
        border-radius: 4px !important;
        font-size: 0.55rem !important;
        box-shadow: none !important; /* Remove shadow to reduce visual noise on mobile */
    }
}
/* ==========================================================================
   RANKING MANAGER - ELITE REDESIGN (v207)
   ========================================================================== */

#rankingManagerModal .ranking-manager-content {
    max-width: 1200px;
    width: 96%;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    background: rgba(15, 14, 12, 0.96);
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8);
    position: relative;
}

#rankingManagerModal .ranking-manager-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: 10;
}

.ranking-manager-header {
    padding: 2.5rem 3rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to bottom, rgba(255,255,255,0.02), transparent);
}

.ranking-manager-header h2 {
    font-size: 2.4rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.ranking-manager-layout {
    display: grid;
    grid-template-columns: 1fr 450px; /* Enlarged scouting section */
    height: 60vh;
}

.ranking-manager-list-section {
    padding: 2rem 3rem;
    overflow-y: auto;
    background: rgba(0,0,0,0.4); /* Darker background to remove gray space */
}

.ranking-manager-add-section {
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2); /* Darker background */
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ranking-manager-add-section .search-container {
    margin-bottom: 1.5rem;
}

.sortable-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px; /* Slightly larger padding */
    background: rgba(0, 0, 0, 0.3); /* Darker background to remove gray space */
    border: 1px solid rgba(255, 255, 255, 0.05); /* Softer border */
    border-radius: 16px;
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--theme-accent-glow);
    transform: translateX(4px);
}

.ranking-item-handle {
    color: var(--text-secondary);
    opacity: 0.3;
    font-size: 1.2rem;
    cursor: grab;
}

.ranking-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--theme-accent);
    min-width: 45px;
    text-shadow: 0 0 15px var(--theme-accent-glow);
    font-style: italic;
    letter-spacing: -0.02em;
}

/* Mobile Disable State for Ranking Button */
@media (max-width: 1024px) {
    #manageRankingsBtn {
        opacity: 0.6;
        cursor: not-allowed;
        position: relative;
    }
    
    #manageRankingsBtn::after {
        content: 'Desktop Only';
        position: absolute;
        bottom: -15px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-secondary);
        white-space: nowrap;
    }
}

.ranking-item-info {
    flex: 1;
}

.ranking-item-title {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.ranking-item-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ranking-item-remove {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-secondary);
    opacity: 0.4;
    transition: all 0.2s;
}

.ranking-item:hover .ranking-item-remove {
    opacity: 1;
}

.ranking-item-remove:hover {
    background: rgba(231, 76, 60, 0.15);
    color: #ff6b6b;
}

/* Search Sidebar Results */
.ranking-search-results {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 5px;
}

.ranking-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.ranking-search-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--theme-accent-muted);
}

.ranking-search-item-info {
    flex: 1;
}

.ranking-search-item-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
}

.ranking-search-item-meta {
    font-size: 0.7rem;
    opacity: 0.5;
}

.ranking-search-item-plus {
    width: 28px;
    height: 28px;
    background: var(--theme-accent-muted);
    color: var(--theme-accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
}

.ranking-manager-footer {
    padding: 1.5rem 3rem;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ranking-item.sortable-ghost {
    opacity: 0;
}

.ranking-item.sortable-drag {
    background: var(--bg-surface);
    opacity: 1;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: var(--theme-accent);
    transform: scale(1.02);
}

@media (max-width: 900px) {
    .ranking-manager-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 280px;
        height: 75vh;
    }
    
.type-badge {
    display: none !important;
}

    .ranking-manager-add-section {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    .ranking-manager-header {
        padding: 1.5rem 2rem;
    }
    
    .ranking-manager-header h2 {
        font-size: 1.8rem;
    }
}

/* Unrated Sash (v250) */
.no-rating-sash {
    position: absolute;
    top: 15px;
    right: -35px;
    background: #ff4d4d;
    color: white;
    padding: 5px 40px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    transform: rotate(45deg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    z-index: 100;
    pointer-events: none;
    letter-spacing: 0.1em;
    border: 1px solid rgba(255,255,255,0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Suggestion Engine */
.suggestion-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.suggestion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(147, 112, 219, 0.15);
    border-color: rgba(147, 112, 219, 0.4);
}

.suggestion-poster {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.suggestion-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: #fff;
    font-weight: 600;
}

.suggestion-meta {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 0.75rem;
}

.suggestion-reason {
    font-size: 0.8rem;
    color: var(--theme-accent, #9370db);
    background: rgba(147, 112, 219, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-top: auto;
    width: 100%;
}

.suggestion-director {
    font-size: 0.85rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.suggestion-genres {
    font-size: 0.75rem;
    color: #64b4ff;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.suggestion-overview {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 1rem;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* --- Quick Info Overhaul (v250) --- */
.quick-info-content {
    max-width: 1000px; /* Enlarged profile */
    width: 94vw;
    background: rgba(10, 10, 14, 0.85) !important; /* Deepened for better contrast */

    backdrop-filter: blur(40px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
    border: 1px solid rgba(var(--theme-accent-rgb, 255, 255, 255), 0.25) !important; /* Decorated border */
    border-radius: 24px !important;
    padding: 0;
    overflow: hidden;
    box-shadow: 
        0 0 0 1px rgba(var(--theme-accent-rgb), 0.3),
        0 0 200px rgba(var(--theme-accent-rgb), 0.8), /* Intensified bloom */
        0 40px 100px rgba(0, 0, 0, 0.9) !important;

    position: relative;
    z-index: 10;
}


.modal-backdrop-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(60px) brightness(0.4);
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: -1;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 100%);
}

/* Desktop: side-by-side */
.quick-info-layout {
    display: flex;
    flex-direction: row;
    gap: 0;
    align-items: flex-start;  /* don't stretch — let poster dictate its own height */
}

/* Poster column: fixed width, shrinks to image height — no black box */
.quick-info-poster-wrap {
    flex-shrink: 0;
    width: 300px; /* Enlarged poster */
    position: relative;
    background: transparent;         /* no dark background since image fills it */
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    align-self: flex-start;          /* KEY: shrink to image height, no extra space below */
    overflow: hidden;
}

/* Image: fill the column, height auto = no crop, no bars */
.quick-info-poster {
    display: none;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    transition: transform 0.3s ease;
}

.quick-info-poster.loaded {
    display: block;
}

/* Details pane scrolls */
/* Details pane scrolls */
.quick-info-details {
    flex: 1;
    min-width: 0;
    padding: 2rem 2.2rem; /* Tighter padding to reduce empty space */
    overflow-y: auto;
    max-height: 84vh;
    display: flex;
    flex-direction: column;
}

/* Metadata Pills & Row */
.quick-info-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
    margin-top: 0.8rem;
    margin-bottom: 1.2rem;
}

.quick-info-meta-row .dot-separator {
    display: none !important; /* No dots, use pill spacing */
}

#quickInfoYear, 
#quickInfoRuntime, 
#quickInfoContentRating {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.5rem 1.2rem; /* Enlarged padding */
    border-radius: 99px;
    font-size: 0.9rem; /* Enlarged font size */
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

/* Rating & Director Pill Redesign */
.quick-info-rating-section {
    display: flex;
    flex-wrap: nowrap !important;
    justify-content: flex-start; /* Pulled closer together */
    align-items: center;
    gap: 1.5rem;
    margin: 2rem 0 2.5rem;
    width: 100%;
}




.rating-display, 
.director-display {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0.8rem 1.5rem !important; /* Enlarged padding */
    border-radius: 99px !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important; /* Enlarged gap */
    width: fit-content !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    margin: 0 !important;
}

.favorite-display {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0.8rem 1.5rem !important; /* Enlarged padding */
    border-radius: 99px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.6rem !important;
    flex: 1;
    min-width: 100px; /* Enlarged min-width */
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    margin: 0 !important;
    pointer-events: auto !important;
    z-index: 10;
    font-size: 0.9rem !important; /* Enlarged font size */
}



.favorite-display:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}


.rating-value {
    font-size: 1.6rem !important;
    margin: 0 !important;
}

.rating-label, 
.director-label {
    font-size: 0.75rem !important; /* Enlarged font size */
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    opacity: 0.5 !important;
    font-weight: 800 !important;
}

.director-name {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
}

/* Global Hover Glows for all Pills */
#quickInfoYear:hover, 
#quickInfoRuntime:hover, 
#quickInfoContentRating:hover, 
.rating-display:hover, 
.director-display:hover, 
#quickInfoGenres .genre-badge:hover, 
.type-badge:hover, 
.meta-chip:hover {
    box-shadow: 0 0 20px var(--theme-accent-glow) !important;
    border-color: var(--theme-accent) !important;
    transform: translateY(-2px);
    background: rgba(var(--theme-accent-rgb), 0.1) !important;
}

/* High Contrast Text Effects for Profile */
.quick-info-details h2,
.quick-info-details span,
.quick-info-details div,
.quick-info-details p,
.quick-info-details h3 {
    text-shadow: 
        -1px -1px 0 rgba(0,0,0,0.8),  
         1px -1px 0 rgba(0,0,0,0.8),
        -1px  1px 0 rgba(0,0,0,0.8),
         1px  1px 0 rgba(0,0,0,0.8),
         0 3px 6px rgba(0,0,0,0.9) !important;
}

.quick-info-overview {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    opacity: 0.9 !important;
    margin-top: 0.5rem !important;
}


/* Mobile: compact centered card, NOT a bottom sheet */
@media (max-width: 700px) {
    #quickInfoModal {
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }

    .quick-info-content {
        width: 85vw;
        max-width: 280px;
        border-radius: 20px;
        max-height: 70vh;
        overflow: hidden;
        position: relative;
        background: rgba(10, 10, 12, 0.88) !important;
        backdrop-filter: blur(10px);
        box-shadow: 0 0 80px var(--theme-accent), 0 20px 80px rgba(0, 0, 0, 0.9);
        margin: auto;
    }

    .quick-info-layout {
        flex-direction: column;
        align-items: stretch;
    }

    .rank-ribbon {
        font-size: 1.25rem !important;
        padding: 0.6rem 1.4rem !important;
        border-radius: 0 0 25px 0 !important;
        box-shadow: 4px 4px 15px rgba(0,0,0,0.6) !important;
        z-index: 10 !important; /* Force to the very front */
        position: absolute;
        top: 0;
        left: 0;
    }

    /* Poster: Now the background for the whole profile on mobile */
    .quick-info-poster-wrap {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        height: 100% !important;
        z-index: -1;
        opacity: 0.3; /* Increased slightly for visibility */
        border-radius: 0;
        background: #000;
    }

    .quick-info-poster {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        object-fit: cover !important;
        filter: blur(0px) saturate(1.1); /* Removed blur as requested */
    }

    #quickInfoType {
        display: none !important;
    }

    .quick-info-details {
        padding: 0.8rem !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-height: 70vh;
        overflow-y: auto;
        gap: 0.35rem;
        /* Theme-aware text glow for all details */
        text-shadow: 0 0 10px var(--theme-accent), 0 1px 4px rgba(0,0,0,0.9); 
    }

    .quick-info-header {
        background: rgba(255, 255, 255, 0.04);
        padding: 0.8rem;
        border-radius: 12px;
        width: 100%;
        margin-bottom: 0;
        border: 1px solid rgba(255, 255, 255, 0.03);
    }

    #quickInfoTitle {
        font-size: 1.4rem; /* Reduced for mobile — prevents long titles from overflowing */
        margin-bottom: 0.1rem;
        font-weight: 800;
        letter-spacing: 0.02em;
        line-height: 1.2;
        text-transform: none;
        opacity: 0.9;
        text-shadow: 0 0 10px rgba(var(--theme-accent-rgb), 0.6) !important;
    }


    .quick-info-meta-row {
        font-size: 0.65rem;
        gap: 0.4rem;
        color: #fff !important;
        opacity: 1;
        /* Thin black border via multi-shadow */
        text-shadow: 
            -1px -1px 0 #000,  
             1px -1px 0 #000,
            -1px  1px 0 #000,
             1px  1px 0 #000,
             0 0 10px var(--theme-accent); /* Keep themed glow too */
    }

    .quick-info-rating-section {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center;
        align-items: center;
        gap: 0.5rem !important;
        margin-bottom: 0.6rem;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        width: 100%;
    }

    .rating-display, .director-display, .favorite-display {
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        padding: 0.3rem 0.5rem !important; /* Even smaller to fit 3 pills */
        border-radius: 99px !important;
        display: flex !important;
        flex-direction: column !important; /* Always vertical on mobile */
        align-items: center !important;
        gap: 0.1rem !important;
        flex: 1;
        min-width: 0;
        justify-content: center;
    }


    .rating-display {
        flex-direction: column !important;
        gap: 0.1rem !important;
        padding: 0.35rem 0.8rem !important;
    }

    .rating-value {
        font-size: 0.95rem !important; /* Slightly smaller to fit /10 */
        font-weight: 800;
        line-height: 1;
    }



    .rating-display .rating-label {
        display: block !important;
        font-size: 0 !important; /* Hide original "Personal Rating" */
        opacity: 0.6 !important;
        text-transform: uppercase;
        font-weight: 700;
        margin-bottom: -1px;
    }

    .rating-display .rating-label::after {
        content: "Rating";
        font-size: 0.5rem !important;
    }



    .director-display {
        flex-direction: column !important; /* Label above name inside the pill */
        gap: 0.1rem !important;
        padding: 0.35rem 0.8rem !important;
    }

    .director-label {
        font-size: 0.5rem !important;
        opacity: 0.6 !important;
        text-transform: uppercase;
        font-weight: 700;
        margin-bottom: -1px;
    }

    .director-name {
        font-size: 0.75rem !important;
        font-weight: 700;
        color: #fff !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }


    .quick-info-header {
        margin-bottom: 0.6rem;
    }

    .quick-info-genres {
        gap: 0.25rem;
        margin-bottom: 0.4rem;
    }

    #quickInfoGenres .genre-badge {
        font-size: 0.7rem !important; /* Shrunk back down */
        padding: 4px 10px !important;
        background: rgba(var(--theme-accent-rgb), 0.3) !important;
        border: 1px solid var(--theme-accent) !important;
        color: #fff !important;
        text-shadow: 0 0 10px var(--theme-accent), 0 1px 4px #000 !important;
        font-weight: 700 !important;
        border-radius: 20px !important;
        display: inline-block !important;
        margin: 2px !important;
    }

    .quick-info-footer-actions {
        margin-top: 1rem;
    }

    .quick-info-overview,
    .quick-info-review {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .quick-info-review {
        padding: 0.8rem 1rem;
    }

    .section-title {
        font-size: 0.65rem;
        margin-bottom: 0.5rem;
    }

    #closeQuickInfoBtn {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1rem;
        width: 26px;
        height: 26px;
        z-index: 100;
    }
}

/* Header Section */
.quick-info-header {
    margin-bottom: 2rem;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    position: relative;
}

#quickInfoFavoritePill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.3rem 0.8rem !important;
    border-radius: 99px !important;
}

#quickInfoFavoritePill:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.2);
}




.header-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

#quickInfoSourceBtn {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.1rem;
    transition: color 0.2s;
    cursor: pointer;
}

#quickInfoSourceBtn:hover {
    color: var(--text-primary);
}

#quickInfoTitle {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    text-shadow: 
        0 0 15px rgba(var(--theme-accent-rgb), 0.7),
        0 0 30px rgba(var(--theme-accent-rgb), 0.4) !important; /* Multilayer theme glow */
    letter-spacing: -0.02em;
}



.quick-info-meta-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.dot-separator {
    opacity: 0.3;
}

.rating-chip {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Rating & Director Section */
.quick-info-rating-section {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rating-display {
    display: flex;
    flex-direction: column;
}

.rating-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--theme-accent);
}

.rating-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
    margin-top: -4px;
}

.director-display {
    display: flex;
    flex-direction: column;
}

.director-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.director-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Content Sections */
.section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--theme-accent);
    margin-bottom: 1rem;
    font-weight: 800;
}

.quick-info-overview-section,
.quick-info-review-section {
    margin-bottom: 2.5rem;
}

.quick-info-overview {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    opacity: 0.9;
}

.quick-info-review {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
    font-style: italic;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-left: 3px solid var(--theme-accent);
    border-radius: 0 12px 12px 0;
}

.quick-info-footer-actions {
    margin-top: 2rem;
}

.btn-primary-ghost {
    background: transparent;
    border: 1px solid var(--theme-accent);
    color: var(--theme-accent);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary-ghost:hover {
    background: var(--theme-accent);
    color: #000;
}

.genre-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.genre-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- End Quick Info v250 --- */



.suggestion-pass-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    z-index: 10;
}

.suggestion-pass-btn:hover {
    background: #ff4757;
    border-color: #ff4757;
    transform: scale(1.1);
}

/* --- Information Hub Mobile Redesign --- */
@media (max-width: 800px) {
    .info-page {
        padding: 1.5rem 1rem !important;
    }

    .info-main-title {
        font-size: 1.8rem !important;
        margin-bottom: 0.4rem !important;
    }

    .info-subtitle {
        font-size: 0.8rem !important;
        margin-bottom: 2rem !important;
        opacity: 0.7;
    }

    .hub-section-label {
        font-size: 0.55rem !important;
        letter-spacing: 0.18em !important;
        text-transform: uppercase !important;
        opacity: 0.4 !important;
        font-weight: 900 !important;
        margin: 2rem 0 0.8rem 0 !important;
        text-align: center !important;
        display: block !important;
    }

    /* 1. Media Type Switcher: PRIMARY - Large Cards */
    .hub-category-switcher {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.8rem !important;
        margin: 0 0 2rem 0 !important;
    }

    .hub-category-switcher .pill-tab {
        padding: 1.6rem 0.5rem !important; /* Very tall cards */
        font-size: 0.95rem !important;
        font-weight: 800 !important;
        border-radius: 16px !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        height: auto !important;
        width: 100% !important;
        text-transform: uppercase !important;
        letter-spacing: 0.08em !important;
    }

    /* Media Specific Active Glows - Intense for Primary */
    .hub-category-switcher .pill-tab[data-filter="Movies"].active {
        border-color: #3498db !important;
        box-shadow: 0 10px 30px rgba(52, 152, 219, 0.4) !important;
        background: rgba(52, 152, 219, 0.2) !important;
        transform: translateY(-2px) !important;
    }
    .hub-category-switcher .pill-tab[data-filter="TV Series"].active {
        border-color: #e74c3c !important;
        box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4) !important;
        background: rgba(231, 76, 60, 0.2) !important;
        transform: translateY(-2px) !important;
    }
    .hub-category-switcher .pill-tab[data-filter="Manga"].active {
        border-color: #2ecc71 !important;
        box-shadow: 0 10px 30px rgba(46, 204, 113, 0.4) !important;
        background: rgba(46, 204, 113, 0.2) !important;
        transform: translateY(-2px) !important;
    }
    .hub-category-switcher .pill-tab[data-filter="Anime"].active {
        border-color: #f1c40f !important;
        box-shadow: 0 10px 30px rgba(241, 196, 15, 0.4) !important;
        background: rgba(241, 196, 15, 0.2) !important;
        transform: translateY(-2px) !important;
    }

    /* 2. Info Buttons: SECONDARY - Compact Buttons */
    .info-button-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.6rem !important;
        margin-top: 0 !important;
    }

    .info-btn {
        padding: 0.8rem 0.5rem !important;
        font-size: 0.7rem !important; /* Smaller text */
        border-radius: 10px !important;
        min-height: 55px !important; /* Much shorter than media cards */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        background: rgba(255,255,255,0.02) !important;
        border: 1px solid rgba(255,255,255,0.04) !important;
        text-transform: none !important;
        letter-spacing: normal !important;
        font-weight: 500 !important;
    }

    .info-btn.active {
        background: rgba(255,255,255,0.08) !important;
        border-color: rgba(255,255,255,0.2) !important;
    }


    /* 3. Suggest Me Something: Compact & Themed Glow */
    #suggestMeBtn {
        grid-column: 1 / -1 !important;
        margin-top: 1.5rem !important;
        padding: 1.2rem !important;
        font-weight: 800 !important;
        font-size: 0.95rem !important;
        border-radius: 15px 15px 0 0 !important;
        /* Default theme glow */
        box-shadow: 0 0 25px var(--theme-accent-glow) !important;
        border: 1px solid var(--theme-accent) !important;
        background: rgba(var(--theme-accent-rgb), 0.1) !important;
    }

    #suggestionTuning {
        grid-column: 1 / -1 !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.4rem !important;
        padding: 0.6rem !important;
        margin-bottom: 2rem !important;
        border-radius: 0 0 15px 15px !important;
        border: 1px solid var(--theme-accent) !important;
        border-top: none !important;
        background: rgba(0,0,0,0.2) !important;
    }

    .tuning-btn {
        padding: 0.6rem 0.3rem !important;
        font-size: 0.65rem !important;
        border-radius: 8px !important;
        gap: 0.3rem !important;
    }

    .tuning-btn.active {
        background: var(--theme-accent) !important;
        color: #000 !important;
        box-shadow: 0 0 10px var(--theme-accent-glow) !important;
    }
}

/* --- Sliding Animations for Tabs --- */
.slide-out-left {
    animation: slideOutLeft 0.3s ease-in-out forwards;
}
.slide-out-right {
    animation: slideOutRight 0.3s ease-in-out forwards;
}
.slide-in-left {
    animation: slideInLeft 0.3s ease-in-out forwards;
}
.slide-in-right {
    animation: slideInRight 0.3s ease-in-out forwards;
}

@keyframes slideOutLeft {
    to { transform: translateX(-50px); opacity: 0; }
}
@keyframes slideOutRight {
    to { transform: translateX(50px); opacity: 0; }
}
@keyframes slideInLeft {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideInRight {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- Clipping Fix on Hover --- */
.main-content:has(.media-card:hover) {
    z-index: 2000;
    position: relative;
}

/* --- Recommendation Manager Modal --- */
.rec-mgr-filter {
    padding: 0.4rem 1rem;
    border-radius: 99px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.rec-mgr-filter:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}
.rec-mgr-filter.active {
    background: rgba(255,255,255,0.08); /* Fallback */
    border-color: var(--tab-color, var(--theme-accent));
    color: var(--tab-color, var(--theme-accent));
}
.rec-mgr-filter.active[data-type="Movies"] { background: rgba(229, 9, 20, 0.15); }
.rec-mgr-filter.active[data-type="TV Series"] { background: rgba(52, 152, 219, 0.15); }
.rec-mgr-filter.active[data-type="Manga"] { background: rgba(243, 156, 18, 0.15); }
.rec-mgr-filter.active[data-type="Anime"] { background: rgba(155, 89, 182, 0.15); }

.rec-mgr-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}
.rec-mgr-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
}
.rec-mgr-card-poster {
    width: 44px;
    height: 66px;
    background-size: cover;
    background-position: center;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.05);
}
.rec-mgr-card-info {
    flex: 1;
    min-width: 0;
}
.rec-mgr-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rec-mgr-card-meta {
    font-size: 0.78rem;
    color: var(--theme-accent);
    margin-top: 1px;
}
.rec-mgr-card-note {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rec-mgr-card-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}
.rec-mgr-btn {
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.rec-mgr-btn-watch {
    background: rgba(var(--theme-accent-rgb), 0.1);
    border-color: rgba(var(--theme-accent-rgb), 0.3);
    color: var(--theme-accent);
}
.rec-mgr-btn-watch:hover {
    background: var(--theme-accent);
    color: #000;
}
.rec-mgr-btn-delete {
    background: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.25);
    color: #e74c3c;
}
.rec-mgr-btn-delete:hover {
    background: #e74c3c;
    color: #fff;
}

/* --- Suggestion Retry Button Redesign --- */
#retrySuggestionBtn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#retrySuggestionBtn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--theme-accent);
    color: var(--theme-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--theme-accent-rgb), 0.2);
}

#retrySuggestionBtn:active {
    transform: translateY(0);
}

#retrySuggestionBtn i {
    transition: transform 0.3s ease;
}

#retrySuggestionBtn:hover i {
    transform: rotate(180deg);
}

