/* ============================================================
   app.css - CLEANED & OPTIMIZED
   Version: 9.6 - Brand Sync + NEO_BARD Integration
   (NEO_BARD blocks moved to critical.css — single source of truth)
   ============================================================ */

/* ============================================================
   1. ROOT VARIABLES & GLOBAL BASE
   ============================================================ */
:root {
    --bg-deep: #0a0806;
    --bg-card: #14110e;
    --bg-surface: #161310;
    --text-primary: #ede4d8;
    --text-secondary: #d4c8b8;
    --text-muted: #b8aa9a;
    --text-dim: #8a7a6a;
    --accent-gold: #d4a853;
    --accent-gold-light: #e8c878;
    --accent-gold-dim: rgba(212,168,83,0.15);
    --border-subtle: #2a241e;
    --border-glow: rgba(212,168,83,0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,.2);
    --shadow-md: 0 4px 24px rgba(0,0,0,.3);
    --shadow-lg: 0 16px 48px rgba(0,0,0,.5);
    --shadow-gold: 0 4px 20px rgba(212,168,83,.35);
    --shadow-gold-hover: 0 8px 32px rgba(212,168,83,.45);
    --transition-fast: .15s ease;
    --transition-smooth: .3s cubic-bezier(.34,1.56,.64,1);
    --transition-luxury: .5s cubic-bezier(.16,1,.3,1);
    --gradient-gold: linear-gradient(145deg,#d4a853,#e8c878);
    --gradient-gold-soft: linear-gradient(145deg, rgba(212,168,83,0.1), rgba(232,200,120,0.05));
    --gradient-gold-border: linear-gradient(135deg, transparent 0%, rgba(212,168,83,0.4) 50%, transparent 100%);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                   Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
    --z-sticky: 100;
    --z-modal: 1000;
    --z-toast: 9999;
    --container-max: 1200px;
}

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

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

body {
    background: var(--bg-deep);
    min-height: 100vh;
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(30,60,180,.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(20,40,120,.10) 0%, transparent 50%),
        linear-gradient(180deg, #0a0e1a 0%, #0d1225 30%, #0f1a30 60%, #080c18 100%);
    background-attachment: fixed;
}

.wrapper {
    max-width: var(--container-max);
    width: 100%;
    padding: 1rem 20px 2.5rem;
    margin: 0 auto;
}

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

/* ============================================================
   2. TOP BAR & NAVIGATION
   ============================================================ */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    min-height: 72px;
    background: rgba(13,18,37,.65);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-xl);
    flex-wrap: wrap;
    gap: 10px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 12px;
    z-index: var(--z-sticky);
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.logo-area { display: flex; align-items: center; gap: 12px; }
.logo-brand {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(90deg,#fff 0%,#dbb85a 67%,#fff 100%);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logoGlow 6s ease-in-out infinite;
}
@keyframes logoGlow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.logo-sub { font-size: .55rem; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; }

.nav-links {
    display: flex;
    gap: 4px;
    background: rgba(30,26,22,.4);
    border-radius: var(--radius-full);
    padding: 4px;
    border: 1px solid rgba(255,255,255,.05);
}
.nav-link {
    font-size: .75rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: .4rem .9rem;
    border-radius: var(--radius-full);
    transition: all var(--transition-smooth);
    text-decoration: none;
}
.nav-link.active { color: #1a1510; background: var(--gradient-gold); font-weight: 600; box-shadow: var(--shadow-gold); }

.book-btn {
    background: var(--gradient-gold);
    color: #1a1510;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-gold);
}

.contact-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    background: rgba(13,18,37,.5);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius-full);
    font-size: .8rem;
    color: var(--text-secondary);
    gap: 6px;
    backdrop-filter: blur(10px);
}

/* ============================================================
   3. AFISHA (POSTER CARDS)
   ============================================================ */
.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    padding: 12px;
}

.poster-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-luxury);
    display: flex;
    flex-direction: column;
    min-height: 360px;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    box-shadow: var(--shadow-sm);
}
.poster-card:hover { transform: translateY(-4px); border-color: var(--border-glow); box-shadow: var(--shadow-md); }

.poster-card .poster-img {
    width: 100%;
    height: 400px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bg-surface);
    position: relative;
    overflow: hidden;
}

.poster-card .poster-img::before {
    content: '';
    position: absolute;
    top: -10%; left: -10%; right: -10%; bottom: -10%;
    background-image: var(--bg-image, none);
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.5) saturate(0.8);
    transform: scale(1.1);
    opacity: 0.7;
    z-index: 0;
    transition: opacity var(--transition-smooth);
}
.poster-card:hover .poster-img::before { opacity: 1; }

.poster-card .poster-img img {
    position: relative !important;
    z-index: 1 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    transition: transform var(--transition-luxury);
}
.poster-card:hover .poster-img img { transform: scale(1.04); }

.poster-content { padding: 1rem 1.2rem 1.2rem; flex: 1; display: flex; flex-direction: column; background: var(--bg-card); }
.poster-date { font-size: 0.8rem; color: var(--accent-gold); margin-bottom: 6px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.poster-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; line-height: 1.3; color: var(--text-primary); }
.poster-description-full { font-size: .9rem; color: var(--text-muted); line-height: 1.5; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }

.poster-meta {
    padding-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}
.price-tag { background: var(--gradient-gold); color: #1a1510; padding: 4px 14px; border-radius: var(--radius-full); font-weight: 700; font-size: 0.8rem; box-shadow: var(--shadow-gold); transition: all var(--transition-smooth); }
.price-tag:hover { transform: scale(1.05); box-shadow: var(--shadow-gold-hover); }
.age-badge { background: rgba(180,140,80,0.15); padding: 3px 10px; border-radius: var(--radius-full); color: var(--text-secondary); border: 1px solid rgba(180,140,80,0.2); font-size: 0.7rem; }
.city-label { font-size: 0.75rem; color: var(--accent-gold); margin-left: auto; opacity: 0.8; transition: opacity var(--transition-smooth); }
.poster-card:hover .city-label { opacity: 1; }

/* ============================================================
   4. ABOUT & GALLERY
   ============================================================ */
.about-text { max-width: 850px; margin: 0 auto 3rem auto; color: var(--text-secondary); font-size: 1.05rem; line-height: 1.8; }
.section-title { font-size: 1.5rem; color: var(--accent-gold); border-bottom: 1px solid var(--border-subtle); padding-bottom: .6rem; margin-bottom: 1.8rem; }

.history-item { display: flex; gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--border-subtle); max-width: 900px; transition: background var(--transition-smooth); }
.history-item:hover { background: rgba(255,255,255,.02); padding: 24px 16px; border-radius: var(--radius-md); }
.history-year { flex-shrink: 0; font-size: 2rem; font-weight: 700; color: var(--accent-gold); min-width: 120px; text-align: right; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 2.5rem; }
.gallery-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; transition: var(--transition-smooth); }
.gallery-card:hover { transform: translateY(-5px); border-color: var(--border-glow); box-shadow: var(--shadow-md); }
.gallery-img-wrapper { height: 180px; overflow: hidden; }
.gallery-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition-luxury); }
.gallery-card:hover .gallery-img-wrapper img { transform: scale(1.08); }
.gallery-content { padding: 16px 20px; }

/* ============================================================
   5. MENU (TABS & CATEGORIES)
   ============================================================ */
.menu-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 32px; padding: 8px; background: rgba(22,19,16,.5); backdrop-filter: blur(12px); border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,.08); }
.menu-tab { padding: 12px 28px; border: none; border-radius: var(--radius-md); background: transparent; color: var(--text-secondary); cursor: pointer; transition: var(--transition-smooth); font-size: .95rem; }
.menu-tab.active { color: #1a1510; background: var(--gradient-gold); font-weight: 600; box-shadow: var(--shadow-gold); }
.menu-tab:hover:not(.active) { background: rgba(255,255,255,.05); color: var(--text-primary); }

.menu-category { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 32px 36px; box-shadow: var(--shadow-md); max-width: 1000px; margin: 0 auto; }
.category-title { font-size: 1.3rem; color: var(--accent-gold); margin-bottom: 20px; border-bottom: 1px solid var(--border-glow); padding-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.category-title::before { content: ''; width: 4px; height: 26px; background: var(--gradient-gold); border-radius: 4px; }
.menu-item { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-bottom: 1px solid rgba(42,36,30,.1); }
.item-name { color: var(--text-primary); font-weight: 500; }
.item-price { color: var(--accent-gold); font-weight: 700; background: rgba(212,168,83,.08); padding: 3px 14px; border-radius: 20px; }
.item-desc { font-size: .85rem; color: var(--text-muted); padding: 5px 0 12px 6px; margin-bottom: 10px; }

/* ============================================================
   6. REVIEWS & FAB
   ============================================================ */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 2rem; }
.review-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 20px 24px; transition: var(--transition-smooth); }
.review-card:hover { border-color: var(--border-glow); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.mobile-booking-fab {
    display: none; position: fixed; bottom: 20px; left: 20px; right: 20px; z-index: 1000;
    background: var(--gradient-gold); color: #1a1510 !important; padding: 14px 24px;
    border-radius: var(--radius-full); box-shadow: var(--shadow-gold);
    align-items: center; justify-content: center; gap: 12px; font-weight: 700;
    text-transform: uppercase; animation: fab-pulse 3s infinite; text-decoration: none;
}
@keyframes fab-pulse { 0%, 100% { box-shadow: 0 8px 25px rgba(212,168,83,0.4); } 50% { box-shadow: 0 8px 35px rgba(212,168,83,0.7); } }

/* ============================================================
   7. PREORDER PAGE
   ============================================================ */
.preorder-container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }
.preorder-header { text-align: center; margin-bottom: 40px; }
.preorder-layout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }

.preorder-category { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 25px; margin-bottom: 30px; }
.preorder-category .cat-title { color: var(--accent-gold); font-size: 1.5rem; margin-bottom: 20px; border-left: 4px solid var(--accent-gold); padding-left: 15px; }
.preorder-category .sub-title { color: var(--text-secondary); font-size: 1.1rem; margin: 25px 0 15px 0; font-weight: 600; opacity: 0.8; }
.items-grid { display: flex; flex-direction: column; gap: 10px; }

.preorder-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 15px; background: rgba(255,255,255,0.03); border-radius: var(--radius-md);
    transition: 0.2s; border: 1px solid transparent;
}
.preorder-item:hover { background: rgba(255,255,255,0.07); border-color: rgba(212,168,83,0.3); }
.preorder-item .item-name { color: var(--text-primary); font-size: 0.95rem; font-weight: 500; }
.preorder-item .item-price { color: var(--accent-gold); font-weight: 700; margin-left: 10px; }
.preorder-item .add-to-cart {
    background: transparent; border: 1px solid var(--accent-gold); color: var(--accent-gold);
    padding: 6px 15px; border-radius: 8px; cursor: pointer; font-size: 0.85rem;
    transition: 0.3s; font-weight: 600;
}
.preorder-item .add-to-cart:hover { background: var(--accent-gold); color: #1a1510; }

.order-card {
    background: #1a1714; border: 1px solid var(--accent-gold); border-radius: var(--radius-xl);
    padding: 25px; position: sticky; top: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.order-card .card-title { color: var(--text-primary); text-align: center; margin-bottom: 20px; font-size: 1.3rem; }
.cart-items { min-height: 100px; max-height: 300px; overflow-y: auto; margin-bottom: 20px; }
.cart-row {
    display: flex; justify-content: space-between; align-items: center;
    color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.remove-item { color: #ff6b6b; cursor: pointer; font-size: 0.8rem; margin-left: 10px; }
.empty-cart { text-align: center; color: var(--text-dim); font-style: italic; padding: 20px 0; }

.cart-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; color: var(--text-primary); margin-bottom: 20px; }
#total-price { color: var(--accent-gold); }

.form-group { margin-bottom: 15px; display: flex; flex-direction: column; gap: 5px; }
.form-group label { color: var(--text-secondary); font-size: 0.85rem; }
.form-group input, .form-group select {
    background: var(--bg-deep); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    padding: 10px; color: var(--text-primary); font-family: inherit; outline: none;
    transition: border-color var(--transition-fast);
}
.form-group input:focus, .form-group select:focus { border-color: var(--accent-gold); box-shadow: 0 0 8px rgba(212,168,83,0.2); }
.submit-order-btn {
    width: 100%; background: var(--gradient-gold); color: #1a1510; border: none; padding: 15px; border-radius: var(--radius-md);
    font-weight: 700; font-size: 1rem; cursor: pointer; transition: 0.3s; margin-top: 10px;
}
.submit-order-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }

/* ============================================================
   9. RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 768px) {
    .top-bar { padding: 8px 12px; border-radius: var(--radius-lg); min-height: 60px; }
    .nav-links { order: 4; width: 100%; margin-top: 6px; justify-content: flex-start; }
    .poster-card .poster-img { height: 320px !important; }
    .poster-title { font-size: 1rem; }
    .history-item { flex-direction: column; gap: 4px; }
    .history-year { text-align: left; min-width: auto; }
    .menu-tabs { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; }
    .mobile-booking-fab { display: flex; }
    body { padding-bottom: 80px; }
    .preorder-layout { grid-template-columns: 1fr; }
    .preorder-sidebar { order: -1; }
}

@media (max-width: 480px) {
    .top-bar { padding: 8px 12px; }
    .poster-card .poster-img { height: 260px !important; }
    .poster-description-full { display: none; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .gallery-img-wrapper { height: 110px; }
    .menu-category { padding: 20px 16px; }
}

/* ============================================================
   10. UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-gold { color: var(--accent-gold); }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }

/* ============================================================
   12. HALL (СХЕМА ЗАЛА)
   ============================================================ */
.hall {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr 0.85fr;
    grid-template-rows: 0.85fr 0.7fr 0.7fr 0.7fr 0.7fr 0.7fr 0.7fr 0.75fr 0.55fr;
    gap: 6px;
    aspect-ratio: 4 / 5.5;
    padding: 12px;
    background: rgba(255,255,255,0.035);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 560px;
    margin: 40px auto;
}
.hall .cell {
    background: rgba(30,30,30,0.75);
    border: 1px solid rgba(212,168,83,0.2);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-weight: 600;
    user-select: none;
    transition: all var(--transition-fast);
}
.hall .seat {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-gold-light);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.hall .seat:hover,
.hall .seat:focus-visible {
    background: rgba(212,168,83,0.28) !important;
    border-color: var(--accent-gold) !important;
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 0 18px rgba(212,168,83,0.4);
    outline: none;
}
.hall .seat:active {
    transform: scale(0.94);
    background: var(--accent-gold) !important;
    color: #1a1510 !important;
}
.hall .bar     { background:#2a1f0e; border-color:#b8860b; color:#e6c27a; text-transform:uppercase; font-size:0.8rem; }
.hall .kitchen { background:#1e2a1a; border-color:#6b8e5a; color:#b5d3a8; text-transform:uppercase; font-size:0.8rem; }
.hall .scene   { background:#3d1a1a; border-color:#b33; color:#f0b0b0; text-transform:uppercase;
                 grid-column:2/5; grid-row:1/2; border-radius:20px 20px 12px 12px; font-size:1rem; }
.hall .entrance{ background:#1e2a3a; border-color:#4a7a9c; color:#8fcbff; text-transform:uppercase;
                 grid-column:2/5; grid-row:9/10; border-radius:20px 20px 12px 12px; font-size:0.9rem; }

.hall .bar     { grid-column:1/2; grid-row:3/4; }
.hall .kitchen { grid-column:1/2; grid-row:4/10; }

.hall .seat-11{grid-column:1/2;grid-row:1/2;} .hall .seat-12{grid-column:1/2;grid-row:2/3;}
.hall .seat-6{grid-column:2/3;grid-row:3/4;}  .hall .seat-7{grid-column:3/4;grid-row:3/4;}
.hall .seat-1{grid-column:4/5;grid-row:3/4;}  .hall .seat-8{grid-column:2/3;grid-row:4/5;}
.hall .seat-2{grid-column:4/5;grid-row:4/5;}  .hall .seat-3{grid-column:4/5;grid-row:5/6;}
.hall .seat-9{grid-column:2/3;grid-row:6/7;}  .hall .seat-4{grid-column:4/5;grid-row:6/7;}
.hall .seat-10{grid-column:2/3;grid-row:7/8;} .hall .seat-5{grid-column:4/5;grid-row:7/8;}

@media (max-width: 480px) {
    .hall { padding: 8px; gap: 4px; margin: 20px auto; }
    .hall .seat { font-size: 1.2rem; }
    .hall .bar, .hall .kitchen,
    .hall .scene, .hall .entrance { font-size: 0.65rem; }
}