/* ============================================================
   MovieTadka — Common Stylesheet
   Shared by all pages via _Layout.cshtml
   ============================================================ */

/* ===== CSS VARIABLES =====
   Theme colours now live in theme-night.css / theme-day.css, scoped to
   :root[data-theme="night"|"day"] and toggled via the navbar sun/moon icon.
   The block below is a NIGHT fallback used only if no data-theme is set
   (e.g. JS disabled), so the page never renders unstyled. */
:root {
    --gold:    #F5A623;
    --gold-dark: #C47D0E;
    --red:     #E8192C;
    --green:   #22c55e;
    --bg:      #0A0A0F;
    --bg2:     #111118;
    --bg3:     #1A1A25;
    --card:    #161622;
    --text:    #F0EFE9;
    --muted:   #8A8999;
    --border:  rgba(245,166,35,0.15);
    --border2: rgba(240,239,233,0.1);
    --nav-bg:  rgba(10,10,15,0.97);
}

/* Smooth cross-fade when switching day <-> night */
body, nav, footer, .movie-card, .field input, .field select,
.page-hero, .logo-strip, .modal, .tabs, .tab {
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; }
body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== TICKER ===== */
.ticker {
    background: var(--gold);
    color: #000;
    padding: 6px 0;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    max-width: 100vw;
}
.ticker-inner {
    display: inline-block;
    animation: ticker 250s linear infinite;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    will-change: transform;
}
.ticker-inner span { margin: 0 40px; }
@keyframes ticker {
    0%   { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* ===== NAVBAR ===== */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 5%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}
.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo img { height: 44px; width: auto; object-fit: contain; display: block; flex-shrink: 0; }
.nav-logo-name { font-family: 'Bebas Neue', cursive; font-size: 22px; color: var(--gold); letter-spacing: 1px; line-height: 1; white-space: nowrap; }

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: .2s;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
    background: rgba(245,166,35,0.08);
}

.nav-user { display: flex; align-items: center; gap: 8px; }

/* Groups the auth button + theme toggle (+ hamburger) on the right,
   so the Login/Sign Up button sits right beside the theme switch. */
.nav-right { display: flex; align-items: center; gap: 12px; }

.nav-btn {
    background: var(--gold);
    color: #000;
    border: none;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}
.nav-btn:hover { background: var(--gold-dark); }

.nav-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border2);
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: .2s;
}
.nav-ghost:hover { color: var(--text); border-color: var(--border); }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}
.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    display: block;
    transition: .3s;
}

/* ===== MOBILE BACKDROP ===== */
.mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    z-index: 101;
    cursor: pointer;
}
.mobile-backdrop.open { display: block; }

/* ===== MOBILE MENU ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(80vw, 320px);   /* slide-in drawer — no longer full-screen */
    background: var(--bg2);
    border-left: 1px solid var(--border);
    z-index: 102;
    flex-direction: column;
    padding: 70px 5% 40px;
    gap: 2px;
    overflow-y: auto;
    box-shadow: -8px 0 32px rgba(0,0,0,0.5);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
    padding: 13px 8px;
    border-bottom: 1px solid var(--border);
    border-radius: 8px;
    transition: .15s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { background: rgba(255,255,255,0.04); }
.mobile-menu a.active {
    color: var(--gold);
    background: rgba(245,166,35,0.10);
}

/* ===== MOBILE MENU CLOSE BUTTON ===== */
.mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg3);
    border: 1px solid var(--border2);
    color: var(--muted);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    flex-shrink: 0;
    line-height: 1;
}
.mobile-menu-close:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

/* ===== MOBILE USER BAR ===== */
.mobile-user-bar {
    padding: 12px 8px;
    color: var(--muted);
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    background: rgba(245,166,35,0.06);
    border-radius: 8px;
    margin-bottom: 4px;
}
.mobile-user-bar strong { color: var(--gold); }

/* ===== MOBILE LOGOUT LINK ===== */
.mobile-logout {
    color: #ff6b7a !important;
    margin-top: 8px;
}

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
    background: linear-gradient(135deg, var(--bg2), var(--bg3));
    padding: 44px 5% 0;
    border-bottom: 1px solid var(--border);
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--muted);
}
.breadcrumb a { color: var(--gold); text-decoration: none; }
.page-hero h1 {
    font-family: 'Bebas Neue', cursive;
    font-size: 48px;
    margin-bottom: 6px;
}
.page-hero h1 em { color: var(--gold); font-style: normal; }
.page-hero p   { color: var(--muted); font-size: 14px; padding-bottom: 28px; }

/* ===== COMMON BUTTONS ===== */
.btn-primary {
    background: var(--gold);
    color: #000;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary:hover { background: var(--gold-dark); transform: translateY(-2px); }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(240,239,233,0.2);
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ===== FOOTER ===== */
footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 50px 5% 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-logo { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.footer-logo img { height: 48px; width: auto; object-fit: contain; display: block; flex-shrink: 0; }
.footer-logo-name { font-family: 'Bebas Neue', cursive; font-size: 24px; color: var(--gold); letter-spacing: 1px; line-height: 1.1; }
.footer-desc  { color: var(--muted); font-size: 13px; line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.social-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--bg3);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    transition: .2s;
    text-decoration: none;
}
.social-icon:hover { background: var(--gold); color: #000; border-color: var(--gold); }

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 16px;
}
.footer-col a {
    display: block;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 10px;
    transition: .2s;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom p { color: var(--muted); font-size: 12px; }

/* ===== COMMON FORM ELEMENTS ===== */
.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 8px;
}
.field input,
.field select {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: 11px;
    padding: 13px 16px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    transition: .2s;
}
.field input:focus,
.field select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245,166,35,0.08);
}
.field input::placeholder { color: var(--muted); }

/* ===== NOTICE / ALERT BAR ===== */
.notice-bar {
    background: rgba(232,25,44,0.08);
    border: 1px solid rgba(232,25,44,0.22);
    border-radius: 10px;
    padding: 12px 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #ff8a95;
    margin-bottom: 20px;
    flex-wrap: wrap;
    word-break: break-word;
}

/* ===== THEME TOGGLE (sun / moon) ===== */
.theme-toggle {
    background: var(--bg3);
    border: 1px solid var(--border2);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    transition: background .2s, border-color .2s, transform .2s;
}
.theme-toggle:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: rotate(18deg) scale(1.08);
}
/* Show the correct glyph for the active theme (set via data-theme on <html>) */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: inline; }
:root[data-theme="day"] .theme-toggle .icon-sun  { display: inline; }
:root[data-theme="day"] .theme-toggle .icon-moon { display: none; }

/* In-drawer (mobile) variant sits inline as a full-width row */
.mobile-menu .theme-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 16px;
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 36px;
    margin-bottom: 6px;
}
.section-title span { color: var(--gold); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links      { display: none; }
    .hamburger      { display: flex; }
    /* Desktop toggle hidden on mobile — it lives in the hamburger drawer instead */
    .nav-theme-toggle { display: none !important; }
    /* Hide entire desktop user section (both logged-in and logged-out variants).
       Uses !important so late-loading inline styles (e.g. .nav-user-info{display:flex})
       cannot override this and leak the desktop bar onto mobile. */
    .nav-user       { display: none !important; }
    .nav-user-info  { display: none !important; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .page-hero h1 { font-size: 36px; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    footer { padding: 30px 5% 16px; }
    .logo img { height: 34px; }
}
