/* ═══════════════════════════════════════════════════════════
   CLUB XIV — STYLES
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --gold: #c9922a;
  --gold-light: #e8b84b;
  --green: oklch(0.42 0.16 142);
  --green-hover: oklch(0.35 0.16 142);
  --green-light: oklch(0.92 0.06 142);
  --white: #fdfcfa;
  --black: #0a0a0a;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--white);
  color: #1a1a1a;
  min-height: 100vh;
}

/* ── TOURNAMENT SECTION ── */
#tournament-section {
  background: var(--white);
  padding: 36px 20px 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── GRADIENT BRIDGE ── */
.section-bridge {
  position: relative;
  overflow: hidden;
}

/* ── CASHGAME SECTION ── */
#cashgame-section {
  background: var(--black);
  padding: 56px 20px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── LOGO ── */
.logo-wrap { margin-bottom: 28px; }
.logo-wrap img {
  width: 400px;
  height: 400px;
  object-fit: contain;
  display: block;
}

/* ── TOURNAMENT TITLE ── */
.tournament-title {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  color: #111;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.tournament-subtitle {
  font-size: clamp(14px, 3vw, 18px);
  color: var(--gold);
  text-align: center;
  margin-bottom: 10px;
  font-style: italic;
}

/* ── DATE ── */
.event-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f5f0e8;
  border: 1px solid #e2d5b8;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 16px;
  color: #333;
  margin-bottom: 24px;
}

/* ── PLAYERS COUNT ── */
.players-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.players-count {
  background: #f5f0e8;
  border: 1.5px solid #e2d5b8;
  border-radius: 10px;
  padding: 14px 28px;
  text-align: center;
}
.players-count .num {
  font-size: 32px;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
.players-count .num span { font-size: 20px; color: #999; }
.players-count .label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
  font-family: system-ui, sans-serif;
}
.waitlist-badge {
  background: #fff3cd;
  border: 1.5px solid #f0c040;
  border-radius: 10px;
  padding: 14px 22px;
  text-align: center;
  animation: fadeIn 0.4s ease;
}
.waitlist-badge .num {
  font-size: 32px;
  font-weight: 700;
  color: #c07800;
  line-height: 1;
}
.waitlist-badge .label {
  font-size: 12px;
  color: #966000;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
  font-family: system-ui, sans-serif;
}

/* ── FORM CARD ── */
.form-card {
  background: #fff;
  border: 1.5px solid #e8e0d0;
  border-radius: 16px;
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  margin-bottom: 16px;
}
.form-card h3 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  margin-bottom: 18px;
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.field-label {
  font-size: 13px;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  color: #555;
  margin-bottom: 5px;
  display: block;
}
.field-label .required { color: var(--green); margin-left: 2px; }
.field-label .optional { color: #aaa; font-weight: 400; margin-left: 4px; }

input[type="text"], input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  font-family: system-ui, sans-serif;
  color: #222;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}
input[type="text"]:focus, input[type="tel"]:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px oklch(0.42 0.16 142 / 0.12);
  background: #fff;
}
input.error { border-color: #e03; }

/* ── ADD PLAYER QUESTION ── */
.add-player-question {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  color: #444;
  flex-wrap: wrap;
}
.btn-yesno {
  padding: 7px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid #ddd;
  background: #f5f5f5;
  color: #444;
  transition: all 0.15s;
}
.btn-yesno:hover { border-color: var(--green); color: var(--green); }
.btn-yesno.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ── COMMITMENT ── */
.commitment-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f7faf7;
  border: 1.5px solid #c8e6c8;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 8px 0 20px;
  cursor: pointer;
  max-width: 480px;
  width: 100%;
}
.commitment-wrap input[type="checkbox"] {
  width: 20px; height: 20px;
  flex-shrink: 0; margin-top: 1px;
  accent-color: var(--green); cursor: pointer;
}
.commitment-wrap p {
  font-family: system-ui, sans-serif;
  font-size: 13px; color: #333; line-height: 1.5;
}
.commitment-wrap.error-border { border-color: #e03; background: #fff5f5; }

/* ── BUTTONS ── */
.btn-primary {
  display: block;
  width: 100%; max-width: 480px;
  padding: 16px;
  background: var(--green); color: #fff;
  font-size: 16px; font-family: system-ui, sans-serif;
  font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none; border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-bottom: 12px;
}
.btn-primary:hover { background: var(--green-hover); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; width: 100%; max-width: 480px;
  padding: 14px 20px;
  background: transparent; color: #222;
  font-size: 15px; font-family: system-ui, sans-serif; font-weight: 600;
  border: 1.5px solid #ccc; border-radius: 10px;
  cursor: pointer; transition: all 0.2s;
  margin-bottom: 10px; text-decoration: none;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); background: #fffbf0; }

.btn-gold {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; width: 100%; max-width: 480px;
  padding: 14px 20px;
  background: transparent; color: #fff;
  font-size: 15px; font-family: system-ui, sans-serif; font-weight: 600;
  border: 1.5px solid var(--gold); border-radius: 10px;
  cursor: pointer; transition: all 0.2s;
  margin-bottom: 10px; text-decoration: none;
}
.btn-gold:hover { background: var(--gold); color: #111; }

/* ── SUCCESS ── */
.success-banner {
  background: var(--green-light);
  border: 1.5px solid var(--green);
  border-radius: 12px;
  padding: 18px 24px;
  text-align: center;
  max-width: 480px; width: 100%;
  margin-bottom: 20px;
}
.success-banner h2 { font-size: 20px; color: var(--green); margin-bottom: 6px; }
.success-banner p { font-size: 14px; font-family: system-ui, sans-serif; color: #444; }

/* ── REGISTERED LIST ── */
.registered-list { width: 100%; max-width: 480px; margin-bottom: 28px; }
.registered-list h4 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em;
  color: #888; font-family: system-ui, sans-serif; font-weight: 600; margin-bottom: 10px;
}
.player-chip {
  display: inline-flex; align-items: center;
  background: #f0f7f0; border: 1px solid #c0dcc0; border-radius: 20px;
  padding: 5px 14px; font-size: 14px; font-family: system-ui, sans-serif;
  color: #2a5a2a; margin: 4px;
}
.player-chip::before { content: "♠"; margin-right: 6px; font-size: 11px; opacity: 0.6; }

/* ── GOLD DIVIDER ── */
.gold-divider {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 20px auto 28px;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--white);
  border-radius: 16px; padding: 28px 24px;
  max-width: 520px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: #eee; cursor: pointer;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  color: #555; transition: background 0.15s;
}
.modal-close:hover { background: #ddd; }
.modal-box img { width: 100%; border-radius: 8px; display: block; }

/* ── CASH GAME ── */
.cg-title {
  font-size: clamp(22px, 5vw, 38px);
  font-weight: 700; color: var(--gold-light);
  text-align: center; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 6px;
}
.cg-date {
  font-size: 18px; color: #ccc; text-align: center;
  margin-bottom: 28px; font-style: italic;
}

/* ── TABLE OPTIONS ── */
.table-option {
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 12px; padding: 14px 16px;
  margin-bottom: 10px; cursor: pointer;
  transition: all 0.18s; background: rgba(255,255,255,0.03);
  display: flex; align-items: flex-start; gap: 12px;
}
.table-option:hover { border-color: rgba(201,146,42,0.5); background: rgba(201,146,42,0.06); }
.table-option.selected {
  border-color: var(--gold);
  background: rgba(201,146,42,0.1);
  box-shadow: 0 0 0 1px rgba(201,146,42,0.3);
}
.table-option input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px;
  accent-color: var(--gold); cursor: pointer;
}
.table-option-label { font-family: system-ui, sans-serif; }
.table-option-label .stakes {
  font-size: 15px; font-weight: 700; color: var(--gold-light);
  display: block; margin-bottom: 2px;
}
.table-option-label .details {
  font-size: 12px; color: #888;
}

/* ── POLL BAR ── */
.poll-section {
  width: 100%; max-width: 480px; margin-bottom: 20px;
}
.poll-section h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: #555; font-family: system-ui, sans-serif; margin-bottom: 12px;
}
.poll-row {
  margin-bottom: 10px;
}
.poll-row-header {
  display: flex; justify-content: space-between;
  font-family: system-ui, sans-serif; font-size: 12px; color: #777;
  margin-bottom: 4px;
}
.poll-row-header .poll-stakes { color: var(--gold-light); font-weight: 600; }
.poll-track {
  height: 8px; background: rgba(255,255,255,0.07);
  border-radius: 4px; overflow: hidden;
}
.poll-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── INFO CARD (dark) ── */
.info-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 20px 24px;
  max-width: 480px; width: 100%; margin-bottom: 20px;
}
.info-card h4 { color: var(--gold-light); font-size: 16px; margin-bottom: 12px; }
.info-card p {
  font-family: system-ui, sans-serif; font-size: 14px; color: #bbb; line-height: 1.6; margin-bottom: 8px;
}
.menu-item {
  display: flex; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.07);
  font-family: system-ui, sans-serif; font-size: 13px;
}
.menu-item .item-name { color: #ddd; }
.menu-item .item-price { color: var(--gold-light); font-weight: 600; }

/* ── SHARE MODAL ── */
.share-modal-inner { text-align: center; }
.share-modal-inner h2 { font-size: 20px; color: #111; margin-bottom: 6px; }
.share-modal-inner .share-subtitle { font-size: 13px; color: #888; font-family: system-ui, sans-serif; margin-bottom: 24px; }
.qr-wrap { display: flex; justify-content: center; margin-bottom: 20px; }
.qr-wrap canvas { border-radius: 10px; border: 4px solid #f5f0e8; }
.share-btn-row {
  display: flex; flex-direction: column; gap: 10px; margin-top: 8px;
}
.share-link-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 20px; border-radius: 10px; font-family: system-ui, sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.18s;
  text-decoration: none; border: 1.5px solid #ddd; color: #333; background: #fafafa;
}
.share-link-btn:hover { border-color: var(--gold); color: var(--gold); background: #fffbf0; }
.share-link-btn.whatsapp { background: #25D366; border-color: #25D366; color: #fff; }
.share-link-btn.whatsapp:hover { background: #1da853; border-color: #1da853; }

/* ── SECTION LABEL ── */
.section-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em;
  font-family: system-ui, sans-serif; color: #bbb; margin-bottom: 6px; text-align: center;
}

/* ── CASHGAME FORM (inside modal, dark themed) ── */
.cg-form-title { font-size: 20px; color: #111; margin-bottom: 4px; }
.cg-form-sub { font-size: 13px; color: #888; font-family: system-ui, sans-serif; margin-bottom: 20px; }

@media (max-width: 480px) {
  .form-card { padding: 20px 16px; }
  .players-count { padding: 12px 18px; }
}
