/* ============================================================
   BOOK FLICKS — design tokens
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #0d0d10;
    --surface: #1a1c22;
    --surface-raised: #22242c;
    --cream: #f5f0e6;
    --cream-dim: #b9b6ad;
    --red: #e63946;
    --red-dim: #a72833;
    --gold: #f2b705;
    --border: #2c2e38;

    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--cream);
    font-family: var(--font-body);
    scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, .display {
    font-family: var(--font-display);
    letter-spacing: 0.03em;
    font-weight: 400;
    line-height: 1.05;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ------------------------------------------------------------
   NAVBAR
   ------------------------------------------------------------ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13,13,16,0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.brand {
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand .dot { color: var(--red); }
.nav-links { display: flex; gap: 28px; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.nav-links a { color: var(--cream-dim); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

/* ------------------------------------------------------------
   HERO MARQUEE SLIDER
   ------------------------------------------------------------ */
.hero-slider {
    position: relative;
    height: 78vh;
    min-height: 480px;
    overflow: hidden;
    border-bottom: 4px solid var(--gold);
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .7s ease;
    display: flex;
    align-items: flex-end;
    background: var(--bg);
}
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    filter: brightness(0.55) saturate(1.05);
}
.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--bg) 2%, rgba(13,13,16,0.55) 45%, rgba(13,13,16,0.15) 75%);
}
.hero-slide-content {
    position: relative;
    z-index: 2;
    padding: 0 24px 56px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(242,183,5,0.1);
    border: 1px solid rgba(242,183,5,0.35);
    padding: 5px 12px;
    border-radius: 100px;
    margin-bottom: 16px;
}
.hero-title {
    font-size: clamp(42px, 6.5vw, 88px);
    color: var(--cream);
    text-shadow: 0 4px 30px rgba(0,0,0,0.5);
    max-width: 780px;
}
.hero-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin: 18px 0 22px;
    font-size: 14px;
    color: var(--cream-dim);
    font-weight: 500;
}
.hero-meta span { display: flex; align-items: center; gap: 6px; }
.hero-synopsis {
    max-width: 620px;
    color: var(--cream-dim);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 26px;
}
.hero-actions { display: flex; gap: 14px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
    background: var(--red);
    color: #fff;
    box-shadow: 0 8px 24px rgba(230,57,70,0.35);
}
.btn-primary:hover { background: #f04150; transform: translateY(-2px); }
.btn-ghost {
    background: rgba(245,240,230,0.08);
    color: var(--cream);
    border: 1px solid rgba(245,240,230,0.25);
}
.btn-ghost:hover { background: rgba(245,240,230,0.16); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* slide dots / arrows */
.hero-dots {
    position: absolute;
    z-index: 3;
    bottom: 22px;
    right: 24px;
    display: flex;
    gap: 8px;
}
.hero-dot {
    width: 34px;
    height: 4px;
    border-radius: 4px;
    background: rgba(245,240,230,0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background .2s;
}
.hero-dot.active { background: var(--gold); }
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(13,13,16,0.5);
    border: 1px solid rgba(245,240,230,0.2);
    color: var(--cream);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-arrow:hover { background: rgba(13,13,16,0.8); }
.hero-arrow.prev { left: 24px; }
.hero-arrow.next { right: 24px; }

/* ------------------------------------------------------------
   SECTIONS / MOVIE GRID
   ------------------------------------------------------------ */
.section { padding: 64px 0; }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
}
.section-title {
    font-size: 34px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title .bar { width: 5px; height: 26px; background: var(--red); display: inline-block; border-radius: 3px; }
.tabs { display: flex; gap: 8px; background: var(--surface); padding: 4px; border-radius: 100px; }
.tab {
    padding: 9px 18px;
    border-radius: 100px;
    background: transparent;
    color: var(--cream-dim);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: none;
}
.tab.active { background: var(--red); color: #fff; }

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 26px;
}
.movie-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform .2s ease, border-color .2s ease;
    display: flex;
    flex-direction: column;
}
.movie-card:hover { transform: translateY(-6px); border-color: var(--gold); }
.movie-poster {
    aspect-ratio: 2/3;
    width: 100%;
    object-fit: cover;
    background: #000;
}
.movie-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.movie-card-title { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.02em; }
.movie-card-genre { font-size: 12px; color: var(--cream-dim); }
.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 9px;
    border-radius: 5px;
    background: rgba(242,183,5,0.15);
    color: var(--gold);
    width: fit-content;
}
.badge.soon { background: rgba(230,57,70,0.15); color: var(--red); }
.movie-card-actions { margin-top: auto; padding-top: 8px; }

/* ------------------------------------------------------------
   MOVIE DETAILS PAGE
   ------------------------------------------------------------ */
.detail-hero {
    position: relative;
    padding: 64px 0 48px;
    border-bottom: 1px solid var(--border);
}
.detail-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 15%;
    filter: brightness(0.28) blur(2px);
}
.detail-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13,13,16,0.4), var(--bg) 95%);
}
.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
}
.detail-poster {
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border: 1px solid var(--border);
}
.detail-title { font-size: clamp(36px, 5vw, 58px); margin-bottom: 12px; }
.detail-meta-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--cream-dim); margin-bottom: 18px; }
.detail-meta-row strong { color: var(--cream); }
.detail-synopsis { color: var(--cream-dim); line-height: 1.7; max-width: 700px; margin-bottom: 10px; }
.detail-cast { font-size: 14px; color: var(--cream-dim); margin-bottom: 24px; }
.detail-cast strong { color: var(--cream); }

.showtime-picker { margin-top: 8px; }
.date-tabs { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.date-tab {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--cream-dim);
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    min-width: 76px;
}
.date-tab.active { background: var(--red); border-color: var(--red); color: #fff; }

.showtime-group { margin-bottom: 20px; }
.hall-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cream-dim); margin-bottom: 10px; }
.showtime-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.showtime-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--cream);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all .15s;
}
.showtime-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ------------------------------------------------------------
   SEAT SELECTION
   ------------------------------------------------------------ */
.booking-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}
.screen-wrap { text-align: center; margin-bottom: 36px; }
.screen {
    width: 80%;
    margin: 0 auto 8px;
    height: 8px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(242,183,5,0.35);
}
.screen-label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream-dim); }

.seat-map { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.seat-row { display: flex; align-items: center; gap: 10px; }
.row-label { width: 18px; font-size: 12px; color: var(--cream-dim); font-weight: 700; }
.seat {
    width: 30px;
    height: 30px;
    border-radius: 7px 7px 10px 10px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--cream-dim);
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all .12s;
}
.seat.regular:not(.booked):not(.selected):hover { border-color: var(--cream-dim); color: var(--cream); }
.seat.premium { background: #2a2411; border-color: #6b5c1a; color: var(--gold); }
.seat.premium:not(.booked):not(.selected):hover { border-color: var(--gold); }
.seat.selected { background: var(--red); border-color: var(--red); color: #fff; transform: scale(1.08); }
.seat.booked { background: #24252a; border-color: #24252a; color: #4a4c54; cursor: not-allowed; }
.seat-gap { width: 18px; }

.legend { display: flex; gap: 22px; justify-content: center; margin-top: 26px; flex-wrap: wrap; font-size: 12px; color: var(--cream-dim); }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend .swatch { width: 16px; height: 16px; border-radius: 4px 4px 6px 6px; display: inline-block; }

/* ticket-stub summary card — the signature element */
.ticket-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: sticky;
    top: 90px;
    overflow: hidden;
}
.ticket-head { padding: 20px 22px; border-bottom: 1px dashed var(--border); position: relative; }
.ticket-head::before, .ticket-head::after {
    content: '';
    position: absolute;
    bottom: -9px;
    width: 18px;
    height: 18px;
    background: var(--bg);
    border-radius: 50%;
}
.ticket-head::before { left: -9px; }
.ticket-head::after { right: -9px; }
.ticket-movie { font-family: var(--font-display); font-size: 24px; margin-bottom: 6px; }
.ticket-sub { font-size: 13px; color: var(--cream-dim); }
.ticket-body { padding: 20px 22px; }
.ticket-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 12px; color: var(--cream-dim); }
.ticket-row strong { color: var(--cream); }
.ticket-seats { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.ticket-seat-chip { background: var(--surface-raised); border: 1px solid var(--border); padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.ticket-total { display: flex; justify-content: space-between; font-size: 20px; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 6px; }
.ticket-total strong { font-family: var(--font-display); font-size: 26px; color: var(--gold); }
.ticket-empty { color: var(--cream-dim); font-size: 14px; text-align: center; padding: 20px 0; }

/* checkout form */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--cream-dim); margin-bottom: 7px; font-weight: 600; }
.form-group input {
    width: 100%;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--cream);
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-body);
}
.form-group input:focus { outline: none; border-color: var(--gold); }
.form-error { color: var(--red); font-size: 13px; margin-top: 10px; display: none; }

/* ------------------------------------------------------------
   CONFIRMATION PAGE
   ------------------------------------------------------------ */
.confirm-wrap { max-width: 480px; margin: 60px auto; }
.confirm-icon {
    width: 70px; height: 70px; border-radius: 50%;
    background: rgba(242,183,5,0.15); color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; margin: 0 auto 20px;
}
.confirm-title { text-align: center; font-size: 34px; margin-bottom: 6px; }
.confirm-sub { text-align: center; color: var(--cream-dim); margin-bottom: 32px; font-size: 14px; }
.confirm-actions { text-align: center; margin-top: 28px; display: flex; gap: 12px; justify-content: center; }
.stub-status-ok { color: var(--gold); }
.stub-brand-print { display: none; }

.stub {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.stub-top { padding: 26px 26px 22px; }
.stub-ref { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--cream-dim); margin-bottom: 4px; }
.stub-ref strong { color: var(--gold); font-family: var(--font-display); font-size: 18px; letter-spacing: 0.05em; }
.stub-movie { font-family: var(--font-display); font-size: 30px; margin: 10px 0 4px; }
.stub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.stub-field { font-size: 12px; color: var(--cream-dim); }
.stub-field strong { display: block; color: var(--cream); font-size: 15px; margin-top: 2px; }
.stub-divider {
    position: relative;
    border-top: 2px dashed var(--border);
    margin: 0 0;
}
.stub-divider::before, .stub-divider::after {
    content: '';
    position: absolute;
    top: -10px;
    width: 20px;
    height: 20px;
    background: var(--bg);
    border-radius: 50%;
}
.stub-divider::before { left: -10px; }
.stub-divider::after { right: -10px; }
.stub-bottom { padding: 22px 26px 26px; }

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    text-align: center;
    color: var(--cream-dim);
    font-size: 13px;
}

/* ------------------------------------------------------------
   MISC / RESPONSIVE
   ------------------------------------------------------------ */
.loading-msg, .empty-msg { text-align: center; color: var(--cream-dim); padding: 40px 0; }

@media (max-width: 880px) {
    .booking-layout { grid-template-columns: 1fr; }
    .ticket-card { position: static; }
    .detail-hero-inner { grid-template-columns: 1fr; }
    .detail-poster { width: 160px; }
    .nav-links { display: none; }
    .hero-slider { height: 60vh; min-height: 380px; }
}

/* ------------------------------------------------------------
   PRINT — used for "Print Ticket" on the confirmation page
   (also what a "Save as PDF" browser print target uses)
   ------------------------------------------------------------ */
@media print {
    .no-print { display: none !important; }

    html, body {
        background: #fff;
        color: #1a1a1a;
    }

    .section { padding: 0; }
    .confirm-wrap { max-width: 100%; margin: 0; padding: 0; }

    .stub-brand-print {
        display: block;
        font-family: var(--font-display);
        font-size: 22px;
        letter-spacing: 0.06em;
        text-align: center;
        margin-bottom: 18px;
        color: #1a1a1a;
    }

    .stub {
        border: 1px solid #ccc;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
        page-break-inside: avoid;
    }
    .stub-ref { color: #555; }
    .stub-ref strong { color: #1a1a1a; }
    .stub-movie { color: #1a1a1a; }
    .ticket-sub { color: #555; }
    .stub-field { color: #555; }
    .stub-field strong { color: #1a1a1a; }
    .stub-status-ok { color: #1a1a1a !important; }
    .stub-divider { border-top: 2px dashed #ccc; }
    .stub-divider::before, .stub-divider::after { background: #fff; border: 1px solid #ccc; }
    .ticket-row { color: #555; }
    .ticket-row strong { color: #1a1a1a; }
    .ticket-total { border-top: 1px solid #ccc; }
    .ticket-total strong { color: #1a1a1a; }

    @page { margin: 1.5cm; }
}
