/* ══════════════════════════════════════
   BOOKING SYSTEM — Dark Luxury Theme
══════════════════════════════════════ */
:root {
  --bg: #0a0a0a;
  --bg2: #111;
  --fg: #e8e4de;
  --accent: #c9a84c;
  --muted: rgba(232,228,222,.55);
  --line: rgba(232,228,222,.12);
  --danger: #e74c3c;
  --success: #27ae60;
  --serif: 'Cormorant Garamond', serif;
  --sans: 'Inter', sans-serif;
  --ease: cubic-bezier(.16,1,.3,1);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--sans); font-weight: 300; color: var(--fg);
  background: var(--bg); line-height: 1.6; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; }
::selection { background: var(--accent); color: var(--bg); }
.hidden { display: none !important; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px;
  background: linear-gradient(180deg, rgba(10,10,10,.95), rgba(10,10,10,0));
  transition: background .3s;
}
.header__logo-img { height: 52px; }
.header__right { display: flex; gap: 24px; }
.header__link {
  font-size: .72rem; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; opacity: .6; transition: opacity .3s;
}
.header__link:hover { opacity: 1; color: var(--accent); }

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 32px; border: 1px solid var(--fg); background: none;
  font-family: var(--sans); font-weight: 500; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--fg);
  cursor: pointer; transition: all .3s var(--ease); border-radius: var(--radius);
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn--gold { border-color: var(--accent); color: var(--accent); }
.btn--gold:hover { background: var(--accent); color: var(--bg); }
.btn--full { width: 100%; }
.btn--lg { padding: 16px 40px; font-size: .8rem; }
.btn--sm { padding: 10px 20px; font-size: .68rem; }
.btn:disabled { opacity: .3; pointer-events: none; }

.input {
  width: 100%; padding: 14px 18px; background: rgba(255,255,255,.05);
  border: 1px solid var(--line); color: var(--fg); font-family: var(--sans);
  font-size: .88rem; border-radius: var(--radius); transition: border-color .3s;
}
.input:focus { outline: none; border-color: var(--accent); }
.input::placeholder { color: var(--muted); }

/* ══════════════════════════════════════
   VIEW 1: EVENT SELECT
══════════════════════════════════════ */
.view--events { padding-top: 90px; min-height: 100vh; }

.events-hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}
.events-hero__label {
  font-size: .65rem; font-weight: 500; letter-spacing: .25em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.events-hero__title {
  font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 10px;
}
.events-hero__sub { color: var(--muted); font-size: .88rem; }

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2px;
  padding-bottom: 80px;
}

.event-card {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .4s var(--ease), border-color .3s;
}
.event-card:hover { transform: translateY(-4px); border-color: var(--accent); }

.event-card__img {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
}
.event-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.85); transition: filter .4s, transform .6s var(--ease);
}
.event-card:hover .event-card__img img {
  filter: brightness(1); transform: scale(1.03);
}
.event-card__date-badge {
  position: absolute; top: 16px; left: 16px;
  background: rgba(10,10,10,.85); backdrop-filter: blur(8px);
  padding: 10px 14px; text-align: center; border-radius: var(--radius);
  border: 1px solid var(--line);
}
.event-card__day {
  font-family: var(--serif); font-size: 1.8rem; font-weight: 700;
  line-height: 1; color: var(--accent);
}
.event-card__mon {
  font-size: .6rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.event-card__status {
  position: absolute; top: 16px; right: 16px;
  padding: 4px 10px; font-size: .6rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; border-radius: 2px;
}
.event-card__status--sale { background: var(--accent); color: var(--bg); }
.event-card__status--soldout { background: var(--danger); color: #fff; }

.event-card__body { padding: 20px; }
.event-card__tag {
  display: inline-block; padding: 3px 8px; font-size: .6rem;
  font-weight: 600; letter-spacing: .08em; border: 1px solid var(--line);
  color: var(--muted); margin-bottom: 8px; border-radius: 2px;
}
.event-card__title {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 600;
  margin-bottom: 8px; line-height: 1.2;
}
.event-card__meta {
  display: flex; gap: 16px; font-size: .75rem; color: var(--muted);
  margin-bottom: 16px;
}
.event-card__meta span { display: flex; align-items: center; gap: 4px; }
.event-card__footer {
  display: flex; align-items: center; justify-content: space-between;
}
.event-card__seats {
  font-size: .72rem; color: var(--muted);
}
.event-card__seats strong { color: var(--accent); }
.event-card__price {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600;
  color: var(--accent);
}

.loading {
  text-align: center; padding: 80px 20px;
  font-size: .88rem; color: var(--muted);
}
.no-events {
  text-align: center; padding: 80px 20px; color: var(--muted);
}
.no-events h3 { font-size: 1.5rem; margin-bottom: 12px; color: var(--fg); }

/* ══════════════════════════════════════
   VIEW 2: SEAT PICKER (IMMERSIVE)
══════════════════════════════════════ */
.view--seats {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.seats-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(12px) brightness(.35); transform: scale(1.1);
}
.seats-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(10,10,10,.92) 0%,
    rgba(10,10,10,.75) 30%,
    rgba(10,10,10,.80) 70%,
    rgba(10,10,10,.95) 100%
  );
}

.seats-header {
  position: relative; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 32px;
}
.seats-back {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid var(--line);
  color: var(--fg); font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .3s;
}
.seats-back:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.seats-header__info { flex: 1; }
.seats-header__show {
  font-family: var(--serif); font-size: 1.2rem; font-weight: 600;
}
.seats-header__date { font-size: .72rem; color: var(--muted); margin-top: 2px; }

.seats-stage {
  position: relative; z-index: 10;
  margin: 0 auto; width: 60%; max-width: 500px;
  padding: 8px 0; text-align: center;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.2), transparent);
  border-bottom: 2px solid var(--accent);
  font-size: .6rem; font-weight: 600; letter-spacing: .3em;
  text-transform: uppercase; color: var(--accent);
}

.seats-map-wrap {
  position: relative; z-index: 10;
  flex: 1; overflow: auto;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}
.seats-svg {
  max-width: 100%; height: auto;
}

/* SVG seat styles */
.seat { cursor: pointer; transition: all .25s var(--ease); }
.seat--available { opacity: .55; }
.seat--available:hover { opacity: .85; }
.seat--selected {
  opacity: 1;
  stroke: #fff;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px rgba(255,255,255,.5)) drop-shadow(0 0 16px var(--accent));
  r: 12;
}
.seat--taken { opacity: .12; cursor: default; }
.seat--blocked { opacity: .06; cursor: default; }
.seat--channel { opacity: .22; cursor: default; fill: #888 !important; }
.seats-legend__dot--channel { background: #555; border: 1px solid #888; }
.seat-label { fill: var(--muted); font-size: 10px; font-family: var(--sans); }

.seat-tooltip {
  position: fixed; z-index: 200; padding: 8px 14px;
  background: rgba(10,10,10,.95); border: 1px solid var(--accent);
  border-radius: var(--radius); font-size: .72rem;
  pointer-events: none; white-space: nowrap;
  opacity: 0; transition: opacity .15s;
}
.seat-tooltip.show { opacity: 1; }
.seat-tooltip__label { color: var(--fg); font-weight: 500; }
.seat-tooltip__price { color: var(--accent); margin-top: 2px; }

.seats-legend {
  position: relative; z-index: 10;
  display: flex; justify-content: center; gap: 20px;
  padding: 8px 20px;
  font-size: .65rem; color: var(--muted);
}
.seats-legend__item { display: flex; align-items: center; gap: 6px; }
.seats-legend__dot {
  width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line);
}

.seats-panel {
  position: relative; z-index: 10;
  background: rgba(10,10,10,.95); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 16px 32px;
  max-height: 200px; overflow-y: auto;
}
.seats-panel__header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.seats-panel__title { font-size: .8rem; }
.seats-panel__total {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 700;
  color: var(--accent);
}
.seats-panel__list {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.seats-panel__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; font-size: .68rem;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  border-radius: 20px;
}
.seats-panel__chip-x {
  cursor: pointer; opacity: .5; font-size: .8rem;
}
.seats-panel__chip-x:hover { opacity: 1; color: var(--danger); }

/* ══════════════════════════════════════
   VIEW 3: CHECKOUT
══════════════════════════════════════ */
.view--checkout {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; padding: 20px;
}
.checkout-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(20px) brightness(.25); transform: scale(1.1);
}
.checkout-card {
  position: relative; z-index: 10;
  width: 100%; max-width: 520px;
  background: rgba(17,17,17,.92); backdrop-filter: blur(20px);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 36px;
}
.checkout-back { position: absolute; top: 16px; left: 16px; }
.checkout-title {
  font-size: 1.6rem; text-align: center; margin-bottom: 24px;
}
.checkout-summary {
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.checkout-summary__event {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600;
  margin-bottom: 4px;
}
.checkout-summary__date { font-size: .75rem; color: var(--muted); margin-bottom: 12px; }
.checkout-summary__seats { font-size: .78rem; }
.checkout-summary__seat {
  display: flex; justify-content: space-between;
  padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.03);
}
.checkout-summary__seat-label { color: var(--muted); }
.checkout-summary__seat-price { color: var(--accent); font-weight: 500; }

.checkout-promo {
  display: flex; gap: 8px; margin-bottom: 16px; align-items: flex-start;
  flex-wrap: wrap;
}
.checkout-promo .input { flex: 1; min-width: 160px; }
.promo-msg { width: 100%; font-size: .72rem; margin-top: 4px; }
.promo-msg--ok { color: var(--success); }
.promo-msg--err { color: var(--danger); }

.checkout-timer {
  text-align: center; font-size: .78rem; color: var(--danger);
  margin-bottom: 16px; min-height: 20px;
}

.checkout-form { display: flex; flex-direction: column; gap: 12px; }
.checkout-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; font-size: .9rem;
}
.checkout-total strong {
  font-family: var(--serif); font-size: 1.6rem; color: var(--accent);
}
.checkout-discount {
  display: flex; justify-content: space-between; font-size: .78rem;
  color: var(--success);
}

/* ══════════════════════════════════════
   VIEW 4: CONFIRMATION
══════════════════════════════════════ */
.view--confirm {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  padding: 20px;
}
.confirm-card {
  width: 100%; max-width: 520px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 8px; padding: 48px 36px; text-align: center;
}
.confirm-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--accent); color: var(--bg);
  font-size: 2rem; font-weight: 700;
}
.confirm-title { font-size: 1.8rem; margin-bottom: 12px; }
.confirm-order {
  font-size: .8rem; color: var(--muted); margin-bottom: 24px;
}
.confirm-order strong { color: var(--accent); font-size: 1rem; }
.confirm-details {
  text-align: left; padding: 16px; background: rgba(255,255,255,.03);
  border-radius: var(--radius); margin-bottom: 20px;
  font-size: .82rem; line-height: 1.8;
}
.confirm-tickets {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 24px;
}
.confirm-ticket {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: rgba(255,255,255,.03);
  border-radius: var(--radius); font-size: .78rem;
}
.confirm-ticket__qr {
  font-family: monospace; font-size: .65rem; color: var(--muted);
}
.confirm-actions { display: flex; gap: 12px; justify-content: center; }

/* ══════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes seatAppear {
  from { opacity: 0; transform: scale(0); }
  to { opacity: 1; transform: scale(1); }
}
.view--seats.entering .seat {
  animation: seatAppear .3s var(--ease) both;
}
.event-card { animation: fadeInUp .5s var(--ease) both; }
.event-card:nth-child(2) { animation-delay: .08s; }
.event-card:nth-child(3) { animation-delay: .16s; }
.event-card:nth-child(4) { animation-delay: .24s; }
.event-card:nth-child(5) { animation-delay: .32s; }
.event-card:nth-child(6) { animation-delay: .40s; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .container { padding: 0 20px; }
  .header { padding: 12px 20px; }
  .header__logo-img { height: 36px; }
  .events-grid { grid-template-columns: 1fr; }
  .seats-header { padding: 10px 16px; }
  .seats-header__show { font-size: 1rem; }
  .seats-header__date { font-size: .65rem; }
  .seats-panel { padding: 12px 16px; max-height: 180px; }
  .seats-stage { width: 80%; padding: 6px 0; font-size: .55rem; }
  .checkout-card { padding: 24px 20px; }
}
@media (max-width: 640px) {
  .header { padding: 8px 12px; }
  .header__logo-img { height: 30px; }
  .header__right { gap: 12px; }
  .header__link { font-size: .62rem; letter-spacing: .08em; }

  .view--seats { overflow: hidden; }
  .seats-header { padding: 8px 12px; gap: 10px; }
  .seats-header__show { font-size: .88rem; }
  .seats-back { width: 34px; height: 34px; font-size: 1rem; }

  .seats-stage { width: 90%; margin: 4px auto 0; padding: 5px 0;
    font-size: .5rem; letter-spacing: .2em; border-bottom-width: 1px; }

  .seats-map-wrap {
    padding: 4px; flex: 1; min-height: 0;
    overflow: auto; -webkit-overflow-scrolling: touch;
  }

  .seats-legend {
    gap: 8px; padding: 6px 12px; font-size: .52rem;
    flex-wrap: wrap; justify-content: center;
  }
  .seats-legend__dot { width: 8px; height: 8px; }
  .seats-legend__item { gap: 4px; }

  .seats-panel {
    padding: 10px 12px; max-height: 160px;
    border-top: 1px solid var(--line);
  }
  .seats-panel__header { margin-bottom: 6px; }
  .seats-panel__title { font-size: .72rem; }
  .seats-panel__total { font-size: 1rem; }
  .seats-panel__list { gap: 4px; margin-bottom: 8px; }
  .seats-panel__chip { padding: 3px 8px; font-size: .6rem; }
  .btn--full.btn--gold.btn--lg { padding: 12px 20px; font-size: .72rem; }

  .events-hero { padding: 40px 0 24px; margin-bottom: 24px; }
  .events-hero__title { font-size: 1.6rem; }
  .events-hero__sub { font-size: .78rem; }

  .event-card__title { font-size: 1.15rem; }
  .event-card__body { padding: 14px; }
  .event-card__meta { font-size: .68rem; gap: 10px; margin-bottom: 10px; }

  .checkout-card { padding: 20px 16px; max-height: 95vh; overflow-y: auto; }
  .checkout-title { font-size: 1.3rem; margin-bottom: 16px; }
  .checkout-total strong { font-size: 1.3rem; }

  .confirm-card { padding: 24px 16px; }
  .confirm-title { font-size: 1.4rem; }

  .seat-tooltip { display: none; }
}

/* ══════════════════════════════════════
   WIDGET / EMBED MODE (?embed=1)
══════════════════════════════════════ */
.widget-mode .header { display: none !important; }
.widget-mode #app { padding-top: 0; }
.widget-mode .view--events { padding-top: 24px; }
.widget-mode .events-hero { padding: 28px 0 20px; }
.widget-mode .events-hero__title { font-size: 1.8rem; }
.widget-mode .confirm-card { min-height: auto; }
.widget-mode .view--confirm { min-height: auto; padding: 40px 16px; }
