/* ============================================================
   Event Live — dark ticket marketplace theme
   ============================================================ */

:root {
  /* palette (matches the reference look) */
  --surface-page: #0e1116;
  --surface-hover: #161b22;
  --surface-card: #131720;
  --primary: #4daae4;
  --primary-hover: #3399cc;
  --info-fg: #60a5fa;
  --link: #179dff;
  --link-hover: #6ec0fa;
  --border: #1a1f26;
  --border-light: #dee2e6;
  --fg: #ffffff;
  --fg-secondary: #d1d5db;
  --fg-muted: #838c93;
  --fg-subtle: #9ca3af;
  --fg-label: #777777;
  --danger: #dc3545;
  --success: #07bc0c;

  /* misc */
  --radius: 8px;
  --radius-sm: 4px;
  --site-max: 1440px;
  --header-h: 68px;
  --shadow-card: 0 10px 24px -6px rgba(0, 0, 0, .55);
  --shadow-bar: 0 8px 24px -12px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }

/* the hidden attribute must always win over any display rule */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background-color: var(--surface-page);
  color: var(--fg);
  font-family: "Exo 2", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

.page {
  max-width: var(--site-max);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 12px;
}

/* ---------- shared glass bar (header & footer) ---------- */

.glass-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: var(--radius);
  padding: 18px 32px;
  box-shadow: var(--shadow-bar);
}

.sticky-wrap {
  position: sticky;
  top: 20px;
  z-index: 50;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- logo ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.logo-mark {
  position: relative;
  width: 22px;
  height: 17px;
  display: inline-block;
}

.logo-mark-line {
  position: absolute;
  left: 0;
  height: 5px;
  border-radius: 1px;
  background: var(--primary);
}
.logo-mark-line.l1 { top: 0;    width: 100%; }
.logo-mark-line.l2 { top: 6px;  width: 72%;  }
.logo-mark-line.l3 { top: 12px; width: 86%;  }

.logo-text {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .12em;
  color: #fff;
}
.logo-text b { color: var(--primary); font-weight: 800; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-weight: 700;
  font-size: 15px;
  transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-outline {
  background: transparent;
  color: #fff;
  outline: 1px solid var(--border-light);
  outline-offset: -1px;
}
.btn-outline:hover { background: rgba(77, 170, 228, .12); outline-color: var(--primary); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  padding: 4px 6px;
  transition: color .15s ease;
}
.btn-ghost:hover { color: var(--info-fg); }
.btn-ghost svg { display: block; }

/* ---------- live ticket ticker ---------- */

.ticker-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  height: 42px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-bar);
  overflow: hidden;
}

.ticker-live {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .14em;
  color: #f87171;
  background: rgba(220, 53, 69, .1);
  border-right: 1px solid var(--border);
  flex: none;
  user-select: none;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: livePulse 1.6s ease-out infinite;
}

@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(220, 53, 69, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(220, 53, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.ticker-viewport {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-width: 0;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-left: 40px;
  white-space: nowrap;
  will-change: transform;
  animation: tickerScroll var(--ticker-duration, 40s) linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--fg-muted);
}
.ticker-item b {
  color: #fff;
  font-weight: 700;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticker-item .sep { color: var(--border-light); opacity: .25; }

.tchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(77, 170, 228, .14);
  color: var(--primary);
  transition: background-color .3s ease, color .3s ease;
}
.tchip.warn { background: rgba(253, 126, 20, .15); color: #fd7e14; }
.tchip.low  { background: rgba(220, 53, 69, .16);  color: #f87171; }
.tchip.gone { background: rgba(220, 53, 69, .22);  color: #f87171; }

.tchip.bump { animation: chipBump .5s ease; }
@keyframes chipBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* latest purchase slot on the right */
.ticker-latest {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  max-width: 320px;
  border-left: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg-muted);
  flex: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  user-select: none;
}
.ticker-latest .flame {
  width: 14px;
  height: 14px;
  flex: none;
  color: #fd7e14;
}
.ticker-latest b { color: #fff; }
.ticker-latest .fade-in { animation: latestIn .5s ease; }
@keyframes latestIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .ticker-latest { display: none; }
  .ticker-item b { max-width: 200px; }
}
@media (max-width: 640px) {
  .ticker-bar { border-radius: 0; }
  .sticky-wrap { top: 0; gap: 6px; }
}

/* ---------- main ---------- */

.main {
  flex: 1;
  padding: 24px 0 56px;
}

/* ---------- hero slider ---------- */

.hero {
  position: relative;
  margin: 12px 8px 0;
}

.hero-slide {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 420px;
  isolation: isolate;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  filter: blur(48px) saturate(1.2) brightness(.55);
  transform: scale(1.25);
  transition: background-image .4s ease;
}
.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.hero-body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 56px;
  min-height: 420px;
}

.hero-poster-frame {
  width: 260px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
  flex: none;
  animation: fadePoster .45s ease;
}

@keyframes fadePoster {
  from { opacity: 0; transform: scale(.98); }
  to   { opacity: 1; transform: scale(1); }
}

.hero-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.hero-tag {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(77, 170, 228, .12);
  padding: 5px 12px;
  border-radius: 999px;
}

.hero-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin: 0;
}
.hero-title:hover { color: var(--link-hover); }

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-secondary);
  font-size: 16px;
  font-weight: 600;
}
.meta-item .ic { color: var(--primary); flex: none; }
.ic { width: 16px; height: 17px; }

.hero-desc {
  margin: 0;
  color: var(--fg-subtle);
  font-size: 15px;
  line-height: 1.55;
  max-width: 560px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

/* hero nav arrows */
.hero-nav {
  position: absolute;
  top: 50%;
  margin-top: -22px;
  z-index: 10;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  transition: background-color .15s ease;
}
.hero-nav:hover { background: var(--primary-hover); }
.hero-nav svg { width: 18px; height: 18px; }
.hero-nav.prev { left: 10px; }
.hero-nav.next { right: 10px; }

/* dots */
.hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--border);
  transition: background-color .15s ease, transform .15s ease;
}
.dot:hover { background: var(--fg-muted); }
.dot.active {
  background: var(--primary);
  transform: scale(1.25);
}

/* ---------- search ---------- */

.search-band { margin: 36px 8px 8px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-card);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: 999px;
  padding: 8px 10px 8px 22px;
  transition: outline-color .15s ease;
}
.search-box:focus-within { outline-color: var(--primary); }

.search-ic { width: 20px; height: 20px; color: var(--fg-muted); flex: none; }

.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font: inherit;
  font-size: 16px;
  padding: 8px 0;
}
.search-box input::placeholder { color: var(--fg-muted); }

/* ---------- events grid ---------- */

.events { margin-top: 28px; }

.section-head {
  display: flex;
  justify-content: center;
  padding-bottom: 6px;
  margin: 0 8px 24px;
}

.section-title {
  position: relative;
  margin: 0;
  padding-bottom: 14px;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 112px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(256px, 1fr));
  gap: 20px;
  align-items: start;
  padding: 0 8px;
}

/* ---------- event card ---------- */

.event-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  min-width: 0; /* let 1fr grid tracks shrink instead of forcing min-content */
  border-radius: var(--radius);
  background: var(--surface-hover);
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, background-color .18s ease;
}
.event-card:hover {
  transform: translateY(-4px);
  background: #1a2029;
}

.event-card .poster {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.event-card .poster::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(4px);
  color: #fff;
}
.badge.soldout { background: var(--danger); }
.badge.hot { background: rgba(77, 170, 228, .9); }

.event-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.event-card .meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.event-card .meta .meta-item { font-size: 14.5px; }

.event-card .card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

/* ticket highlight chips on cards */
.price-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.p-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0; /* flex item: allow shrinking so max-width + ellipsis work */
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .03em;
  padding: 4px 11px;
  border-radius: 999px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.p-chip .flame { width: 11px; height: 11px; flex: none; }
.p-chip .star { width: 11px; height: 11px; flex: none; }

.p-pop { background: rgba(253, 126, 20, .14); color: #fd7e14; }
.p-top { background: rgba(230, 195, 92, .13); color: #e6c35c; }
.p-soldout { background: rgba(220, 53, 69, .18); color: #f87171; }

.card-details {
  color: var(--link);
  font-weight: 700;
  font-size: 15px;
  padding: 4px 2px;
  transition: color .15s ease;
}
.card-details:hover { color: var(--link-hover); }

.empty-state {
  text-align: center;
  color: var(--fg-muted);
  padding: 48px 0 24px;
  font-size: 16px;
}

/* ---------- footer ---------- */

.footer-wrap {
  margin-top: auto;
  padding-bottom: 20px;
}

.footer-bar { flex-wrap: wrap; }

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.copyright { font-size: 12px; color: #fff; }
.copyright .version { cursor: pointer; }
.copyright .version:hover { text-decoration: underline; }

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.flink {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  transition: color .15s ease;
}
.flink:hover { color: var(--primary); }

.footer-social { display: flex; gap: 16px; }

.social {
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: #fff;
  opacity: .85;
  transition: color .15s ease, opacity .15s ease;
}
.social:hover { color: var(--primary); opacity: 1; }
.social svg { width: 100%; height: 100%; }

/* ---------- modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: min(920px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: var(--surface-card);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 300px 1fr;
  animation: modalIn .22s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.modal-poster {
  background-size: cover;
  background-position: center;
  min-height: 100%;
}

.modal-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  transition: background-color .15s ease;
}
.modal-close:hover { background: var(--danger); }

.modal-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
  background: rgba(77, 170, 228, .12);
  border-radius: 999px;
  padding: 4px 12px;
}

.modal-desc {
  margin: 0;
  color: var(--fg-subtle);
  font-size: 14.5px;
  line-height: 1.6;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-hover);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.ticket-row .t-name {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}
.ticket-row .t-sub {
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--fg-muted);
  margin-top: 2px;
}
.ticket-row .t-price {
  font-weight: 800;
  color: var(--primary);
  font-size: 16px;
  white-space: nowrap;
}

.t-flags { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }

.t-flag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 2px 8px;
  border-radius: 999px;
}
.t-flag-pop { background: rgba(253, 126, 20, .15); color: #fd7e14; }
.t-flag-top { background: rgba(230, 195, 92, .14); color: #e6c35c; }

.ticket-row.soldout { opacity: .55; }
.ticket-row.soldout .t-price { color: var(--danger); }

.modal-actions { display: flex; justify-content: flex-end; gap: 12px; }

/* ---------- select tickets view (seat map) ---------- */

.modal-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.modal-view[hidden] { display: none; }

.select-actions { justify-content: space-between; }

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.select-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg-muted);
}
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.legend .lg-free { background: #20262f; outline: 1px solid #2c3440; outline-offset: -1px; }
.legend .lg-booked { background: rgba(220, 53, 69, .28); outline: 1px solid rgba(220, 53, 69, .5); outline-offset: -1px; }
.legend .lg-selected { background: var(--primary); }

.viewing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fd7e14;
}
.viewing .eye { width: 15px; height: 15px; flex: none; }
.viewing b { font-size: 14px; }

.seatmap-wrap {
  background: var(--surface-hover);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: var(--radius-sm);
  padding: 18px 14px 12px;
}

.stage {
  margin: 0 auto 16px;
  width: 74%;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .35em;
  text-indent: .35em;
  color: var(--primary);
  background: linear-gradient(180deg, rgba(77, 170, 228, .30), rgba(77, 170, 228, .07));
  border-radius: 999px;
  padding: 8px 0 7px;
  user-select: none;
}

.zone { margin-bottom: 8px; }

.zone-label {
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-label);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}

.seat {
  width: 20px;
  height: 20px;
  border: 0;
  padding: 0;
  border-radius: 5px;
  background: #20262f;
  outline: 1px solid #2c3440;
  outline-offset: -1px;
  cursor: pointer;
  transition: background-color .15s ease, outline-color .15s ease, box-shadow .15s ease;
}
.seat:hover {
  background: rgba(77, 170, 228, .45);
  outline-color: var(--primary);
}
.seat.booked {
  background: rgba(220, 53, 69, .26);
  outline-color: rgba(220, 53, 69, .5);
  cursor: not-allowed;
}
.seat.booked:hover { background: rgba(220, 53, 69, .26); outline-color: rgba(220, 53, 69, .5); }
.seat.selected {
  background: var(--primary);
  outline-color: #fff;
  box-shadow: 0 0 10px rgba(77, 170, 228, .6);
}
.seat.flash { animation: seatFlash .9s ease; }

@keyframes seatFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
  30% {
    box-shadow: 0 0 14px 5px rgba(220, 53, 69, .7);
    background: rgba(220, 53, 69, .6);
  }
}

.seat-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--fg-muted);
  font-size: 12.5px;
}
.seat-hint svg { width: 14px; height: 14px; color: var(--primary); flex: none; }

.summary {
  background: var(--surface-hover);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.summary-empty {
  color: var(--fg-muted);
  font-size: 13.5px;
  text-align: center;
  padding: 4px 0;
}

.summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.summary-head .sh-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fg-muted);
}

.clear-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  font-weight: 700;
  font-size: 12.5px;
}
.clear-link:hover { color: var(--link-hover); }

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  padding: 5px 0;
}
.summary-row .s-seat { color: #fff; font-weight: 700; }
.summary-row .s-tier { color: var(--fg-muted); }
.summary-row .s-price { color: var(--primary); font-weight: 800; }

.summary-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 10px;
  font-weight: 800;
  font-size: 14.5px;
}
.summary-total .s-price { color: var(--primary); }

/* ---------- profile (личный кабинет) ---------- */

/* unclaimed gift card at the top of the Orders tab */
.gift-order-card {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--surface-hover);
  outline: 1px solid rgba(77, 170, 228, .5);
  outline-offset: -1px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
  overflow: hidden;
}

.gift-order-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px 110px at 12% 0%, rgba(77, 170, 228, .16), transparent 70%);
  pointer-events: none;
}

.go-poster {
  position: relative;
  width: 86px;
  flex: none;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
}

.go-info {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.go-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.go-tier { font-size: 14px; font-weight: 700; color: var(--fg-secondary); }
.go-tier s { color: var(--fg-muted); margin-left: 6px; }
.go-tier .gift-free { color: #35d94a; margin-left: 8px; }

.gift-tag {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(77, 170, 228, .12);
  padding: 3px 10px;
  border-radius: 999px;
  width: fit-content;
}

.gift-free-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
}

.gift-order-card .btn { flex: none; }

/* "download ticket" action on claimed gift rows */
.o-dl {
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  font-weight: 700;
  font-size: 12.5px;
  margin-top: 5px;
}
.o-dl:hover { color: var(--link-hover); }

@media (max-width: 700px) {
  .gift-order-card { flex-direction: column; align-items: stretch; }
  .go-poster { width: 96px; }
  .gift-order-card .btn { width: 100%; }
}

/* entrance (logged out) */
.profile-entrance {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 40px 20px 30px;
}

.entrance-title { margin: 0; font-size: 26px; font-weight: 800; color: #fff; }

.entrance-text {
  margin: 0;
  color: var(--fg-muted);
  font-size: 15px;
  max-width: 460px;
  line-height: 1.5;
}

.entrance-actions { display: flex; gap: 14px; margin-top: 8px; }

@media (max-width: 640px) {
  .gift-banner { flex-direction: column; }
  .gift-poster { width: 60%; margin: 0 auto; }
  .gift-title { font-size: 19px; }
}

.profile-view { margin: 4px 8px 0; }

.profile-layout {
  display: flex;
  gap: 36px;
  align-items: flex-start;
}

.profile-nav {
  width: 264px;
  flex: none;
}

.pnav-group {
  list-style: none;
  margin: 0 0 18px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--neutral-dim);
}
.pnav-group:last-child { border-bottom: 0; }

.pnav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--fg-subtle);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
  margin-bottom: 4px;
}
.pnav-item:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.pnav-item.active { color: #fff; background: rgba(77, 170, 228, .14); }
.pnav-item.active .pnav-ic { color: var(--primary); }

.pnav-ic {
  width: 18px;
  text-align: center;
  flex: none;
  font-style: normal;
  font-size: 14px;
}

.pnav-logout:hover { color: var(--danger-fg); background: rgba(220, 53, 69, .1); }

.profile-content { flex: 1; min-width: 0; }

.pane { display: flex; flex-direction: column; gap: 18px; }
.pane[hidden] { display: none; }

.pane-title {
  position: relative;
  margin: 0 0 4px;
  padding-bottom: 12px;
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  width: fit-content;
}
.pane-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 68px;
  height: 4px;
  border-radius: 999px;
  background: var(--link);
}

/* segmented tabs */
.seg-tabs {
  display: flex;
  background: rgba(22, 27, 34, .7);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: var(--radius);
  padding: 4px;
  gap: 2px;
  overflow-x: auto;
}

.seg {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--fg-secondary);
  font: inherit;
  font-weight: 700;
  font-size: 13.5px;
  padding: 8px 14px;
  border-radius: calc(var(--radius) - 2px);
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.seg:hover { color: #fff; }
.seg.active {
  background: rgba(77, 170, 228, .14);
  color: var(--primary);
}

/* forms */
.pform {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 460px;
}

.pfield { display: flex; flex-direction: column; gap: 6px; }
.pfield span {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.pfield input {
  background: var(--surface-hover);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #fff;
  font: inherit;
  font-size: 16px; /* ≥16px prevents iOS focus zoom */
  padding: 11px 14px;
  transition: outline-color .15s ease;
}
.pfield input:focus { outline-color: var(--primary); }
.pfield input:disabled { color: var(--fg-muted); background: rgba(22, 27, 34, .4); }

.pfield-row { display: flex; gap: 14px; }
.pfield-row .pfield { flex: 1; }

.pform-actions { display: flex; gap: 12px; }
.btn-block { width: 100%; }

/* orders */
.order-list { display: flex; flex-direction: column; gap: 12px; }

.order-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-hover);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: var(--radius);
  padding: 14px 18px;
  flex-wrap: wrap;
}

.order-row .o-poster {
  width: 52px;
  height: 64px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  flex: none;
}

.order-row .o-main { flex: 1; min-width: 180px; }
.order-row .o-title { color: #fff; font-weight: 700; font-size: 15.5px; }
.order-row .o-sub { color: var(--fg-muted); font-size: 12.5px; margin-top: 3px; }
.order-row .o-sub b { color: var(--fg-secondary); }
.order-row .o-right { text-align: right; }
.order-row .o-total { color: var(--primary); font-weight: 800; font-size: 16px; }
.order-row .o-id { color: var(--fg-label); font-size: 11.5px; margin-top: 3px; font-family: ui-monospace, monospace; }

.o-status {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(77, 170, 228, .14);
  color: var(--primary);
}

/* my events + wishlist grids */
.my-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.mini-event {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  min-width: 0; /* same fix for the profile grids */
  border-radius: var(--radius);
  background: var(--surface-hover);
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, background-color .18s ease;
}
.mini-event:hover { transform: translateY(-3px); background: #1a2029; }

.mini-event .m-poster {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  position: relative;
}

.mini-event h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mini-event .m-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
  color: var(--fg-muted);
}
.mini-event .m-meta b { color: var(--fg-secondary); font-weight: 600; }

.m-remove {
  align-self: flex-start;
  background: none;
  border: 0;
  color: var(--fg-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 0;
}
.m-remove:hover { color: var(--danger-fg); }

/* empty states */
.empty-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 240px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .02);
  color: var(--fg-muted);
  font-size: 15px;
  text-align: center;
  padding: 20px;
}
.empty-ic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--fg-label);
  color: var(--fg-label);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

/* payment cards */
.card-list { display: flex; flex-direction: column; gap: 10px; max-width: 460px; }

.pay-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-hover);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: var(--radius);
  padding: 14px 18px;
}
.pay-card .pc-brand { font-weight: 800; color: #fff; font-size: 15px; }
.pay-card .pc-num {
  font-family: ui-monospace, monospace;
  color: var(--fg-secondary);
  letter-spacing: .08em;
  margin-top: 2px;
  font-size: 13px;
}
.pay-card .pc-exp { color: var(--fg-muted); font-size: 12.5px; margin-top: 2px; }
.pay-card .pc-remove {
  background: none;
  border: 0;
  color: var(--fg-muted);
  font-weight: 700;
  font-size: 12.5px;
}
.pay-card .pc-remove:hover { color: var(--danger-fg); }

/* settings */
.setting-list { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }

.setting {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-hover);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  cursor: pointer;
  font-size: 14.5px;
  color: var(--fg-secondary);
}
.setting input { accent-color: var(--primary); width: 17px; height: 17px; }
.setting input:disabled { opacity: .5; }

/* help list */
.help-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.help-list a {
  color: var(--link);
  font-weight: 700;
  font-size: 14.5px;
}
.help-list a:hover { color: var(--link-hover); }

/* wishlist heart on event cards */
.wish-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
  color: #fff;
  transition: background-color .15s ease, transform .1s ease;
}
.wish-btn:hover { background: rgba(0, 0, 0, .75); }
.wish-btn svg { width: 16px; height: 16px; }
.wish-btn.saved {
  color: #ff4d6d;
  background: rgba(0, 0, 0, .65);
}
.wish-btn.saved svg { fill: currentColor; }

/* auth modal */
.auth-card {
  width: min(420px, 100%);
  grid-template-columns: 1fr;
  display: block;
}

.auth-body {
  padding: 30px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-head { display: flex; flex-direction: column; gap: 6px; }
.auth-head .logo-text { font-size: 22px; }
.auth-sub { margin: 0; color: var(--fg-muted); font-size: 13.5px; }

.auth-error {
  margin: 0;
  color: var(--danger-fg);
  background: rgba(220, 53, 69, .12);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
}

/* gift ticket flow (claim → seat → download) */
.gift-flow-card {
  width: min(760px, 100%);
  grid-template-columns: 1fr;
  display: block;
  padding: 0;
}

.gift-flow-card .modal-close { z-index: 5; }

.gf-step { padding: 26px 30px 24px; display: flex; flex-direction: column; gap: 18px; }
.gf-step[hidden] { display: none; }

#gfStep1 {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 26px;
  align-items: center;
}

.gf-poster {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
}

.gf-body { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; min-width: 0; }

.gf-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}

.gf-tier { font-size: 15.5px; font-weight: 700; color: var(--fg-secondary); }

.gf-value { display: flex; align-items: center; gap: 12px; }
.gf-old {
  color: var(--fg-muted);
  text-decoration: line-through;
  font-size: 17px;
  font-weight: 700;
}
.gf-new {
  color: #35d94a;
  font-size: 24px;
  font-weight: 800;
}

.gf-text { margin: 0; color: var(--fg-muted); font-size: 13.5px; line-height: 1.55; }

.gf-head {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

#gfStep2 .seatmap-wrap { padding: 16px 12px 10px; }

.gf-actions { display: flex; justify-content: flex-end; gap: 12px; }

.gf-ticket {
  width: 100%;
  border-radius: var(--radius-sm);
  outline: 1px solid var(--border);
  outline-offset: -1px;
}

#gfStep3 { align-items: stretch; }
#gfStep3 .link-switch { align-self: center; margin-top: 2px; }

@media (max-width: 640px) {
  #gfStep1 { grid-template-columns: 1fr; }
  .gf-poster { max-width: 200px; margin: 0 auto; }
  .gf-title { font-size: 21px; }
}

/* magic link overlay */

.link-switch {
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  font-weight: 700;
  font-size: 13.5px;
  text-align: center;
}
.link-switch:hover { color: var(--link-hover); }

#magicForm, #magicSent { display: flex; flex-direction: column; gap: 16px; }

.magic-ok {
  width: 52px;
  height: 52px;
  margin: 4px auto 0;
  border-radius: 50%;
  background: rgba(7, 188, 12, .15);
  color: #35d94a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
}

.magic-text { margin: 0; color: #fff; font-size: 15px; text-align: center; }
.magic-text b { color: var(--primary); }

.magic-note {
  margin: 0;
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.magic-link-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-hover);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.magic-link-box span {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--fg-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.magic-actions { display: flex; gap: 12px; }
.magic-actions .btn { flex: 1; padding: 11px 12px; font-size: 14px; }

.magic-demo {
  margin: 0;
  color: var(--fg-label);
  font-size: 11.5px;
  text-align: center;
}

/* header user chip */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  padding: 4px 6px;
  transition: color .15s ease;
}
.user-chip:hover { color: var(--info-fg); }
.user-chip .uc-ava {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex: none;
}

@media (max-width: 900px) {
  .profile-layout { flex-direction: column; gap: 18px; }
  .profile-nav {
    width: 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .pnav-group {
    display: flex;
    gap: 6px;
    border-bottom: 0;
    margin: 0;
    padding: 0 6px 0 0;
    border-right: 1px solid var(--neutral-dim);
  }
  .pnav-group:last-child { border-right: 0; }
  .pnav-item { white-space: nowrap; margin: 0; }
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--surface-card);
  color: #fff;
  outline: 1px solid var(--primary);
  outline-offset: -1px;
  border-radius: 999px;
  padding: 12px 26px;
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: var(--shadow-card);
  animation: modalIn .22s ease;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .modal-card { grid-template-columns: 1fr; }
  .modal-poster { min-height: 220px; }
  .hero-body { flex-direction: column; text-align: center; align-items: center; gap: 24px; padding: 36px 20px; }
  .hero-info { align-items: center; }
  .hero-meta { align-items: center; }
  .hero-desc { -webkit-line-clamp: 4; }
  .hero-title { font-size: 26px; }
}

@media (max-width: 640px) {
  .seat { width: 15px; height: 15px; border-radius: 4px; }
  .seat-row { gap: 4px; }
  .stage { width: 88%; }
  .select-toolbar { justify-content: center; }
}

@media (max-width: 640px) {
  .page { padding: 0; }
  .sticky-wrap { top: 0; }
  .glass-bar {
    border-radius: 0;
    padding: 14px 18px;
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .hero { margin: 12px 0 0; }
  .hero-nav { display: none; }
  .hero-poster-frame { width: 200px; }
  .hero-body { padding: 28px 16px; min-height: 0; }
  .hero-slide { min-height: 0; }
  .search-band { margin: 28px 0 0; }
  .search-box { border-radius: var(--radius); padding-left: 16px; }

  /* two-column event grid on phones */
  .event-grid { grid-template-columns: repeat(2, 1fr); padding: 0; gap: 12px; }
  .event-card { padding: 10px; gap: 10px; }
  .event-card h2 { font-size: 14.5px; min-height: 2.5em; }
  .event-card .meta .meta-item { font-size: 12.5px; }
  .p-chip { font-size: 10px; padding: 3px 8px; max-width: 100%; }
  .wish-btn { width: 30px; height: 30px; }

  /* compact modals */
  .modal { padding: 10px; }
  .modal-card { max-height: 94vh; }
  .modal-body { padding: 20px 18px; }
  .auth-body { padding: 24px 20px 22px; }
  .gf-step { padding: 20px 16px; }

  /* header user chip: long names get an ellipsis */
  .user-chip span:last-child {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* bigger tap targets for slider dots */
  .dot { width: 13px; height: 13px; }

  .footer-bar { justify-content: center; text-align: center; }
  .footer-left { justify-content: center; width: 100%; }
  .footer-links { justify-content: center; width: 100%; }
}

@media (max-width: 400px) {
  .hero-title { font-size: 21px; }
  .user-chip span:last-child { max-width: 110px; }
  .event-grid { gap: 10px; }
}
