

:root {
    --bg-main: #141414;
    --bg-surface: #181818;
    --bg-surface-hover: #2F2F2F;
    --bg-glass: rgba(20, 20, 20, 0.95);
    --border-glass: rgba(255, 255, 255, 0.05);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
    
    --accent-red: #E50914;
    --accent-red-hover: #F40612;
    --accent-glow: rgba(229, 9, 20, 0.35);
    --accent-green: #2ecc71;
    
    --text-main: #ffffff;
    --text-muted: #b3b3b3;
    --text-dim: #808080;
    
    --radius-sm: 4px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --radius-full: 9999px;
    
    --shadow-main: 0 8px 16px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 25px rgba(229, 9, 20, 0.2);
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}


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

body {
    background-color: var(--bg-main);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Global Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}


svg[data-lucide] {
    width: 1.25em;
    height: 1.25em;
    stroke-width: 2.2;
    vertical-align: -0.2em;
    display: inline-block;
}
.icon-brand {
    color: var(--accent-red);
}
.icon-flame {
    color: #ff6b4a;
}
.icon-users {
    color: #3b82f6;
}
.icon-film {
    color: var(--accent-red);
}
.icon-check {
    color: var(--accent-green);
}
.icon-sm {
    width: 1em;
    height: 1em;
}
.hidden {
    display: none !important;
}


.full-screen-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.loader-content {
    text-align: center;
}
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-glass);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}


.glass-panel, .glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-main);
}

.glass-subcard {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}


.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2rem;
}
.brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.brand-icon {
    font-size: 2.2rem;
}
.brand-name {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 30%, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}
.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}


.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.input-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.input-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}
input:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(255, 46, 76, 0.15);
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.85rem 1.4rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}
.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 1.1rem 2rem; font-size: 1.1rem; border-radius: var(--radius-md); }

.btn-primary {
    background: var(--accent-red);
    color: #fff;
    box-shadow: none;
}
.btn-primary:hover {
    background: var(--accent-red-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.btn-glow {
    background: var(--accent-red);
    color: #fff;
    box-shadow: none;
}
.btn-glow:hover {
    background: var(--accent-red-hover);
    transform: scale(1.02);
}
@keyframes pulseGlow {
    0% { box-shadow: 0 0 25px rgba(255, 46, 76, 0.3); }
    100% { box-shadow: 0 0 45px rgba(255, 46, 76, 0.6); }
}

.btn-accent {
    background: rgba(255, 46, 76, 0.15);
    color: #ff6b81;
    border: 1px solid rgba(255, 46, 76, 0.3);
}
.btn-accent:hover {
    background: rgba(255, 46, 76, 0.3);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.btn-danger-ghost {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger-ghost:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-danger-outline {
    background: transparent;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
    margin-top: 1rem;
}
.btn-danger-outline:hover {
    background: #ef4444;
    color: #fff;
}

.btn-google {
    background: #fff;
    color: #1e293b;
    font-weight: 600;
}
.btn-google img {
    width: 18px;
    height: 18px;
}
.btn-google:hover {
    background: #f1f5f9;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.auth-divider::before, .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-glass);
}
.auth-divider span {
    padding: 0 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}
.link-btn {
    background: none;
    border: none;
    color: var(--accent-red);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}
.link-btn:hover {
    text-decoration: underline;
}


.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.main-content {
    width: 100%;
    margin: 0;
    padding: 0 0 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}


.top-nav {
    position: sticky;
    top: 0;
    z-index: 1100;
    width: 100%;
    margin: 0;
    border-radius: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
    border: none;
    box-shadow: none;
    transition: background 0.3s ease;
}
.nav-container {
    padding: 1rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent-red);
}
.nav-user-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-notif-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.user-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    font-size: 0.85rem;
}
.user-name {
    font-weight: 600;
}
.friend-code-chip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 46, 76, 0.12);
    color: #ff6b81;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.friend-code-chip:hover {
    background: rgba(255, 46, 76, 0.25);
}


.hero-section {
    padding: 6rem 3rem 4rem 3rem;
    position: relative;
    z-index: 100;
    background-image: linear-gradient(to right, rgba(20,20,20,0.95) 0%, rgba(20,20,20,0.4) 50%, transparent 100%),
                      url('https://image.tmdb.org/t/p/original/8rpDcsfLJypbO6vtec042zteT60.jpg');
    background-size: cover;
    background-position: center;
    border: none;
    box-shadow: inset 0 -40px 40px var(--bg-main);
    border-radius: var(--radius-lg);
    margin-top: -80px; /* Pull up under navbar */
}
.sync-section {
    padding: 1.75rem 3rem;
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}
.hero-grid {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.hero-text {
    flex: 1;
    max-width: 650px;
}
.add-movie-card {
    flex: 1;
    max-width: 400px;
}
.hero-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e50914;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    margin-bottom: 0;
    text-transform: uppercase;
}
.hero-badge .icon-brand {
    fill: #e50914;
}
.hero-text h1 {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.45);
    font-family: "Arial Black", impact, sans-serif;
    text-transform: uppercase;
}
.hero-text p {
    color: #fff;
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 2rem;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.45);
    max-width: 100%;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.btn-play, .btn-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 4px; /* Netflix uses slightly rounded corners */
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-play {
    background: #fff;
    color: #000;
}
.btn-play:hover {
    background: rgba(255,255,255,0.75);
}
.btn-info {
    background: rgba(109, 109, 110, 0.7);
    color: #fff;
}
.btn-info:hover {
    background: rgba(109, 109, 110, 0.4);
}


.add-movie-card .card-header-sm {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.add-movie-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
}
.card-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}
.search-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}


.sync-section {
    padding: 1.75rem 2rem;
}
.sync-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.sync-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sync-title h2 {
    font-size: 1.2rem;
    font-weight: 700;
}
.status-pill {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}
.sync-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.sync-form {
    display: flex;
    gap: 0.75rem;
    max-width: 400px;
}
.sync-form input {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
}
.active-partner-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
}
.partner-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}
.active-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
}


.section-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0 3rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}
.section-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.section-title-group h2 {
    font-size: 1.4rem;
    font-weight: 700;
}
.count-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.movie-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding: 10px 0.25rem 40px 0.25rem;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}
.movie-grid::-webkit-scrollbar {
    display: none;
}

.movie-card {
    background: var(--bg-surface);
    border: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.25s ease;
    position: relative;
    min-width: 180px;
    width: 180px;
    flex-shrink: 0;
}
.movie-card:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 28px rgba(0,0,0,0.8), 0 10px 10px rgba(0,0,0,0.8);
    z-index: 10;
}
.poster-container {
    width: 100%;
    aspect-ratio: 2/3;
    background: #0f1016;
    overflow: hidden;
    position: relative;
}
.poster-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.movie-card:hover .poster-container img {
    transform: scale(1.05);
}

.seen-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-green);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.movie-card-info {
    padding: 1rem;
}
.movie-card-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}
.added-by-tag {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.95rem;
}


.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.glass-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass-hover);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-main);
    width: 100%;
    max-width: 720px;
    position: relative;
    padding: 2rem;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    
    /* Beautiful Animation */
    transform: scale(0.9) translateY(40px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.modal-overlay.active .glass-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.modal-close-btn:hover {
    background: rgba(255, 46, 76, 0.2);
    color: #fff;
}

.modal-grid {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.modal-poster-wrapper {
    width: 220px;
    height: 330px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.modal-poster-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.modal-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}
.modal-details h2 {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}
.modal-tags {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.tag-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}
.tag-rating {
    background: rgba(255, 193, 7, 0.12);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.25);
}
.plot-box {
    margin-bottom: 1.5rem;
}
.plot-box h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}
.plot-box p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
    max-height: 140px;
    overflow-y: auto;
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}
.plot-box p::-webkit-scrollbar {
    display: none; 
}


.winner-card {
    max-width: 440px;
    text-align: center;
}
.winner-badge {
    color: var(--accent-red);
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}
.winner-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.winner-film-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #fff, #ff6b81);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.winner-poster-box {
    width: 200px;
    height: 300px;
    margin: 0 auto 1.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(255, 46, 76, 0.3);
}
.winner-poster-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.toast-stack {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 9999;
    pointer-events: none;
}
.nav-notif-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 1rem;
    width: 320px;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}
.toast-item {
    background: rgba(18, 20, 28, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-left: 4px solid var(--accent-red);
    color: #fff;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    pointer-events: auto;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.toast-item.success { border-left-color: var(--accent-green); }
.toast-item.warning { border-left-color: #f59e0b; }
.toast-item.fade-out { animation: toastOut 0.3s forwards; }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    to { transform: translateX(100%); opacity: 0; }
}


.trending-section {
    padding: 1.75rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}
.trending-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.trending-title-group {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.trending-title-group h2 {
    font-size: 1.3rem;
    font-weight: 700;
}
.time-toggle-pills {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 2px;
}
.pill-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pill-btn.active {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-hover));
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 46, 76, 0.3);
}

.trending-carousel-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}
.trending-carousel {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0.25rem 1rem;
    scroll-behavior: smooth;
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

#trendingCarousel {
    padding: 35px 0.25rem 35px;
}
.trending-carousel::-webkit-scrollbar {
    display: none; 
}


.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 42px;
    height: 75px;
    background: rgba(9, 10, 15, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass-hover);
    color: #fff;
    font-size: 2.2rem;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    opacity: 0.85;
}
.carousel-nav-btn:hover {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-hover));
    border-color: var(--accent-red);
    opacity: 1;
    box-shadow: 0 0 20px rgba(255, 46, 76, 0.4);
}
.carousel-nav-btn.prev {
    left: -1rem;
    border-radius: var(--radius-sm) var(--radius-md) var(--radius-md) var(--radius-sm);
}
.carousel-nav-btn.next {
    right: -1rem;
    border-radius: var(--radius-md) var(--radius-sm) var(--radius-sm) var(--radius-md);
}

.trending-card {
    min-width: 180px;
    width: 180px;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}
.numbered-item {
    position: relative;
    width: 270px;
    height: 270px;
    background: transparent;
    border: none;
    overflow: visible;
    flex-shrink: 0;
}
.number {
    position: absolute;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 1;
    left: -15px;
    font-size: 260px;
    font-weight: 900;
    line-height: 0;
    color: #000;
    -webkit-text-stroke: 4px #595959;
    font-family: impact, "Arial Narrow", sans-serif; /* Narrow font avoids wide 0 */
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
    letter-spacing: -0.2em;
}

.number-10 {
    left: -25px;
    letter-spacing: -0.12em;
    font-size: 220px;
}

.numbered-item .trending-poster {
    position: absolute;
    right: 0;
    width: 180px;
    height: 270px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    z-index: 2;
}
/* Removed custom spacing for 10 so it behaves exactly like 1-9 */
.trending-info {
    display: none; /* Hide text for all trending to focus on poster like Netflix */
}
.trending-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-glass-hover);
}
.trending-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.add-trending-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-red);
    color: white;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: transform 0.2s ease, background 0.2s ease;
}
.add-trending-btn:hover {
    transform: scale(1.15);
    background: var(--accent-red-hover);
}
/* Removed duplicate trending-info rules that were forcing display:flex */


.netflix-account-card {
    max-width: 640px;
    padding: 2.25rem;
}
.account-top-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
}
.net-avatar {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    color: #fff;
    font-size: 2.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    text-transform: uppercase;
    transition: transform 0.3s ease;
}
.account-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.plan-badge {
    background: rgba(229, 9, 20, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(229, 9, 20, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.friend-code-chip-lg {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.2s;
}
.friend-code-chip-lg:hover {
    background: rgba(255, 46, 76, 0.15);
    color: #fff;
    border-color: rgba(255, 46, 76, 0.3);
}


.settings-nav-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.tab-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.04);
}
.tab-btn.active {
    color: #fff;
    background: rgba(255, 46, 76, 0.15);
    border: 1px solid rgba(255, 46, 76, 0.3);
}

.tab-pane {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


.avatar-color-picker {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.color-dot {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s;
}
.color-dot:hover {
    transform: scale(1.15);
}
.color-dot.active {
    border-color: #fff;
    box-shadow: 0 0 12px rgba(255,255,255,0.5);
}


.settings-section h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.setting-title {
    font-size: 0.9rem;
    font-weight: 600;
}
.setting-desc {
    font-size: 0.78rem;
    color: var(--text-dim);
}


.switch-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255,255,255,0.15);
    transition: .3s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--accent-red);
}
input:checked + .slider:before {
    transform: translateX(20px);
}

.account-modal-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: flex-end;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
}
.stat-card {
    text-align: center;
    padding: 0.9rem 0.4rem;
}
.stat-icon {
    color: var(--accent-red);
    margin-bottom: 0.25rem;
}
.stat-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
}
.stat-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.15rem;
}


.streaming-providers-box {
    margin-bottom: 1.25rem;
}
.streaming-providers-box h4 {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.providers-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.provider-badge {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
}
.provider-badge.provider-link {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.provider-badge.provider-link:hover {
    background: rgba(255, 46, 76, 0.2);
    border-color: rgba(255, 46, 76, 0.4);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 46, 76, 0.25);
}
.provider-logo {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: cover;
}
.no-providers {
    font-size: 0.82rem;
    color: var(--text-dim);
    font-style: italic;
}


.hero-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}
.glass-select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-glass-hover);
    border-radius: var(--radius-md);
    color: var(--text-main);
    padding: 0.85rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.2s;
}
.glass-select:focus, .glass-select:hover {
    border-color: var(--accent-red);
    box-shadow: 0 0 15px rgba(255, 46, 76, 0.2);
}
.glass-select option {
    background: #12141c;
    color: #fff;
}

.trailer-card {
    max-width: 840px;
    width: 95%;
    padding: 1.25rem;
    background: rgba(10, 11, 15, 0.95);
    border-color: var(--accent-red);
}
.trailer-iframe-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
}
.trailer-iframe-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}


.search-form-wrapper {
    position: relative;
    width: 100%;
}
.search-input-group {
    display: flex;
    gap: 0.75rem;
}
.search-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: rgba(14, 16, 22, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass-hover);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 45px rgba(0,0,0,0.9);
    z-index: 1000;
    max-height: 340px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 46, 76, 0.4) transparent;
}
.search-suggestions-dropdown::-webkit-scrollbar {
    width: 4px;
}
.search-suggestions-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.search-suggestions-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 46, 76, 0.4);
    border-radius: 4px;
}
.search-suggestions-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--border-glass);
    cursor: pointer;
    transition: background 0.2s ease;
}
.suggestion-item:last-child {
    border-bottom: none;
}
.suggestion-item:hover {
    background: rgba(255, 46, 76, 0.15);
}
.suggestion-poster {
    width: 36px;
    height: 54px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.suggestion-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.suggestion-title {
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}
.suggestion-meta {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.15rem;
}
.suggestion-add-btn {
    background: rgba(255, 46, 76, 0.18);
    color: #ff6b81;
    border: 1px solid rgba(255, 46, 76, 0.3);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.suggestion-add-btn:hover {
    background: var(--accent-red);
    color: #fff;
    transform: scale(1.1);
}


.match-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.35);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
}


.ai-modal-card {
    max-width: 600px;
    padding: 1.75rem;
}
.ai-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
}
.ai-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.ai-chat-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 320px;
    overflow-y: auto;
    margin: 1.25rem 0;
    padding-right: 0.5rem;
}
.ai-msg {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    line-height: 1.5;
    max-width: 90%;
}
.bot-msg {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    align-self: flex-start;
}
.user-msg {
    background: rgba(255, 46, 76, 0.2);
    border: 1px solid rgba(255, 46, 76, 0.35);
    color: #fff;
    align-self: flex-end;
}
.ai-input-wrapper {
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 1rem;
}
.ai-input-wrapper input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass-hover);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
}


.notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px var(--accent-red);
}
.notif-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 290px;
    background: rgba(14, 16, 22, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass-hover);
    border-radius: var(--radius-md);
    box-shadow: 0 15px 35px rgba(0,0,0,0.85);
    z-index: 2000;
    padding: 0.85rem;
}
.notif-header {
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 0.5rem;
}
.notif-item {
    padding: 0.55rem;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.8rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.notif-item:last-child {
    border-bottom: none;
}
.notif-item:hover {
    background: rgba(255,255,255,0.05);
}


.cast-box {
    margin-bottom: 1.25rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
.cast-box h4 {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}
.cast-list {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    padding-bottom: 0.4rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 46, 76, 0.4) transparent;
}
.cast-list::-webkit-scrollbar {
    height: 4px;
}
.cast-list::-webkit-scrollbar-thumb {
    background: rgba(255, 46, 76, 0.4);
    border-radius: 4px;
}
.cast-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 70px;
    flex-shrink: 0;
}
.cast-photo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-glass);
    margin-bottom: 0.35rem;
}
.cast-actor-name {
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.avatar-preset-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}
.avatar-preset-btn:hover {
    background: rgba(255, 46, 76, 0.2);
    border-color: rgba(255, 46, 76, 0.4);
    transform: translateY(-2px);
}
.user-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.user-avatar-emoji {
    font-size: 1.8rem;
    line-height: 1;
}


.main-footer {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-glass);
    margin-top: 4rem;
}
.main-footer strong {
    color: var(--text-muted);
}

/* ==========================================
   SUPER FLUID UX ENHANCEMENTS
   ========================================== */

html {
    scroll-behavior: smooth;
}

/* Buttons */
.btn, button, .link-btn, .nav-btn, .icon-btn, .color-dot {
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4), 0 0 15px var(--accent-glow);
}

/* Inputs */
input, textarea, select {
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}
input:focus, textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2), 0 0 0 1px var(--accent-red);
}

/* Movie Cards */
.movie-card {
    transition: all 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.movie-card:hover {
    transform: translateY(-8px) scale(1.03) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(255, 46, 76, 0.15) !important;
    border-color: var(--border-glass-hover) !important;
}
.movie-card:hover .poster-container img {
    transform: scale(1.08) !important;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

/* Glass Panels */
.glass-panel, .glass-card, .glass-subcard {
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}
.glass-card:hover, .glass-subcard:hover {
    transform: translateY(-3px);
    border-color: var(--border-glass-hover);
    background: var(--bg-surface-hover);
}

/* Modals */
.modal-overlay {
    transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}


/* ==========================================
   LIGHT MODE 
   ========================================== */

body.light-mode {
    --bg-main: #f0f2f5;
    --bg-surface: rgba(255, 255, 255, 0.85);
    --bg-surface-hover: rgba(255, 255, 255, 1);
    --accent-red: #e11d48;
    --accent-red-hover: #be123c;
    --accent-glow: rgba(225, 29, 72, 0.3);
    --text-main: #111827;
    --text-dim: #4b5563;
    --text-muted: #9ca3af;
    --border-glass: rgba(0, 0, 0, 0.1);
    --border-glass-hover: rgba(0, 0, 0, 0.2);
}

body.light-mode .bottom-nav {
    background: rgba(255, 255, 255, 0.9);
    border-top-color: rgba(0,0,0,0.1);
}
body.light-mode .nav-btn {
    color: var(--text-dim);
}
body.light-mode .nav-btn.active {
    color: var(--accent-red);
}
body.light-mode .modal-overlay {
    background: rgba(255, 255, 255, 0.3);
}
body.light-mode .glass-modal, body.light-mode .bottom-sheet {
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
body.light-mode .glass-card {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
body.light-mode input {
    background: rgba(0,0,0,0.05);
    color: var(--text-main);
    border-color: rgba(0,0,0,0.1);
}
body.light-mode .ai-msg.bot-msg {
    background: rgba(0,0,0,0.05);
}
/* ==========================================
   MOBILE OPTIMIZATION (Responsive Design)
   ========================================== */

@media (max-width: 768px) {
    /* Navbar */
    .nav-user-actions {
        gap: 0.5rem;
    }
    .user-pill {
        padding: 0.35rem 0.6rem;
    }
    .user-name, 
    .friend-code-chip,
    #logoutBtn {
        display: none !important; /* Nascondi su schermi piccoli per far spazio e non spaccare il layout */
    }
    .nav-container {
        padding: 1rem 1.25rem;
    }
    .hero-section {
        padding: 6rem 1.25rem 3rem 1.25rem;
    }
    .sync-section, .trending-section {
        padding: 1.25rem 1.25rem;
    }
    .section-top {
        padding: 0 1.25rem;
    }
    .movie-grid {
        padding: 10px 1.25rem 20px 1.25rem;
    }
    .modal-overlay {
        padding: 1rem;
    }

    /* Hero Section */
    .hero-grid {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .hero-text h1 {
        font-size: 2.2rem;
    }
    .hero-text p {
        margin: 0 auto 1.5rem auto;
        font-size: 0.95rem;
    }
    .hero-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero-actions .btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 140px;
        justify-content: center;
    }
    
    /* Sync Form / Partner Banner */
    .sync-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .sync-form {
        flex-direction: column;
        max-width: 100%;
    }
    .active-partner-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    /* Movie Grid (Horizontal Scroll on Mobile) */
    .movie-grid {
        padding: 10px 1.5rem 20px 1.5rem;
    }
    
    /* Modals (Dettagli Film) */
    .modal-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        margin-top: 2rem; /* Spazio per la X di chiusura */
    }
    .modal-poster-wrapper {
        width: 100%;
        max-width: 280px;
        height: auto;
        aspect-ratio: 2 / 3;
        margin: 0 auto;
        border-radius: var(--radius-lg);
        box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    }
    .modal-details {
        text-align: center;
    }
    .modal-tags {
        justify-content: center;
        flex-wrap: wrap;
    }
    .modal-actions {
        flex-direction: column;
        width: 100%;
    }
    .modal-actions .btn {
        width: 100%;
    }
    /* Modals & Dropdowns (Full Screen on Mobile) */
    .modal-overlay {
        padding: 0;
    }
    .glass-modal {
        padding: 2.5rem 1.5rem 1.5rem 1.5rem; /* Notch safety */
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        border: none;
        width: 100vw;
        max-width: 100vw;
    }
    .modal-close-btn {
        top: 1rem;
        right: 1rem;
        z-index: 10;
    }
    .notif-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw;
        height: auto;
        max-height: 85vh;
        border-radius: 24px 24px 0 0;
        border: none;
        border-top: 1px solid var(--border-glass-hover);
        z-index: 2000;
        padding: 1.5rem;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.8);
    }
    
    /* Auth Screen */
    .auth-card {
        padding: 1.5rem;
    }
    .brand-name {
        font-size: 1.5rem;
    }
    
    /* Generics */
    .section-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .main-footer {
        padding-bottom: 6rem; /* Spazio extra per la bottom-nav */
    }
    /* Profile Settings Modal */
    .netflix-account-card {
        padding: 1rem;
    }
    .account-top-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .settings-nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    .setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ==========================================
   LIGHT MODE (.light-mode)
   ========================================== */
body.light-mode {
    --bg-main: #f8f9fa;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --border-glass: rgba(0, 0, 0, 0.1);
    --border-glass-hover: rgba(0, 0, 0, 0.2);
    
    --text-main: #1e293b;
    --text-muted: #475569;
    --text-dim: #64748b;
    
    --shadow-main: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(229, 9, 20, 0.15);
    
    background-color: var(--bg-main);
    color: var(--text-main);
}

body.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}
body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}

body.light-mode .top-nav {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

body.light-mode .hero-section {
    box-shadow: inset 0 -40px 40px var(--bg-main);
}

body.light-mode .hero-text h1,
body.light-mode .hero-text p,
body.light-mode .hero-badge {
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    color: #fff; /* Hero text must stay white to be visible against the movie poster background */
}

body.light-mode .hero-badge {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255,255,255,0.2);
}

body.light-mode .hero-actions .btn-ghost {
    color: #fff;
}
body.light-mode .hero-actions .btn-ghost:hover {
    background: rgba(255,255,255,0.1);
}

body.light-mode .search-suggestions-dropdown {
    background: #ffffff;
    border-color: var(--border-glass);
}
body.light-mode .suggestion-title {
    color: var(--text-main);
}
body.light-mode .suggestion-item:hover {
    background: var(--bg-surface-hover);
}

body.light-mode .notif-dropdown {
    background: #ffffff;
    border-color: var(--border-glass);
    color: var(--text-main);
}
body.light-mode .notif-header {
    color: var(--text-main);
}
body.light-mode .notif-item:hover {
    background: var(--bg-surface-hover);
}

body.light-mode .glass-modal,
body.light-mode .auth-card,
body.light-mode .glass-subcard {
    background: var(--bg-surface);
    color: var(--text-main);
}

body.light-mode .nav-notif-btn {
    background: var(--bg-surface);
    border-color: var(--border-glass-hover);
    color: var(--text-main);
}

body.light-mode .glass-select {
    background: #ffffff;
    color: var(--text-main);
    border-color: var(--border-glass-hover);
}
body.light-mode .glass-select option {
    background: #ffffff;
    color: var(--text-main);
}

body.light-mode input[type="text"],
body.light-mode input[type="email"],
body.light-mode input[type="password"] {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-glass-hover);
}

body.light-mode .brand-name {
    background: none;
    -webkit-text-fill-color: var(--accent-red);
}

body.light-mode .movie-card-info h3,
body.light-mode .trending-info h4 {
    color: var(--text-main);
}

body.light-mode .cast-actor-name {
    color: var(--text-main);
}


