* { box-sizing: border-box; }
html { background: #0c111f; }
body { min-width: 320px; margin: 0; color: #f8fafc; background: #0c111f; font-family: Tahoma, Arial, sans-serif; }
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, [tabindex="0"]:focus-visible { outline: 2px solid #facc15; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.page-shell { min-height: 100vh; overflow-x: hidden; color: #f8fafc; background: #0c111f; }
.topbar { position: relative; display: flex; align-items: center; justify-content: center; min-height: 88px; padding: 16px 22px; border-bottom: 1px solid #1d2638; background: #111827; }
.topbar h1 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .01em; }
.back-link { position: absolute; top: 15px; right: 20px; display: grid; width: 38px; height: 38px; place-items: center; color: #d1d5db; border: 1px solid transparent; border-radius: 7px; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.back-link:hover { color: #fff; border-color: #334155; background: #1f2937; }
.back-link svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.event-heading { position: absolute; right: 22px; bottom: 12px; text-align: right; }
.event-heading__title { font-size: 15px; font-weight: 800; line-height: 1.25; }
.event-heading__meta { margin-top: 4px; color: #94a3b8; font-size: 10px; font-weight: 400; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; padding: 16px; direction: ltr; }
.map-column, .legend-card { direction: rtl; }
.map-column { min-width: 0; }
.map-viewport { position: relative; width: 100%; height: 600px; overflow: hidden; border-radius: 8px; background: #0c111f; box-shadow: inset 0 0 0 1px rgba(30, 41, 59, .34); touch-action: none; cursor: grab; user-select: none; }
.map-viewport.is-dragging { cursor: grabbing; }
.map-viewport:not(.is-dragging) .map-art { transition: transform 280ms cubic-bezier(.23, 1, .32, 1); }
.map-art { position: absolute; top: 30%; left: 80%; width: 1000px; height: 800px; margin-top: -350px; margin-left: -500px; overflow: hidden; background: url("../assets/images/arena-seat-map.svg") center / 100% 100% no-repeat; transform-origin: center center; will-change: transform; }
.map-overlay { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: url("../assets/images/stage-overlay.png") center / 100% 100% no-repeat; opacity: 1; transition: opacity .2s ease; }
.map-art.is-overview-view { cursor: zoom-in; }
.map-art.is-overview-view .seat-dot { pointer-events: none; opacity: 0; }
.map-art.is-section-view .map-overlay { opacity: .34; }
.map-art.is-section-view .seat-dot { opacity: 1; }
.seat-dot { position: absolute; z-index: 1; width: 4px; height: 4px; padding: 0; border: 0; border-radius: 50%; transform: none; transform-origin: top left; opacity: 1; transition: transform .18s ease, filter .18s ease, box-shadow .18s ease, opacity .15s ease; }
.seat-dot.is-available { cursor: pointer; }
.seat-dot.is-available:hover { z-index: 5; transform: scale(1.85); filter: brightness(1.18); box-shadow: 0 0 8px currentColor; }
.seat-dot.is-unavailable { cursor: not-allowed; }
.seat-dot.is-selected { z-index: 6; transform: scale(2.15); box-shadow: 0 0 0 2px #fef08a, 0 0 12px #facc15; }

.zoom-controls { position: absolute; z-index: 10; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 8px; }
.zoom-controls button { display: grid; width: 38px; height: 38px; padding: 8px; place-items: center; color: #f8fafc; border: 0; border-radius: 7px; background: #374151; box-shadow: 0 5px 12px rgba(0, 0, 0, .22); cursor: pointer; transition: background .18s ease, transform .18s ease; }
.zoom-controls button:hover { background: #4b5563; transform: translateY(-1px); }
.zoom-controls button:active { transform: scale(.96); }
.zoom-controls svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.selection-card { position: absolute; z-index: 20; bottom: 16px; left: 16px; min-width: 245px; padding: 12px 14px 11px; color: #e5e7eb; border: 1px solid #334155; border-radius: 8px; background: rgba(17, 24, 39, .94); box-shadow: 0 16px 32px rgba(0, 0, 0, .3); animation: card-in .18s ease-out both; }
.selection-card__price { color: #f8fafc; font-size: 13px; font-weight: 800; }
.selection-card__seat { margin-top: 3px; color: #94a3b8; font-size: 11px; }
.selection-card__actions { display: flex; gap: 8px; margin-top: 11px; }
.selection-action { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: 0; border-radius: 5px; font-size: 11px; cursor: pointer; transition: transform .15s ease, filter .15s ease; }
.selection-action:hover { filter: brightness(1.15); }
.selection-action:active { transform: scale(.97); }
.selection-action svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.selection-action--cancel { color: #cbd5e1; background: #334155; }
.selection-action--confirm { color: #052e16; background: #86efac; }

.legend-card { min-height: 632px; padding: 16px; border-radius: 8px; background: #111827; box-shadow: 0 14px 32px rgba(0, 0, 0, .12); }
.legend-card__header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; color: #f8fafc; border-bottom: 1px solid #1f2937; font-size: 13px; font-weight: 700; }
.available-count { color: #64748b; font-size: 10px; font-weight: 400; }
.legend-list { display: flex; flex-direction: column; gap: 17px; padding-top: 17px; }
.legend-item { display: flex; flex-direction: row; align-items: center; gap: 11px; direction: rtl; }
.legend-swatch { display: block; flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .04); }
.swatch-vvip { background: #a855f7; }.swatch-vip { background: #ef4444; }.swatch-royal { background: #166534; }.swatch-diamond { background: #22d3ee; }.swatch-platinum { background: #f8fafc; }.swatch-gold { background: #eab308; }.swatch-silver { background: #9ca3af; }.swatch-bronze { background: #f97316; }
.legend-copy { flex: 1; min-width: 0; }
.legend-title { display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 8px; color: #f8fafc; direction: rtl; font-size: 13px; line-height: 1.15; }
.legend-title strong { font-weight: 600; }
.legend-title span { color: #cbd5e1; font-size: 11px; white-space: nowrap; }
.legend-description { margin-top: 5px; color: #64748b; font-size: 10px; }
.legend-footer { display: flex; align-items: center; gap: 8px; margin-top: 28px; padding-top: 14px; color: #64748b; border-top: 1px solid #1f2937; font-size: 10px; }
.legend-footer__dot { width: 7px; height: 7px; border-radius: 50%; background: #f97316; }

.seat-map-page.has-selected-seats { padding-bottom: 190px; }
.seat-selection-bar { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; padding: 16px; color: #fff; border-top: 1px solid #374151; background: #111827; box-shadow: 0 -14px 35px rgba(0, 0, 0, .3); }
.seat-selection-bar__list { max-height: 128px; margin-bottom: 16px; overflow-y: auto; }
.seat-selection-bar h2 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.seat-selection-bar__items { display: flex; flex-direction: column; gap: 4px; }
.seat-selection-bar__item { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; padding: 8px; color: #f8fafc; border: 0; border-radius: 4px; background: #1f2937; font-size: 14px; text-align: right; cursor: pointer; transition: background-color 160ms ease; }
.seat-selection-bar__item:hover { background: #293548; }
.seat-selection-bar__price { flex: 0 0 auto; font-weight: 500; }
.seat-selection-bar__checkout { display: flex; width: 100%; align-items: center; justify-content: space-between; }
.seat-selection-bar__checkout a { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; color: #fff; border-radius: 8px; font-size: 18px; font-weight: 700; text-align: center; }
.seat-selection-bar__gradient { width: 100%; padding: 1px; border-radius: 8px; background: linear-gradient(90deg, #3b82f6, #a855f7, #f97316); }
.seat-selection-bar__button { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px; border-radius: 7px; background: #0c111f; font-size: 14px; font-weight: 500; }
.seat-selection-bar__button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@keyframes card-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 900px) { .content-grid { grid-template-columns: minmax(0, 1fr) 288px; gap: 16px; } .map-viewport { height: 520px; } .legend-card { min-height: 552px; padding: 13px; } .legend-list { gap: 13px; padding-top: 14px; } }
@media (max-width: 700px) { .topbar { min-height: 112px; padding-top: 19px; align-items: flex-start; } .event-heading { right: 17px; bottom: 12px; } .content-grid { grid-template-columns: 1fr; gap: 6px; padding: 12px; } .map-viewport { height: 400px; } .map-art { top: 30%; left: 50%; } .zoom-controls { top: auto; right: 12px; bottom: 12px; left: auto; flex-direction: row; } .legend-card { min-height: auto; padding: 0 0 16px; border-radius: 0; background: #0c111f; box-shadow: none; } .legend-card__header, .legend-footer { display: none; } .legend-list { gap: 16px; padding: 16px 12px 0; } .legend-item { padding: 0 4px; } }
@media (min-width: 768px) { .seat-selection-bar { padding-inline: max(16px, calc((100vw - 1120px) / 2)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
