*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #060e09;
  --card:       #0b1810;
  --border:     #1a3020;
  --gold:       #c8a96e;
  --gold-dark:  #9a7a42;
  --gold-light: #e8d5a8;
  --green:      #2d5e3a;
  --green-dark: #1a3a24;
  --maroon:     #7c2d3e;
  --maroon-dark:#5a1e2c;
  --input-bg:   #0f1e13;
  --text:       #e8dfc8;
  --muted:      #7a9a82;
}

/* ── LIGHT MODE ── */
body.light {
  --bg:         #f5f0e8;
  --card:       #ffffff;
  --border:     #d4c9a8;
  --gold:       #8a6820;
  --gold-dark:  #6b5018;
  --gold-light: #5a3e10;
  --green:      #2d5e3a;
  --green-dark: #e8f0ea;
  --maroon:     #7c2d3e;
  --maroon-dark:#5a1e2c;
  --input-bg:   #faf7f0;
  --text:       #1a1208;
  --muted:      #5a6e5e;
}
body.light {
  background-image:
    radial-gradient(ellipse at 20% 0%, #dff0e4 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, #ede8d8 0%, transparent 60%);
}
body.light .header {
  background: linear-gradient(135deg, #e8f5ec 0%, #f5f0e8 100%);
  box-shadow: 0 0 48px #c8a96e14, inset 0 1px 0 #c8a96e30;
}
body.light .game-hint {
  background: #ede8d8;
  border-color: #c8b888;
}
body.light input::placeholder { color: #a09070; }
body.light input[type="text"],
body.light input[type="email"],
body.light input[type="tel"] {
  border-color: #c8b888;
  box-shadow: inset 0 1px 3px #00000008;
}
body.light .reserve-card {
  background: #fff5f6;
  border-color: #c8909a;
}
body.light #toast {
  background: #fff9f0;
  color: #5a3e10;
}
body.light .card {
  box-shadow: 0 2px 16px #00000010;
}


body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 24px 16px 80px;
  background-image:
    radial-gradient(ellipse at 20% 0%, #0d2818 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, #0d1f10 0%, transparent 60%);
  transition: background 0.4s ease, color 0.4s ease;
}

.container { max-width: 860px; margin: 0 auto; }

/* ── HEADER ── */
.header {
  background: linear-gradient(135deg, #0d2818 0%, #060e09 100%);
  border: 1.5px solid var(--gold);
  border-radius: 24px;
  padding: 36px 40px;
  margin-bottom: 28px;
  box-shadow: 0 0 48px #c8a96e18, inset 0 1px 0 #c8a96e22;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.header h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
  line-height: 1.2;
}
.header p { color: var(--muted); margin-top: 8px; font-size: 1rem; }

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-logo {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 20px #c8a96e30;
  flex-shrink: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.toggle-btn {
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 40px; height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s;
  flex-shrink: 0;
}
.toggle-btn:hover {
  border-color: var(--gold);
  box-shadow: 0 0 10px #c8a96e30;
  transform: rotate(20deg);
}

.badge {
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon));
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1px;
  white-space: nowrap;
  color: #f0d0a0;
  border: 1px solid #a0404e;
  box-shadow: 0 0 16px #7c2d3e40;
}

/* ── CARD ── */
.card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 32px 36px;
  margin-bottom: 24px;
  box-shadow: 0 4px 24px #00000030;
}
.card h2 { font-size: 1.5rem; font-weight: 700; color: var(--gold); margin-bottom: 20px; }
.card h2.lg { font-size: 1.8rem; }

/* ── GUIDELINES ── */
.guidelines ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.guidelines li { color: var(--muted); padding-left: 20px; position: relative; }
.guidelines li::before { content: '▸'; position: absolute; left: 0; color: var(--gold); }

/* ── GRID ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.col-span-2 { grid-column: span 2; }
@media(max-width:640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: span 1; }
}

/* ── INPUTS ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--muted); letter-spacing: 0.5px; }
.field label span.req { color: var(--gold); margin-left: 3px; }
.field label span.opt { color: #3d5e45; margin-left: 3px; font-weight: 400; }

input[type="text"],
input[type="email"],
input[type="tel"] {
  background: var(--input-bg);
  border: 1.5px solid #1e3828;
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #c8a96e18;
}
input::placeholder { color: #3d5e45; }

/* ── GAME BUTTONS ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media(max-width:540px) { .games-grid { grid-template-columns: repeat(2,1fr); } }

.game-btn {
  background: var(--input-bg);
  border: 1.5px solid #1e3828;
  border-radius: 16px;
  padding: 20px 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.game-btn .icon { font-size: 1.8rem; }
.game-btn:hover { background: var(--green-dark); border-color: var(--gold); color: var(--gold-light); }
.game-btn.active {
  background: var(--green-dark);
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 0 18px #c8a96e30;
}

.game-hint {
  background: #0a1a0e;
  border: 1.5px dashed #1e3828;
  border-radius: 14px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

/* ── PLAYERS SECTION ── */
#players-section { display: none; }
#players-section.visible { display: block; }

.player-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 18px;
  animation: fadeUp 0.35s ease;
}
.player-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.player-num {
  background: var(--green);
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--gold-light);
}

.reserve-card {
  border-color: #5a1e2c;
  background: #100a0c;
}
.reserve-card h3 { color: #c8707e; }

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

/* ── CHECKBOXES ── */
.checks { display: flex; flex-direction: column; gap: 14px; }
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.4;
}
.check-label input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--gold);
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
}

/* ── SUBMIT ── */
.submit-wrap { display: flex; justify-content: center; margin-top: 36px; }
.submit-btn {
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon));
  border: 1.5px solid #a0404e;
  border-radius: 16px;
  padding: 18px 56px;
  color: #f0d0a0;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 0 28px #7c2d3e40;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 0 40px #7c2d3e70; filter: brightness(1.1); }
.submit-btn:active { transform: translateY(0); }

/* ── TOAST ── */
#toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #0d2818; border: 1.5px solid var(--gold);
  color: var(--gold-light); padding: 14px 28px; border-radius: 12px;
  font-weight: 600; font-size: 0.95rem; z-index: 999;
  transition: transform 0.4s ease, opacity 0.4s ease; opacity: 0;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── SELECTED GAME TAG ── */
.selected-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-dark); border: 1px solid var(--gold);
  color: var(--gold-light); border-radius: 999px;
  padding: 4px 14px; font-size: 0.82rem; font-weight: 700;
  margin-bottom: 20px;
}

/* ── MODAL ── */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}
.modal.show {
  display: block;
}
.modal-content {
  background-color: var(--card);
  margin: 5% auto;
  padding: 32px;
  border: 1.5px solid var(--gold);
  border-radius: 24px;
  width: 90%;
  max-width: 800px;
  color: var(--text);
  position: relative;
  box-shadow: 0 4px 24px #00000030, 0 0 48px #c8a96e18;
}
.close-btn {
  color: var(--muted);
  position: absolute;
  top: 24px;
  right: 28px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}
.close-btn:hover,
.close-btn:focus {
  color: var(--gold);
  text-decoration: none;
}
.tnc-text {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 16px;
  line-height: 1.6;
}
.tnc-text h2, .tnc-text h3 {
  color: var(--gold);
  margin-top: 20px;
  margin-bottom: 12px;
}
.tnc-text p {
  margin-bottom: 12px;
  color: var(--text);
}
.tnc-text ul {
  margin-left: 20px;
  margin-bottom: 16px;
}
.tnc-text li {
  margin-bottom: 8px;
}
.tnc-text hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}
/* Scrollbar for modal */
.tnc-text::-webkit-scrollbar {
  width: 8px;
}
.tnc-text::-webkit-scrollbar-track {
  background: var(--input-bg);
  border-radius: 4px;
}
.tnc-text::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.tnc-text::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}
