:root { --radius: 10px; }
* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; background: #0d0f14; color: #f7f7f7; }
a { color: #c0a46b; text-decoration: none; }

/* (No global header rule to avoid conflicts with .site-header) */

/* legacy logo class, still okay to keep */
.logo { font-weight: 800; font-size: 1.4rem; letter-spacing: .5px; }

.container { max-width: 1100px; margin: 0 auto; padding: 20px; }
.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: #141925; border: 1px solid #222736; border-radius: var(--radius); padding: 16px; box-shadow: 0 4px 18px rgba(0,0,0,.2); }
.badge { display:inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid #2c3142; background:#0f1320; color:#c0a46b; }
.button { display:inline-block; padding: 10px 14px; border-radius: 8px; border: 1px solid #3b4156; background:#1a2033; color:#fff; cursor:pointer; }
.button:hover { filter: brightness(1.08); }
footer { text-align:center; color:#9095a1; padding: 40px 0; }
input, select, textarea { width: 100%; padding: 10px; border-radius:8px; border:1px solid #2a3043; background:#0f1320; color:#fff; }
label { font-size: .9rem; color:#c2c7d1; }
.form-row { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px; border-bottom:1px solid #2a3043; }
.notice { background:#122019; border:1px solid #23422f; color:#b9f3cc; padding: 10px 12px; border-radius:8px; }
.warning { background:#21150f; border:1px solid #4b2a1c; color:#ffd0b3; padding: 10px 12px; border-radius:8px; }

/* ---------- Scratch / Ticket Grid ---------- */
.scratch-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2a3043;
  margin: 0 auto;
}
.scratch-result {
  position: relative;
  display: block;
  padding: 12px;
}
.canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}
.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.ticket-tile {
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  color: #222;
  text-align: center;
  border: 2px solid #e2e6ef;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-weight: 600;
}
.ticket-tile small { font-weight: 500; opacity: .8; }
.ticket-tile.win { background: #e53935; color: #fff; border-color: #e53935; }

/* Prevent page scroll while drawing */
#scratch-canvas { touch-action: none; }

/* ---------- Top Header (compact) ---------- */
.site-header{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding: 8px 16px;
  background:#0e1220; border-bottom:1px solid #222736;
}
.site-header .brand{display:flex; align-items:center; gap:8px;}
.site-header .brand .logo-mark{
  width:22px; height:22px;
  border-radius:6px;
  background:linear-gradient(135deg,#c0a46b,#9b8557);
  box-shadow:0 1px 6px rgba(0,0,0,.35);
}
.site-header .brand .logo-text{font-weight:800; letter-spacing:.4px; font-size:.98rem;}

/* Right side actions (inline, no wrapping) */
.header-actions{
  display:flex; align-items:center; gap:8px;
  flex-wrap:nowrap;
}
.header-actions > *{flex:0 0 auto;}

/* Buttons (smaller) */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:6px 12px;
  border-radius:8px; font-weight:600;
  border:1px solid #3b4156; background:#1a2033; color:#fff; cursor:pointer;
  white-space:nowrap;
}
.btn:hover{ filter:brightness(1.08); }
.btn.primary{ background:#c0a46b; color:#10131b; border-color:#c0a46b; }
.btn.ghost{ background:transparent; }

/* Balance chip (small pill) */
.balance-chip{
  display:inline-flex; align-items:center; gap:6px;
  height:34px; padding:0 10px;
  border-radius:999px; background:#141a2b; border:1px solid #2c3142; cursor:pointer;
  font-size:.92rem;
}
.balance-chip .dot{ width:7px; height:7px; border-radius:999px; background:#36d399; }

/* Icon buttons (hamburger/user) — small, clean */
.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px;
  border-radius:8px;
  background:transparent;
  border:1px solid #2c3142; color:#e5e8f0; cursor:pointer;
  line-height:0;
}
.icon-btn svg{ width:18px; height:18px; display:block; }
.icon-btn:hover{ filter:brightness(1.1); }

/* ---------- Nav Drawer ---------- */
/* Support both: [hidden] and .open */
.site-nav[hidden]{ display:none !important; }
.site-nav{
  display:none;
  background:#0f1322; border-bottom:1px solid #222736;
}
.site-nav.open{ display:block; }
.site-nav .nav-inner{
  max-width:1100px; margin:0 auto; padding:10px 16px;
  display:flex; gap:10px; flex-wrap:wrap;
}
.site-nav a{
  padding:8px 10px; border-radius:8px; color:#e5e8f0; border:1px solid transparent; white-space:nowrap;
}
.site-nav a:hover{ background:#141a2b; border-color:#2c3142; }

/* Desktop: inline nav, hide hamburger */
@media (min-width: 900px){
  .site-nav{ display:block; }
  .site-nav[hidden]{ display:block !important; }
  #navToggle{ display:none; }
  .site-nav .nav-inner{ justify-content:flex-end; }
}

/* Legacy helpers */
nav a { margin-right: 10px; }
.nav-right { display:flex; gap:10px; align-items:center; }
.hidden { display:none; }

/* --- Game card styling --- */
.game-card {
  display: flex; flex-direction: column; gap: 10px;
  background: #141925; border: 1px solid #222736; border-radius: 16px;
  padding: 14px;
}
.pill {
  display:inline-flex; align-items:center; justify-content:center;
  padding: 8px 14px; border-radius: 999px; border:1px solid #2c3142;
  background:#0f1320; color:#c0a46b; font-weight:700; letter-spacing:.2px;
  width: fit-content; max-width: 100%; white-space: nowrap;
}
.pill.solid { background:#c0a46b; color:#10131b; border-color:#c0a46b; }
.pill.gray  { background:#141a2b; color:#e5e8f0; border-color:#2c3142; }

.img-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #222736;
  aspect-ratio: 16/9;       /* keep a consistent space */
  background:#0e1220 center center no-repeat; /* dark backdrop behind images */
}
.img-wrap img {
  width:100%; height:100%;
  object-fit: contain;      /* <-- show the whole image, no cropping */
  display:block;
}

.meta-row {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}

.countdown {
  font-variant-numeric: tabular-nums; letter-spacing:.3px;
  color:#e5e8f0;
}

.progress {
  height: 10px; border-radius: 999px; background:#0f1320; border:1px solid #2c3142;
  overflow:hidden;
}
.progress > .bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg,#4ade80,#22c55e);
}

.stats-row {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  color:#c2c7d1; font-size:.95rem;
}

.game-card .button.primary {
  background:#c0a46b; color:#10131b; border-color:#c0a46b; width:100%; text-align:center;
  padding: 10px 14px; border-radius:10px; font-weight:700;
}

/* tighten grid spacing for cards if you like */
/* Responsive game grid */
.grid.games {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* --- Countdown --- */
.countdown {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  margin: 10px 0;
  text-align: center;
  color: #c0a46b; /* Luxe gold */
  font-weight: 700;
}

.countdown .time-seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 45px;
}

.countdown .time-seg span {
  font-size: 1.6rem;
  line-height: 1.2;
}

.countdown .time-seg small {
  font-size: 0.75rem;
  font-weight: 500;
  color: #e5e5e5; /* subtle label */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.time-ended {
  font-size: 0.9rem;
  color: #ddd;
  font-style: italic;
}

/* =========================
   GAME PAGE – DETAIL LAYOUT
   ========================= */

/* Gold game title under header */
.game-title{
  text-align:center;
  margin:20px 0 14px;
  font-size:1.6rem;
  font-weight:800;
  color:#c0a46b;
}

/* Main detail card */
.game-detail-card{
  background:#141925;
  border:1px solid #222736;
  border-radius:16px;
  padding:16px;
  margin-bottom:20px;
}

/* Image + countdown combined, rounded as one piece */
.img-countdown{
  overflow:hidden;
  border-radius:12px;
  border:1px solid #2c3142;
  margin-bottom:14px;
}
.img-countdown .img-wrap.top{
  border-radius:12px 12px 0 0;
  overflow:hidden;
  border:0;                 /* avoid double border */
}
.img-countdown .countdown{
  background:#0e1220;
  padding:12px;
  border-top:1px solid #2c3142;
  justify-content:center;   /* uses your existing .countdown styles */
}

/* Play options (oval buttons) */
.play-options{
  display:flex; justify-content:center; gap:12px; margin:12px 0;
}
.play-options .pill{ cursor:pointer; padding:10px 18px; }
.play-options .pill.selected{ background:#c0a46b; color:#10131b; border-color:#c0a46b; }

/* Progress + stats reuse existing .progress and .stats-row */

/* Price per ticket */
.price-display{
  text-align:center; margin:12px 0; font-size:1.1rem; font-weight:700; color:#f7f7f7;
}

/* Purchase / Postal boxes */
.purchase-box, .postal-box{
  background:#0f1320;
  border:1px solid #2c3142;
  border-radius:12px;
  padding:14px;
  margin-top:12px;
}
.ticket-counter{
  display:flex; justify-content:center; align-items:center; gap:8px; margin-bottom:10px;
}
.ticket-counter input{ width:64px; text-align:center; }
.counter-btn{
  width:36px; height:36px; border-radius:50%;
  background:#141a2b; border:1px solid #2c3142; color:#fff; cursor:pointer;
  font-size:1.2rem; line-height:1;
}
.ticket-total{ text-align:center; margin:10px 0; font-weight:600; }
.add-btn{ width:100%; }

/* Make primary buttons gold everywhere (not only inside .game-card) */
.button.primary{ background:#c0a46b; color:#10131b; border-color:#c0a46b; }

/* Tabs block under card */
.tabs-card{
  background:#141925;
  border:1px solid #222736;
  border-radius:16px;
  margin-top:20px;
}
.tabs-nav{
  display:flex; border-bottom:1px solid #2c3142;
}
.tab-btn{
  flex:1; padding:10px; cursor:pointer; background:none; border:none; color:#e5e8f0; font-weight:600;
}
.tab-btn.active{ background:#0f1320; color:#c0a46b; }
.tab-content{ display:none; padding:14px; }
.tab-content.active{ display:block; }

/* Utility */
.hidden{ display:none !important; }

/* --- Basket indicator --- */
.basket-chip {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 12px;
  border-radius:999px;
  background:#141a2b;
  border:1px solid #2c3142;
  color:#f7f7f7;
  font-size:.92rem;
  font-weight:600;
  text-decoration:none;
}
.basket-chip:hover {
  filter:brightness(1.1);
}
.basket-chip .count {
  background:#c0a46b;
  color:#10131b;
  font-weight:700;
  padding:2px 8px;
  border-radius:999px;
  font-size:.85rem;
}
.ticket-select {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
}
.ticket-select .btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background:#141a2b;
  border:1px solid #2c3142;
  color:#fff;
  font-size:1.2rem;
  line-height:1;
  cursor:pointer;
}
.ticket-select .qty-input {
  width: 60px;
  text-align: center;
  font-size: 1rem;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid #2a3043;
  background: #0f1320;
  color: #fff;
}
.ticket-total {
  text-align: center;
  font-weight: 600;
  margin: 10px 0;
}

/* --- Basket Styles --- */
.basket-card {
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
}

.basket-table {
  width: 100%;
  border-collapse: collapse;
}

.basket-table th,
.basket-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #2a3043;
  font-size: 0.95rem;
}

.basket-table th {
  background: #1a1f2f;
  font-weight: 600;
  color: #c0a46b; /* Luxe gold */
  text-align: left;
}

.basket-table tr:nth-child(even) td {
  background: #181d2c;
}

.basket-summary {
  padding: 16px;
  background: #141925;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid #2a3043;
}

.basket-actions {
  display: flex;
  gap: 10px;
}

/* --- Checkout page --- */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-opt, .checkbox-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  cursor: pointer;
}

.radio-opt input,
.checkbox-opt input {
  accent-color: #c0a46b; /* Luxe gold */
  width: 18px;
  height: 18px;
}

/* --- Order Complete Page --- */
.card h1 {
  color: #c0a46b; /* luxe gold */
  margin-bottom: 10px;
}

.basket-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================
   ORDER COMPLETE PAGE
   ========================= */

/* Outer summary card */
.order-summary-card {
  background:#141925;
  border:1px solid #222736;
  border-radius:16px;
  padding:20px;
  margin-bottom:20px;
}

/* Header */
.order-header h1 {
  color:#c0a46b;
  margin:0 0 8px;
  font-size:1.4rem;
}
.order-header p {
  margin:2px 0;
  color:#c2c7d1;
  font-size:.95rem;
}

/* Game row */
.order-game {
  padding:16px 0;
  border-top:1px solid #2a3043;
}
.order-game:first-of-type { border-top:0; }

.thumb {
  border-radius:10px;
  overflow:hidden;
  border:1px solid #2a3043;
  width:96px;
  height:72px;
  background:#0e1220;
  margin-bottom:10px;
}
.thumb img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.og-info h3 {
  margin:0 0 6px;
  font-size:1rem;
  color:#fff;
}
.og-meta {
  color:#c2c7d1;
  font-size:.95rem;
  margin-bottom:8px;
}

.tickets-list {
  margin:6px 0 10px;
}
.tickets-list span {
  background:#0f1320;
  border:1px solid #2a3043;
  padding:4px 8px;
  border-radius:6px;
  margin:2px;
  display:inline-block;
  font-size:.85rem;
}

/* Play box (scratch/reveal) */
.play-box {
  margin-top:10px;
  padding:12px;
  border:1px dashed #3b4156;
  border-radius:12px;
  background:#0e1220;
}
.reveal-actions {
  display:flex;
  gap:10px;
  margin-bottom:12px;
  flex-wrap:wrap;
}

/* Scratch grid */
.scratch-wrap {
  position:relative;
  width:100%;
  border-radius:12px;
  overflow:hidden;
  border:1px solid #2a3043;
}
.scratch-result {
  position:relative;
  padding:12px;
}
.ticket-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:12px;
}
.ticket-tile {
  border-radius:10px;
  padding:12px;
  background:#fff;
  color:#222;
  text-align:center;
  border:2px solid #e2e6ef;
  min-height:80px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  font-weight:700;
}
.ticket-tile small {
  font-weight:500;
  opacity:.8;
}
.ticket-tile.win {
  background:#e53935;
  color:#fff;
  border-color:#e53935;
}
.canvas {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  z-index:1;
}

/* Billing box */
.billing-card {
  margin-top:20px;
  padding:16px;
  border:1px solid #2a3043;
  border-radius:12px;
  background:#141925;
}
.billing-card h3 {
  margin-top:0;
  color:#c0a46b;
}
.billing-card p {
  margin:6px 0;
  color:#c2c7d1;
  font-size:.95rem;
}
/* --- Instant Wins Grid --- */
.iw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.iw-card {
  background: #141925;
  border: 1px solid #2a3043;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease;
}

.iw-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}

.iw-card .iw-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.iw-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.iw-badge.won {
  background: #e53935;
  color: #fff;
}

.iw-badge.available {
  background: #c0a46b;   /* Luxe Gold */
  color: #10131b;
}

.iw-label {
  font-size: 0.8rem;
  color: #c0a46b;
}

.iw-amount {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f7f7f7;
  margin: 6px 0;
}

.iw-meta {
  font-size: 0.85rem;
  color: #c2c7d1;
  margin-top: 6px;
}

.iw-meta .iw-winner {
  font-weight: 600;
}

.iw-meta .muted {
  color: #9095a1;
  font-style: italic;
}

.iw-meta .iw-ticket {
  font-size: 0.8rem;
  color: #bbb;
}
.iw-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font-size: 0.95rem;
  color: #c2c7d1;
}
.iw-pagination a {
  text-decoration: none;
}
a.game-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

