/* ============================================================
   TicketRush v3 — macOS Desktop Theme
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:    #1a73e8;
  --blue-d:  #1558b0;
  --red:     #e53935;
  --green:   #2e7d32;
  --yellow:  #f9a825;
  --bg:      #1c2b4a;
  --card:    #1e1e2e;
  --card2:   #252535;
  --border:  #3a3a5e;
  --text:    #eeeeff;
  --muted:   #7070a0;
  --vip:     #ffd700;
  --lower:   #ff9f43;
  --club:    #4fc3f7;
  --upper:   #a5d6a7;
  --taken:   #2a2a2a;
  --radius:  12px;
  --th-blue: #003580;
  --dock-h:  82px;
  --menubar-h: 28px;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  background: #0d0d0d;
  color: var(--text);
}

/* ============================================================
   macOS MENU BAR
   ============================================================ */
#macos-menubar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--menubar-h);
  background: rgba(30, 30, 50, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 1000;
  user-select: none;
}
.mb-left { display: flex; align-items: center; gap: 2px; }
.mb-apple { font-size: 1rem; margin-right: 8px; cursor: default; }
.mb-appname { font-weight: 700; font-size: 0.82rem; color: #fff; margin-right: 10px; }
.mb-menu {
  font-size: 0.8rem; color: rgba(255,255,255,0.82);
  padding: 2px 8px; border-radius: 5px; cursor: default;
  transition: background 0.1s;
}
.mb-menu:hover { background: rgba(255,255,255,0.12); }
.mb-right { display: flex; align-items: center; gap: 10px; }
.mb-icon { font-size: 0.78rem; color: rgba(255,255,255,0.85); cursor: default; white-space: nowrap; }
.mb-wifi-btn { cursor: pointer; padding: 2px 6px; border-radius: 5px; transition: background 0.1s; position: relative; }
.mb-wifi-btn:hover { background: rgba(255,255,255,0.12); }
#mb-wifi-icon { font-size: 0.72rem; letter-spacing: -2px; }

/* WiFi Dropdown */
.wifi-dropdown {
  position: fixed;
  top: var(--menubar-h);
  right: 90px;
  background: rgba(40, 40, 60, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px 0;
  min-width: 220px;
  z-index: 2000;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.wifi-dropdown.hidden { display: none; }
.wifi-title { font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,0.5); padding: 4px 14px 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.wifi-sep { height: 1px; background: rgba(255,255,255,0.1); margin: 4px 0; }
.wifi-net {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; cursor: pointer; transition: background 0.1s;
}
.wifi-net:hover { background: rgba(255,255,255,0.08); }
.wifi-check { color: #34c759; font-size: 0.9rem; font-weight: 700; width: 14px; }
.wifi-check.hidden { visibility: hidden; }
.wifi-neticon { font-size: 1rem; }
.wifi-netname { font-size: 0.82rem; color: #eee; flex: 1; }
.wifi-speed { font-size: 0.72rem; color: #6eb4ff; }

/* ============================================================
   DESKTOP
   ============================================================ */
#desktop {
  position: fixed;
  top: var(--menubar-h);
  left: 0; right: 0;
  bottom: var(--dock-h);
  background: linear-gradient(135deg, #1c2b4a 0%, #0d1a35 40%, #1a0a30 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Desktop subtle grid */
#desktop::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* ============================================================
   macOS WINDOW
   ============================================================ */
#mac-window {
  position: relative;
  width: min(900px, calc(100vw - 32px));
  height: min(680px, calc(100vh - var(--menubar-h) - var(--dock-h) - 16px));
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}

#mac-titlebar {
  background: linear-gradient(to bottom, #2a2a40, #222235);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  flex-shrink: 0;
  cursor: default;
}
.traffic-lights { display: flex; gap: 7px; align-items: center; }
.tl {
  width: 13px; height: 13px; border-radius: 50%; cursor: pointer;
  transition: filter 0.15s;
}
.tl:hover { filter: brightness(1.3); }
.tl-red    { background: #ff5f57; }
.tl-yellow { background: #ffbd2e; }
.tl-green  { background: #28c840; }
#mac-window-title {
  flex: 1; text-align: center;
  font-size: 0.82rem; font-weight: 600;
  color: rgba(255,255,255,0.6);
}
.tl-spacer { width: 58px; }

#mac-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}
#mac-content::-webkit-scrollbar { width: 6px; }
#mac-content::-webkit-scrollbar-track { background: transparent; }
#mac-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* ============================================================
   SCREENS
   ============================================================ */
.screen { display: none; }
.screen.active { display: block; animation: fadeIn 0.2s ease; }
.screen-inner { padding: 28px 32px 40px; }

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

/* ============================================================
   SHARED COMPONENTS
   ============================================================ */
.logo {
  font-size: 2rem; font-weight: 900; letter-spacing: -1px;
  margin-bottom: 6px; text-align: center;
  background: linear-gradient(135deg, #6eb4ff, #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.subtitle { color: var(--muted); margin-bottom: 24px; font-size: 0.9rem; text-align: center; }

.btn-primary {
  background: linear-gradient(135deg, #1a73e8, #6c63ff);
  color: #fff; border: none; border-radius: 10px;
  padding: 14px 28px; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.15s; width: 100%; max-width: 320px;
  margin-top: 14px;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.4; cursor: default; }

.btn-secondary {
  background: var(--card2); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 13px 28px; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s; width: 100%; max-width: 320px; margin-top: 8px;
}
.btn-secondary:hover { background: #2a2a3e; }

.budget-pill {
  background: #1a2a1a; border: 1px solid #2e5a2e; border-radius: 20px;
  padding: 5px 14px; font-size: 0.82rem; color: #a5d6a7;
}

/* ============================================================
   TOAST
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: calc(var(--dock-h) + 16px);
  left: 50%; transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: rgba(30,30,50,0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 0.85rem;
  color: #eee;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
  white-space: nowrap;
}
@keyframes toastIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@keyframes toastOut { to { opacity:0; transform:translateY(-8px); } }

/* ============================================================
   BUDGET REVEAL
   ============================================================ */
#screen-budget .budget-reveal-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 500px; padding: 32px;
  text-align: center;
}
.budget-fate-card {
  background: linear-gradient(135deg, #1a2a4a, #2a1a4a);
  border: 2px solid #4a4a8a;
  border-radius: 20px;
  padding: 36px 48px;
  margin: 24px 0;
  min-width: 280px;
}
.fate-label { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; }
.fate-amount { font-size: 4rem; font-weight: 900; color: #6eb4ff; line-height: 1; margin-bottom: 8px; }
.fate-sub { font-size: 0.9rem; color: var(--muted); }
.fate-progress-wrap { width: 280px; height: 4px; background: #2a2a4a; border-radius: 2px; margin: 8px 0 16px; overflow: hidden; }
.fate-progress { height: 100%; background: linear-gradient(90deg,#1a73e8,#a78bfa); border-radius: 2px; transition: width 0.1s linear; }
.fate-caption { font-size: 0.85rem; color: var(--muted); font-style: italic; }

/* ============================================================
   CONCERT SELECT
   ============================================================ */
.budget-bar { font-size: 0.88rem; color: var(--muted); margin-bottom: 20px; text-align: center; }
.budget-bar strong { color: #6eb4ff; }
.concert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}
.concert-card {
  background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 22px; cursor: pointer; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative; overflow: hidden;
}
.concert-card:hover { transform: translateY(-2px); border-color: #6eb4ff; box-shadow: 0 8px 24px rgba(110,180,255,0.12); }
.concert-card .badge {
  position: absolute; top: 14px; right: 14px;
  background: var(--red); color: #fff; font-size: 0.65rem; font-weight: 700;
  padding: 3px 9px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px;
}
.concert-card .badge.hot { background: var(--yellow); color: #000; }
.concert-card .badge.impossible { background: #1a0030; color: #cc88ff; border: 1px solid #6622aa; }
.concert-emoji { font-size: 2.4rem; margin-bottom: 10px; }
.concert-artist { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.concert-tour { font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
.concert-meta { display: flex; gap: 12px; font-size: 0.78rem; color: var(--muted); flex-wrap: wrap; margin-bottom: 12px; }
.concert-prices { display: flex; gap: 8px; flex-wrap: wrap; }
.price-tag {
  font-size: 0.75rem; padding: 4px 10px; border-radius: 8px; font-weight: 600;
}
.price-tag.vip   { background: #2a2200; color: var(--vip); }
.price-tag.lower { background: #2a1a00; color: var(--lower); }
.price-tag.club  { background: #0a2030; color: var(--club); }
.price-tag.upper { background: #0a200a; color: var(--upper); }
.over-budget { opacity: 0.4; pointer-events: none; }
.over-budget::after {
  content: 'Over budget'; position: absolute; bottom: 14px; right: 14px;
  font-size: 0.7rem; color: #ff6b6b; font-weight: 700;
}

/* ============================================================
   QUEUE
   ============================================================ */
.queue-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.queue-logo { font-size: 1.2rem; font-weight: 900; }
.queue-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.net-indicator { font-size: 0.78rem; color: var(--muted); }
.concert-title-small { font-size: 0.85rem; color: var(--muted); margin-bottom: 22px; text-align: center; }

.queue-box {
  background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; text-align: center; margin-bottom: 28px;
}
.queue-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }
.queue-position { font-size: 4.5rem; font-weight: 900; color: #6eb4ff; line-height: 1; }
.queue-sub { font-size: 0.88rem; color: var(--muted); margin-top: 6px; margin-bottom: 20px; }
.progress-bar-wrap { background: #1a1a2e; border-radius: 8px; height: 10px; overflow: hidden; margin-bottom: 12px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #1a73e8, #a78bfa); width: 0%; border-radius: 8px; transition: width 0.5s ease; }
.queue-timer { font-size: 0.82rem; color: var(--muted); }

.tab-section { text-align: center; }
.tab-hint { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; line-height: 1.6; }
.btn-tab {
  background: #0d1a30; border: 1px solid #1a73e8; color: #6eb4ff;
  font-size: 0.88rem; font-weight: 600; padding: 11px 22px;
  border-radius: 10px; cursor: pointer; transition: background 0.15s; margin-bottom: 16px;
}
.btn-tab:hover { background: #1a2a4a; }
.btn-tab:disabled { opacity: 0.35; cursor: default; }
.tab-list { display: flex; flex-direction: column; gap: 8px; }
.tab-item {
  background: var(--card2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem;
}
.tab-pos { color: #6eb4ff; font-weight: 700; }
.tab-status { color: var(--muted); font-size: 0.75rem; }
.tab-load { font-size: 0.72rem; color: #ffaa44; }
.tab-item.winning { border-color: #4caf50; }
.tab-item.winning .tab-pos { color: #4caf50; }
.tab-item.loading { border-color: #ff9800; }

/* ============================================================
   STADIUM VIEW
   ============================================================ */
.stadium-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.stadium-title { font-size: 1rem; font-weight: 700; }
.seat-timer-wrap { display: flex; align-items: center; gap: 5px; font-size: 0.92rem; color: var(--muted); }
.seat-timer { font-size: 1.8rem; font-weight: 900; color: var(--red); min-width: 32px; text-align: center; }
.seat-meta-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.seat-hint { font-size: 0.82rem; color: var(--muted); }

.stadium-container {
  position: relative;
  margin: 0 auto 16px;
  max-width: 600px;
}

/* Oval stadium shape */
.stadium-oval {
  width: 100%;
  padding-bottom: 68%;
  position: relative;
  background: #0a1525;
  border: 3px solid #2a3a5a;
  border-radius: 50%;
  overflow: hidden;
}
.stadium-field {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 38%; height: 60%;
  background: linear-gradient(135deg, #1a5c1a, #2d8a2d);
  border: 2px solid #4caf50;
  border-radius: 40%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.8);
  letter-spacing: 2px; text-transform: uppercase;
  z-index: 2;
}
.stadium-ring {
  position: absolute;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700;
  text-align: center; line-height: 1.2;
}
.stadium-ring:hover:not(.ring-soldout) { filter: brightness(1.3); transform: scale(1.01); }
.ring-vip    { background: rgba(255,215,0,0.22); border: 2px solid var(--vip); color: var(--vip); }
.ring-lower  { background: rgba(255,159,67,0.18); border: 2px solid var(--lower); color: var(--lower); }
.ring-club   { background: rgba(79,195,247,0.14); border: 2px solid var(--club); color: var(--club); }
.ring-upper  { background: rgba(165,214,167,0.12); border: 2px solid var(--upper); color: var(--upper); }
.ring-soldout { opacity: 0.35; cursor: not-allowed; }
.ring-label { pointer-events: none; }

/* Section grid below oval */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.section-btn {
  background: var(--card2); border: 1.5px solid var(--border);
  border-radius: 9px; padding: 10px 8px; text-align: center;
  cursor: pointer; transition: all 0.15s;
  font-size: 0.72rem;
}
.section-btn:hover:not(.section-soldout) { transform: scale(1.05); }
.section-btn.sec-vip   { border-color: var(--vip); color: var(--vip); }
.section-btn.sec-lower { border-color: var(--lower); color: var(--lower); }
.section-btn.sec-club  { border-color: var(--club); color: var(--club); }
.section-btn.sec-upper { border-color: var(--upper); color: var(--upper); }
.section-btn.section-soldout { opacity: 0.35; cursor: not-allowed; }
.section-btn .sec-num { font-size: 0.9rem; font-weight: 800; display: block; margin-bottom: 2px; }
.section-btn .sec-price { font-size: 0.68rem; color: var(--muted); }
.section-btn .sec-avail { font-size: 0.65rem; margin-top: 3px; }

.stadium-legend {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  font-size: 0.78rem; color: var(--muted);
  margin-top: 10px;
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.dot-vip   { background: var(--vip); }
.dot-lower { background: var(--lower); }
.dot-club  { background: var(--club); }
.dot-upper { background: var(--upper); }
.dot-taken { background: var(--taken); border: 1px solid #444; }

/* ============================================================
   SEAT MAP (Section View)
   ============================================================ */
.seat-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; gap: 8px;
}
.btn-back {
  background: var(--card2); border: 1px solid var(--border); color: #6eb4ff;
  font-size: 0.78rem; padding: 7px 14px; border-radius: 8px; cursor: pointer;
  transition: background 0.15s; white-space: nowrap;
}
.btn-back:hover { background: #1a2a4a; }
.seat-section-title { font-size: 0.95rem; font-weight: 700; flex: 1; text-align: center; }

.stage-label {
  background: #0d0d2e; border: 1px solid #2a2a6a; color: #7c9ecc;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 3px;
  padding: 8px 40px; border-radius: 6px; margin-bottom: 16px;
  display: inline-block; text-transform: uppercase;
}

.seat-map {
  display: grid; gap: 5px;
  width: 100%; margin-bottom: 16px;
  justify-content: center;
}
.seat {
  border-radius: 5px; cursor: pointer; aspect-ratio: 1;
  transition: transform 0.1s, opacity 0.25s; border: none; outline: none;
  min-width: 18px; min-height: 18px;
}
.seat:hover:not(.taken):not(.over-budget-seat) { transform: scale(1.18); z-index: 2; position: relative; }
.seat:active:not(.taken) { transform: scale(0.92); }
.seat.vip   { background: var(--vip); }
.seat.lower { background: var(--lower); }
.seat.club  { background: var(--club); }
.seat.upper { background: var(--upper); }
.seat.taken { background: var(--taken); cursor: default; opacity: 0.4; }
.seat.selected { outline: 3px solid #fff; transform: scale(1.2); z-index: 3; position: relative; }
.seat.over-budget-seat { opacity: 0.25; cursor: not-allowed; }

.seat-legend {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  font-size: 0.75rem; color: var(--muted); margin-top: 8px;
}

/* ============================================================
   CHECKOUT — TicketHub
   ============================================================ */
.checkout-box {
  background: #fff; border-radius: var(--radius);
  width: 100%; max-width: 500px; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  margin: 0 auto;
  color: #111;
}
.tickethub-header {
  background: var(--th-blue); padding: 18px 22px;
  display: flex; justify-content: space-between; align-items: center;
}
.th-logo { color: #fff; font-size: 1.2rem; font-weight: 800; }
.th-secure { color: #a0d0ff; font-size: 0.78rem; }

.checkout-section { padding: 20px 22px; border-bottom: 1px solid #eee; }
.checkout-section-title { font-size: 0.95rem; font-weight: 700; color: #003580; margin-bottom: 16px; }

.th-form { display: flex; flex-direction: column; gap: 10px; }
.th-input {
  border: 1.5px solid #ddd; border-radius: 8px; padding: 11px 14px;
  font-size: 0.9rem; color: #111; outline: none; transition: border-color 0.15s;
  font-family: inherit;
}
.th-input:focus { border-color: var(--th-blue); }
.th-btn {
  background: var(--th-blue); color: #fff; border: none;
  border-radius: 8px; padding: 13px; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: background 0.15s; width: 100%;
  font-family: inherit;
}
.th-btn:hover { background: #004aa0; }
.th-btn:disabled { opacity: 0.4; cursor: default; }
.th-btn-ghost {
  background: transparent; color: var(--th-blue); border: 1.5px solid var(--th-blue);
  border-radius: 8px; padding: 12px; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s; width: 100%;
  font-family: inherit;
}
.th-btn-ghost:hover { background: #f0f4ff; }
.th-divider { text-align: center; font-size: 0.82rem; color: #999; position: relative; }
.th-divider::before, .th-divider::after {
  content:''; position:absolute; top:50%; width:42%; height:1px; background:#ddd;
}
.th-divider::before { left:0; }
.th-divider::after { right:0; }
.th-forgot { font-size: 0.8rem; color: var(--th-blue); cursor: pointer; text-align: center; text-decoration: underline; }

/* Saved cards */
.th-btn-add-card {
  background: #f5f7fa; color: var(--th-blue); border: 1.5px dashed #aac;
  border-radius: 8px; padding: 11px; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; width: 100%; margin-top: 8px; font-family: inherit;
}
.th-btn-add-card:hover { background: #e8eeff; }
.saved-card {
  border: 2px solid #ddd; border-radius: 10px; padding: 14px 16px;
  cursor: pointer; margin-bottom: 10px; display: flex; align-items: center;
  gap: 14px; transition: border-color 0.15s, background 0.15s;
  background: #fafafa;
}
.saved-card:hover { border-color: var(--th-blue); background: #f0f4ff; }
.saved-card.selected { border-color: var(--th-blue); background: #e8f0fe; }
.card-logo { font-size: 1.5rem; }
.card-info { flex: 1; }
.card-name { font-size: 0.85rem; font-weight: 700; color: #111; }
.card-num  { font-size: 0.78rem; color: #666; }
.card-check { color: var(--th-blue); font-size: 1.1rem; }

.ticket-card {
  padding: 18px 22px;
  border-bottom: 1px solid #eee;
}
.tc-event { font-size: 1rem; font-weight: 800; color: #111; margin-bottom: 4px; }
.tc-row { display: flex; justify-content: space-between; font-size: 0.82rem; color: #555; margin-top: 6px; }
.tc-total { font-size: 1.1rem; font-weight: 900; color: #111; margin-top: 12px; }

.touch-id-ring {
  width: 70px; height: 70px; border-radius: 50%;
  border: 3px solid var(--th-blue); display: flex; align-items: center;
  justify-content: center; margin: 18px auto 8px; cursor: pointer;
  transition: box-shadow 0.2s;
  background: #f5f7fa;
}
.touch-id-ring:hover { box-shadow: 0 0 0 6px rgba(0,53,128,0.12); }
.touch-id-icon { font-size: 1.8rem; }
.touch-id-label { font-size: 0.8rem; color: #666; text-align: center; margin-bottom: 12px; }

.payment-status { text-align: center; padding: 8px 22px; font-size: 0.88rem; color: var(--green); min-height: 28px; }

#btn-pay {
  margin: 0 22px 22px;
  width: calc(100% - 44px);
  border-radius: 10px;
}

/* ============================================================
   WIN / LOSS
   ============================================================ */
.win-box, .loss-header {
  text-align: center; padding: 40px 24px 24px;
}
.win-icon, .loss-icon { font-size: 4rem; margin-bottom: 12px; }
.win-box h2, .loss-header h2 { font-size: 1.8rem; font-weight: 900; margin-bottom: 8px; }
.ticket-final {
  background: var(--card2); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; margin: 20px auto; max-width: 360px; text-align: left;
  font-size: 0.88rem; line-height: 1.8;
}

/* LOSS / Resale */
.resale-tabs {
  display: flex; gap: 8px; margin-top: 20px; margin-bottom: 14px;
}
.resale-tab {
  background: var(--card2); border: 1px solid var(--border); color: var(--text);
  font-size: 0.85rem; font-weight: 600; padding: 10px 18px; border-radius: 10px;
  cursor: pointer; transition: all 0.15s; flex: 1; text-align: center;
}
.resale-tab.active { background: #1a2a4a; border-color: #6eb4ff; color: #6eb4ff; }
.resale-tab.sketchy.active { background: #1a0a0a; border-color: #cc3333; color: #ff6666; }
.resale-content { width: 100%; }

/* TicketHub Resale */
.th-resale-item {
  background: #fff; border-radius: 10px; padding: 16px 18px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 14px; color: #111;
}
.th-resale-badge {
  font-size: 0.65rem; font-weight: 700; padding: 3px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
}
.th-resale-badge.official { background: #e3f0ff; color: #003580; }
.th-resale-badge.overpriced { background: #fff3e0; color: #e65100; }
.th-resale-buy {
  background: var(--th-blue); color: #fff; border: none;
  border-radius: 8px; padding: 9px 16px; font-size: 0.82rem; font-weight: 700;
  cursor: pointer; white-space: nowrap; font-family: inherit;
}
.th-resale-buy:hover { background: #004aa0; }
.th-resale-info { flex: 1; }
.th-resale-name { font-weight: 700; font-size: 0.88rem; }
.th-resale-sub { font-size: 0.75rem; color: #666; }

/* ScalpersNet */
.sn-wrapper {
  background: #fffff0;
  border: 2px solid #888;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  border-radius: 4px;
  overflow: hidden;
}
.sn-header {
  background: linear-gradient(to right, #003399, #0055cc);
  padding: 6px 10px; display: flex; justify-content: space-between; align-items: center;
}
.sn-logo { color: #ffff00; font-size: 1rem; font-weight: 900; font-family: Arial, sans-serif; }
.sn-tagline { color: #aaddff; font-size: 0.65rem; }
.sn-ticker {
  background: #000; color: #00ff00; font-family: monospace; font-size: 0.72rem;
  padding: 3px 0; overflow: hidden; white-space: nowrap;
}
.sn-ticker-text { display: inline-block; animation: marquee 14s linear infinite; }
@keyframes marquee { from { transform: translateX(100vw); } to { transform: translateX(-200%); } }
.sn-body { padding: 8px; }
.sn-listing {
  border: 1px solid #aaa; background: #fff; margin-bottom: 8px;
  padding: 8px 10px; display: flex; align-items: flex-start; gap: 8px;
}
.sn-listing-info { flex: 1; }
.sn-listing-title { font-weight: 900; font-size: 0.82rem; color: #000033; }
.sn-seller-link { color: #003399; font-size: 0.72rem; text-decoration: underline; cursor: pointer; }
.sn-price-block { text-align: right; }
.sn-price { font-size: 1.1rem; font-weight: 900; color: #cc0000; display: block; }
.sn-buy-btn {
  background: linear-gradient(to bottom, #ffcc00, #ff9900);
  border: 2px outset #cc7700; color: #000; font-weight: 900;
  font-size: 0.78rem; padding: 6px 14px; cursor: pointer;
  white-space: nowrap; font-family: Arial, sans-serif; margin-top: 4px;
  display: block; width: 100%;
}
.sn-buy-btn:hover { filter: brightness(1.08); }
.sn-stars { color: #ffaa00; font-size: 0.85rem; }
.sn-warning-gif { font-size: 0.62rem; color: #cc0000; font-weight: 700; }
.sn-footer {
  background: #ccc; border-top: 2px solid #888; padding: 4px 8px;
  font-size: 0.65rem; color: #444; font-family: Arial, sans-serif; text-align: center;
}

/* ============================================================
   ScalpersNet CHECKOUT POPUP
   ============================================================ */
.popup-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.72); z-index: 5000;
  align-items: center; justify-content: center; padding: 20px;
}
.popup-overlay.open { display: flex; }

.sn-checkout-popup {
  background: #fffff0; border: 3px solid #888;
  width: 100%; max-width: 460px; max-height: 85vh;
  overflow-y: auto; box-shadow: 8px 8px 0 #444;
  font-family: Arial, sans-serif;
}
.sn-popup-header {
  background: linear-gradient(to right, #003399, #0055cc);
  color: #ffff00; padding: 7px 10px;
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 1;
}
.sn-popup-logo { font-size: 0.85rem; font-weight: 900; }
.sn-popup-close {
  background: #cc0000; color: #fff; border: 2px outset #ff4444;
  font-size: 0.75rem; font-weight: 900; padding: 2px 8px; cursor: pointer;
}
.sn-popup-marquee {
  background: #000; color: #00ff00; font-family: monospace; font-size: 0.7rem;
  padding: 2px 0; overflow: hidden; white-space: nowrap;
}
.sn-popup-marquee span { display: inline-block; animation: marquee 10s linear infinite; }
.sn-popup-body { padding: 14px; font-size: 0.82rem; color: #000; }

/* SN Form steps */
.sn-step-title {
  background: #003399; color: #ffff00; font-weight: 900;
  padding: 5px 10px; font-size: 0.82rem; margin-bottom: 12px; text-align: center;
}
.sn-field { margin-bottom: 10px; }
.sn-field label { display: block; font-size: 0.75rem; font-weight: 700; color: #003399; margin-bottom: 3px; }
.sn-field input, .sn-field select {
  width: 100%; border: 2px inset #888; padding: 6px 8px;
  font-family: Arial, sans-serif; font-size: 0.82rem;
  background: #fff;
}
.sn-field input:focus { outline: 2px solid #003399; }
.sn-submit-btn {
  background: linear-gradient(to bottom, #ffcc00, #ff9900);
  border: 2px outset #cc7700; color: #000; font-weight: 900;
  font-size: 0.88rem; padding: 8px 20px; cursor: pointer;
  width: 100%; margin-top: 8px; font-family: Arial, sans-serif;
}
.sn-submit-btn:hover { filter: brightness(1.08); }
.sn-secure-note {
  font-size: 0.65rem; color: #444; border: 1px solid #ccc;
  background: #f5f5f5; padding: 5px 8px; margin-top: 10px; text-align: center;
}
.sn-spinner {
  text-align: center; padding: 24px;
  font-size: 0.9rem; color: #003399; font-weight: 700;
}
.sn-spinner .spin { font-size: 2rem; display: inline-block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sn-success {
  text-align: center; padding: 16px; background: #eeffee;
  border: 2px solid #00aa00;
}
.sn-success-icon { font-size: 2.5rem; margin-bottom: 8px; }
.sn-order { font-family: monospace; font-size: 0.78rem; background: #fff; border: 1px dashed #888; padding: 6px; margin-top: 8px; }
.sn-error {
  text-align: center; padding: 16px; background: #ffeeee; border: 2px solid #cc0000;
  font-weight: 700; color: #cc0000;
}

/* ============================================================
   SELLER POPUP (existing)
   ============================================================ */
.scalper-popup {
  background: #fffff0; border: 3px solid #888; width: 100%; max-width: 430px;
  font-family: Arial, sans-serif; box-shadow: 6px 6px 0 #444;
  max-height: 85vh; overflow-y: auto;
}
.scalper-popup-header {
  background: linear-gradient(to right, #003399, #0055cc);
  color: #ffff00; padding: 6px 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.scalper-popup-title { font-size: 0.85rem; font-weight: 900; letter-spacing: 0.5px; }
.scalper-popup-close {
  background: #cc0000; color: #fff; border: 2px outset #ff4444;
  font-size: 0.75rem; font-weight: 900; padding: 2px 7px; cursor: pointer;
}
.scalper-popup-body { padding: 12px; font-size: 0.8rem; color: #222; }
.sp-seller-name { font-size: 1rem; font-weight: 900; color: #003399; margin-bottom: 4px; }
.sp-rating { margin-bottom: 8px; }
.sp-badge { display: inline-block; font-size: 0.65rem; padding: 2px 6px; border-radius: 3px; font-weight: 700; margin-right: 4px; }
.sp-badge.power { background: #ffdd00; color: #000; border: 1px solid #cc9900; }
.sp-badge.verified { background: #00aa00; color: #fff; }
.sp-badge.new { background: #cc0000; color: #fff; }
.sp-reviews-title { font-weight: 900; border-bottom: 1px solid #ccc; padding-bottom: 3px; margin-bottom: 8px; color: #003399; }
.sp-review { border: 1px solid #ddd; background: #fff; padding: 7px 9px; margin-bottom: 7px; }
.sp-review-header { display: flex; justify-content: space-between; margin-bottom: 2px; }
.sp-reviewer { font-weight: 700; font-size: 0.75rem; }
.sp-review-stars { font-size: 0.85rem; color: #ffaa00; }
.sp-review-text { font-size: 0.75rem; color: #444; line-height: 1.5; }
.sp-review.bot-review { background: #fffff0; border-color: #ffdd00; }
.sp-review-date { font-size: 0.65rem; color: #888; }
.sp-close-btn {
  background: linear-gradient(to bottom, #ffdd00, #ff9900);
  border: 2px outset #cc7700; color: #000; font-weight: 900;
  font-size: 0.8rem; padding: 7px 20px; cursor: pointer; width: 100%; margin-top: 10px;
  font-family: Arial, sans-serif;
}

/* ============================================================
   FAKE BROWSER WINDOWS
   ============================================================ */
.fake-browser {
  position: absolute;
  top: 50px; left: 30px;
  width: 480px;
  background: #f0f0f0;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  z-index: 100;
  overflow: hidden;
}
.fake-browser.hidden { display: none; }
.browser-titlebar {
  height: 38px;
  display: flex; align-items: center;
  padding: 0 12px;
  gap: 8px;
}
.chrome-bar  { background: #dee1e6; }
.firefox-bar { background: #1c1b22; }
.terminal-bar { background: #1a1a1a; }
.browser-tabs {
  display: flex; gap: 2px; overflow: hidden; flex: 1;
}
.browser-tab {
  background: #f8f8f8; border: 1px solid #ccc; border-bottom: none;
  border-radius: 6px 6px 0 0; padding: 5px 14px; font-size: 0.75rem;
  color: #333; white-space: nowrap; overflow: hidden; max-width: 180px;
}
.firefox-bar .browser-tab { background: #2a2a3a; color: #eee; border-color: #444; }
.browser-tab-add { padding: 5px 10px; font-size: 0.85rem; cursor: pointer; color: #666; }
.browser-urlbar {
  background: #fff; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc;
  display: flex; align-items: center; padding: 5px 10px; gap: 8px;
  font-size: 0.75rem; color: #333;
}
.firefox-bar ~ .browser-urlbar, .firefox-bar + .browser-urlbar { background: #1c1b22; color: #ccc; border-color: #333; }
.browser-back, .browser-forward { color: #888; font-size: 1.1rem; cursor: pointer; }
.browser-url {
  background: #f5f5f5; border: 1px solid #ddd; border-radius: 20px;
  padding: 4px 12px; flex: 1; font-size: 0.72rem; color: #333;
  white-space: nowrap; overflow: hidden;
}
.browser-content { background: #fff; padding: 20px; min-height: 140px; }

/* Mini queue inside browser */
.mini-queue-app { text-align: center; }
.mq-header { font-size: 0.85rem; font-weight: 700; color: #003580; margin-bottom: 12px; }
.mq-pos { font-size: 0.9rem; color: #333; margin-bottom: 8px; }
.mq-pos strong { font-size: 1.4rem; color: #1a73e8; }
.mq-bar-wrap { background: #eee; border-radius: 6px; height: 8px; overflow: hidden; margin-bottom: 8px; }
.mq-bar { height: 100%; background: linear-gradient(90deg, #1a73e8, #6c63ff); width: 0%; transition: width 0.5s; }
.mq-note { font-size: 0.72rem; color: #888; }

/* Terminal */
.terminal-body {
  background: #1a1a1a; padding: 10px 14px; min-height: 120px;
  font-family: monospace; font-size: 0.78rem; color: #00ff00;
}
.term-line { margin-bottom: 3px; line-height: 1.5; }
.term-cursor { animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

/* ============================================================
   DOCK
   ============================================================ */
#macos-dock {
  position: fixed;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  height: var(--dock-h);
  display: flex;
  align-items: flex-end;
  padding-bottom: 8px;
}
.dock-inner {
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  padding: 8px 12px;
  display: flex; align-items: flex-end; gap: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}
.dock-sep {
  width: 1px; height: 44px; background: rgba(255,255,255,0.25); margin: 0 4px; align-self: center;
}
.dock-item {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; position: relative;
  transition: transform 0.15s ease;
}
.dock-item:hover { transform: translateY(-10px) scale(1.22); }
.dock-item:hover .dock-label { opacity: 1; transform: translateY(-2px); }
.dock-icon { font-size: 2rem; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.dock-label {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: rgba(30,30,50,0.92); color: #fff;
  font-size: 0.68rem; font-weight: 600; padding: 3px 8px; border-radius: 6px;
  white-space: nowrap; opacity: 0; transition: opacity 0.15s, transform 0.15s;
  pointer-events: none; margin-bottom: 6px;
}
.dock-dot {
  width: 4px; height: 4px; border-radius: 50%; background: transparent;
  margin-top: 3px; transition: background 0.2s;
}
.dock-dot.active { background: rgba(255,255,255,0.8); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse-red { 0%,100% { color: var(--red); } 50% { color: #ff8a80; } }
.pulse { animation: pulse-red 0.4s infinite; }

@keyframes countup { from { opacity: 0.3; } to { opacity: 1; } }

/* ============================================================
   SCROLLBAR
   ============================================================ */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }
*::-webkit-scrollbar { width: 5px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
