/* ═══════════════════════════════════════════════════════
   THE OPERA CINEMA — Master Stylesheet
   Premium Black + Gold Cinema Design System
   ═══════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   Design Tokens
   ───────────────────────────────────────────── */
:root {
    /* Colors */
    --bg-primary: #0B0B0B;
    --bg-secondary: #141414;
    --bg-card: #1A1A1A;
    --bg-card-hover: #1F1F1F;
    --bg-input: #0F0F0F;
    --border: #2A2A2A;
    --border-hover: #3A3A3A;

    --gold: #D4AF37;
    --gold-light: #FFD75A;
    --gold-deep: #A67C00;
    --gold-muted: rgba(212,175,55,0.15);
    --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #FFD75A 50%, #A67C00 100%);

    --white: #F5F5F5;
    --text-primary: #F5F5F5;
    --text-secondary: #AFAFAF;
    --text-muted: #6B6B6B;

    --danger: #D64545;
    --success: #2E9D63;
    --warning: #D9A441;
    --info: #4A90D9;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

    /* Spacing & Sizing */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.5);
    --shadow-gold: 0 0 30px rgba(212,175,55,0.15);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    --container-max: 1280px;
    --header-height: 72px;
}

/* ─────────────────────────────────────────────
   Reset & Base
   ───────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--gold-light);
}

::selection {
    background: var(--gold);
    color: #000;
}

/* ─────────────────────────────────────────────
   Layout
   ───────────────────────────────────────────── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.main-content {
    min-height: calc(100vh - 350px);
    padding-top: var(--header-height);
}

.main-content.has-hero {
    padding-top: 0;
}

.section {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 40px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section-title .gold {
    color: var(--gold);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ─────────────────────────────────────────────
   Header / Navigation
   ───────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(11,11,11,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(42,42,42,0.5);
    z-index: 1000;
    transition: var(--transition);
}

.site-header.scrolled {
    background: rgba(11,11,11,0.98);
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(212,175,55,0.2));
    transition: var(--transition);
}

.nav-logo:hover .logo-img {
    filter: drop-shadow(0 4px 16px rgba(212,175,55,0.4));
    transform: scale(1.02);
}

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

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-xs);
    transition: var(--transition-fast);
    position: relative;
}

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

.nav-link.active {
    color: var(--gold);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.nav-btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.nav-btn-gold {
    background: var(--gold);
    color: #000;
    border: 1px solid var(--gold);
}

.nav-btn-gold:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212,175,55,0.4);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-hamburger i { color: var(--gold); font-size: 24px; }
.nav-hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer-divider {
    display: none;
}

.nav-link-mobile {
    display: none;
}

/* ─────────────────────────────────────────────
   Hero Section
   ───────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(11,11,11,0.3) 0%, 
        rgba(11,11,11,0.7) 50%, 
        rgba(11,11,11,1) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    padding: 60px 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--gold-muted);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: var(--radius-full);
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ─────────────────────────────────────────────
   Buttons
   ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-gold {
    background: var(--gold);
    color: #000;
}

.btn-gold:hover:not(:disabled) {
    background: var(--gold-light);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(212,175,55,0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-muted);
}

.btn-dark {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-dark:hover:not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 16px;
}

/* ─────────────────────────────────────────────
   Movie Cards
   ───────────────────────────────────────────── */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.movie-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.movie-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--bg-secondary);
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.08);
}

.movie-poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.85) 100%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.movie-card:hover .movie-poster-overlay {
    opacity: 1;
}

.movie-rating {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    border: 1px solid rgba(212,175,55,0.3);
}

.movie-info {
    padding: 16px;
}

.movie-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.movie-genre {
    display: inline-flex;
    padding: 3px 10px;
    background: var(--gold-muted);
    color: var(--gold);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-top: 8px;
}

.movie-book-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: var(--gold);
    color: #000;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    transform: translateY(100%);
    transition: var(--transition);
}

.movie-card:hover .movie-book-btn {
    transform: translateY(0);
}

/* ─────────────────────────────────────────────
   Empty States
   ───────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    color: var(--text-muted);
}

/* ─────────────────────────────────────────────
   Flash Messages
   ───────────────────────────────────────────── */
.flash-container {
    position: fixed;
    top: calc(var(--header-height) + 16px);
    right: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
}

.flash-message {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow);
}

.flash-success { background: rgba(46,157,99,0.15); border: 1px solid rgba(46,157,99,0.3); color: #6BCB99; }
.flash-error { background: rgba(214,69,69,0.15); border: 1px solid rgba(214,69,69,0.3); color: #F08080; }
.flash-warning { background: rgba(217,164,65,0.15); border: 1px solid rgba(217,164,65,0.3); color: #E8C468; }
.flash-info { background: rgba(74,144,217,0.15); border: 1px solid rgba(74,144,217,0.3); color: #7DB8F0; }

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition-fast);
}

.flash-close:hover {
    opacity: 1;
}

/* ─────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────── */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 24px;
    margin-top: 80px;
}

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

.footer-logo {
    max-width: 180px;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 8px rgba(212,175,55,0.2));
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 4px 0;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ─────────────────────────────────────────────
   Forms
   ───────────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* ─────────────────────────────────────────────
   Animations
   ───────────────────────────────────────────── */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
    animation: fadeIn 0.6s ease both;
}

/* ─────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(11, 11, 11, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px 20px;
        gap: 6px;
        z-index: 999;
        overflow-y: auto;
    }

    .nav-links.open {
        display: flex;
        animation: fadeIn 0.25s ease;
    }

    .nav-drawer-divider {
        display: block;
        height: 1px;
        background: var(--border);
        margin: 14px 0 8px 0;
    }

    .nav-link-mobile {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--text-secondary);
        font-size: 15px;
    }

    .nav-link {
        padding: 12px 16px;
        font-size: 16px;
        border-radius: var(--radius-sm);
    }

    .nav-link.active::after {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .hero {
        min-height: 60vh;
    }

    .hero-title {
        font-size: 28px;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .flash-container {
        left: 16px;
        right: 16px;
        max-width: 100%;
    }
}

/* ─────────────────────────────────────────────
   Responsive Grid & Page Layout Utilities
   ───────────────────────────────────────────── */
.movie-detail-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

.movie-detail-poster-col {
    position: relative;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

.checkout-summary-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    position: sticky;
    top: calc(var(--header-height) + 16px);
}

.payment-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    align-items: start;
}

.cinema-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.date-selector-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    max-width: 100%;
}
.date-selector-scroll::-webkit-scrollbar {
    height: 4px;
}
.date-selector-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.seat-map-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 8px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    text-align: center;
}

.seat-map-hint {
    display: none;
    font-size: 11px;
    color: var(--gold);
    margin-bottom: 8px;
    text-align: center;
}

.movies-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 32px;
}

.movies-search-form {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

@media (max-width: 860px) {
    .checkout-grid,
    .payment-grid {
        grid-template-columns: 1fr;
    }
    .checkout-summary-box {
        position: static !important;
    }
}

@media (max-width: 768px) {
    .movie-detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .movie-detail-poster-col {
        max-width: 260px;
        margin: 0 auto;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .seat-map-hint {
        display: block;
    }
}

@media (max-width: 640px) {
    .movies-search-form {
        width: 100%;
        margin-left: 0 !important;
    }
    .movies-search-form .form-control {
        flex: 1;
        width: 100% !important;
    }
    .cinema-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }
}

/* ─────────────────────────────────────────────
   Badges (public)
   ───────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.badge-success { background: rgba(46,157,99,0.15); color: #2E9D63; }
.badge-danger { background: rgba(214,69,69,0.15); color: #D64545; }
.badge-warning { background: rgba(217,164,65,0.15); color: #D9A441; }
.badge-info { background: rgba(74,144,217,0.15); color: #4A90D9; }
.badge-gold { background: var(--gold-muted); color: var(--gold); }
.badge-muted { background: rgba(107,107,107,0.15); color: var(--text-muted); }

/* ─────────────────────────────────────────────
   Form Utilities
   ───────────────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

/* ─────────────────────────────────────────────
   Empty State
   ───────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}
.empty-state-icon {
    font-size: 56px;
    margin-bottom: 16px;
}
.empty-state-title {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.empty-state-text {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 360px;
    margin: 0 auto;
}

/* ─────────────────────────────────────────────
   Pagination
   ───────────────────────────────────────────── */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
}
.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.pagination a:hover,
.pagination a.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
}
