/* ==========================================================================
   PADEL ONE ODIÁXERE — Coming-soon landing + mini-game styles
   Palette: deep navy night club with the brand's terracotta accent
   (logo ball), warm gray wordmark, glass blues on the court.
   Brand accent can also be overridden from the BRAND config in game.js.
   ========================================================================== */

:root {
  --bg:        #0b1220;
  --bg-2:      #0e1a2e;
  --panel:     #111f35;
  --line:      #223452;
  --text:      #e8eef7;
  --text-dim:  #93a3bc;
  --accent:    #c9714a;   /* logo terracotta */
  --accent-2:  #a5552f;
  --court:     #2e86c9;
  --danger:    #ff6b6b;
  --radius:    18px;
  --shadow:    0 18px 50px rgba(0, 0, 0, .45);
}

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

html, body { height: 100%; }

body {
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(46, 134, 201, .18), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(201, 113, 74, .09), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient "club at night" backdrop: court-light spots + faint glass lines */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, .012) 46px 48px),
    repeating-linear-gradient(0deg, transparent 0 118px, rgba(255, 255, 255, .015) 118px 120px),
    radial-gradient(560px 300px at 16% 14%, rgba(201, 113, 74, .06), transparent 60%),
    radial-gradient(820px 520px at 86% 78%, rgba(46, 134, 201, .12), transparent 65%),
    radial-gradient(400px 260px at 60% 4%, rgba(255, 255, 255, .04), transparent 70%);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* ------------------------------- header -------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 10px;
}

.brand { display: flex; align-items: center; gap: 11px; }

.brand-ball {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 12px rgba(201, 113, 74, .45));
}

.brand-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.brand-name {
  font-weight: 800;
  letter-spacing: .3em;
  font-size: 14px;
  text-transform: uppercase;
}

.w-a { color: #aab3bd; }     /* "PADEL" — logo warm gray */
.w-b { color: #f2f5f8; }     /* "ONE" — bright on dark */

.brand-sub {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .46em;
  color: var(--accent);
}

.badge-soon {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .25em;
  color: var(--accent);
  border: 1px solid rgba(201, 113, 74, .45);
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(201, 113, 74, .08);
}

/* -------------------------------- hero --------------------------------- */

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 560px);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: 28px 0 40px;
}

.hero-copy h1 {
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.01em;
}

.hero-copy h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.6;
  max-width: 46ch;
}

.hero-points {
  margin-top: 26px;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--text-dim);
  font-size: 14px;
}

.hero-points li::before {
  content: "●";
  color: var(--accent);
  font-size: 9px;
  margin-right: 10px;
  vertical-align: 2px;
}

/* email capture */

.notify {
  margin-top: 26px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.notify input {
  flex: 1 1 220px;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 13px 20px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}

.notify input:focus { border-color: var(--accent); }

.notify-msg {
  margin-top: 10px;
  font-size: 14px;
  color: var(--accent);
  min-height: 20px;
}

/* ------------------------------- buttons ------------------------------- */

.btn {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 24px;
  letter-spacing: .02em;
  transition: transform .15s, box-shadow .15s, background .15s;
  font-family: inherit;
}

.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: wait; }

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 26px rgba(201, 113, 74, .32);
}

.btn-accent:hover { background: #d5825c; }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line);
}

.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }

.btn-big { font-size: 17px; padding: 16px 34px; }
.btn-sm { font-size: 13px; padding: 10px 16px; }
.btn-2p { display: block; margin: 10px auto 0; }
.btn-row { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }

/* difficulty segmented control */

.seg {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin: 0 auto 18px;
  max-width: 260px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
}

.seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.seg-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ------------------------------ game frame ----------------------------- */

.game-wrap {
  position: relative;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0d1930, #0a1425);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  aspect-ratio: 10 / 11.5;
  max-height: 82vh;
  touch-action: none;              /* joystick: we handle touches ourselves */
  user-select: none;
  -webkit-user-select: none;
}

/* fullscreen mode fills the screen edge-to-edge */
.game-wrap:fullscreen {
  aspect-ratio: auto;
  max-height: none;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: none;
}

.game-wrap:-webkit-full-screen {
  aspect-ratio: auto;
  max-height: none;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: none;
}

#court { display: block; width: 100%; height: 100%; }

/* --------------------------------- HUD --------------------------------- */

.hud {
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 5;
}

.scoreboard {
  background: rgba(10, 18, 34, .78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 8px 14px;
  pointer-events: auto;
}

.score-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 800;
}

.score-team { font-size: 10px; letter-spacing: .18em; color: var(--text-dim); }
.score-team.you { color: var(--accent); }
.score-pts { font-size: 21px; min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.score-sep { color: var(--text-dim); }

.score-sub {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--text-dim);
  margin-top: 2px;
}

#serve-line { color: var(--accent); font-weight: 600; }

.hud-buttons { display: flex; gap: 8px; pointer-events: auto; }

.hud-btn {
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(10, 18, 34, .78);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: background .15s;
}

.hud-btn:hover { background: rgba(34, 52, 82, .9); }

/* ------------------------------- banner -------------------------------- */

.banner {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  background: rgba(10, 18, 34, .86);
  border: 1px solid rgba(201, 113, 74, .4);
  color: var(--text);
  font-weight: 800;
  font-size: clamp(14px, 2.4vw, 19px);
  letter-spacing: .04em;
  padding: 12px 26px;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
  animation: banner-pop .25s ease-out;
  text-align: center;
}

.banner .accent { color: var(--accent); }
.banner .bad    { color: var(--danger); }

@keyframes banner-pop {
  from { transform: translateX(-50%) scale(.8); opacity: 0; }
  to   { transform: translateX(-50%) scale(1);  opacity: 1; }
}

/* ------------------------- floating touch joystick ---------------------- */

.joy {
  position: absolute;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .22);
  background: rgba(17, 31, 53, .35);
  backdrop-filter: blur(2px);
  transform: translate(-50%, -50%);
  z-index: 4;
  pointer-events: none;
}

.joy-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(201, 113, 74, .9);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
  transform: translate(-50%, -50%);
}

/* ------------------------------ touch UI ------------------------------- */

.touch-ui {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 5;
  pointer-events: none;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.touch-hint {
  font-size: 10px;
  letter-spacing: .1em;
  color: rgba(232, 238, 247, .45);
  padding-bottom: 16px;
  padding-left: 6px;
}

.touch-buttons { display: flex; gap: 10px; pointer-events: auto; }

.tbtn {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(17, 31, 53, .82);
  color: var(--text);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .06em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tbtn:active { background: rgba(46, 134, 201, .5); }

.tbtn-main {
  width: 76px; height: 76px;
  background: rgba(201, 113, 74, .94);
  color: #fff;
  border-color: transparent;
}

.tbtn-main:active { background: var(--accent-2); }

/* ------------------------------ overlays ------------------------------- */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 13, 24, .72);
  backdrop-filter: blur(6px);
  padding: 18px;
}

.overlay-card {
  background: linear-gradient(180deg, rgba(20, 34, 58, .95), rgba(13, 23, 41, .95));
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 30px 28px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  animation: banner-pop .3s ease-out;
  max-height: 100%;
  overflow-y: auto;
}

.overlay-card-wide { max-width: 560px; text-align: left; }
.overlay-card-wide h2 { text-align: center; }
.overlay-card-wide > .btn { display: block; margin: 18px auto 0; }

.overlay-logo {
  filter: drop-shadow(0 0 18px rgba(201, 113, 74, .5));
  margin-bottom: 10px;
}

.menu-ball { width: 56px; height: 56px; }

.overlay-card h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .06em;
}

.wordmark { letter-spacing: .16em; }

.menu-sub {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .52em;
  color: var(--accent);
  margin-top: 6px;
}

.overlay-tag {
  color: var(--text-dim);
  font-size: 14px;
  margin: 8px 0 20px;
}

.overlay-tag.small { font-size: 12px; margin: 14px 0 0; }
.overlay-tag.center-tag { text-align: center; margin-bottom: 14px; }
.overlay-tag a { color: var(--accent); text-decoration: none; }

.overlay-card .btn + .btn { margin-top: 10px; }
.overlay-card .btn-ghost { display: block; margin: 10px auto 0; }

/* --------------------------- visual tutorial ---------------------------- */

.tutorial {
  position: absolute;
  inset: 0;
  z-index: 8;                       /* above HUD/banner, below menu overlays */
  pointer-events: none;
}

.tut-skip {
  position: absolute;
  top: 58px;
  right: 10px;
  pointer-events: auto;
  background: rgba(10, 18, 34, .78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.tut-skip:hover { color: var(--text); }

.tut-flash {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 900;
  font-size: clamp(20px, 4.5vw, 34px);
  letter-spacing: .06em;
  white-space: nowrap;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .65);
  pointer-events: none;
}

.tut-flash.good { color: var(--accent); }
.tut-flash.bad  { color: var(--danger); }
.tut-flash.info { color: #fff; }
.tut-flash.pop  { animation: tut-pop .3s ease-out; }

@keyframes tut-pop {
  from { transform: translateX(-50%) scale(.5); opacity: 0; }
  to   { transform: translateX(-50%) scale(1);  opacity: 1; }
}

.tut-bar {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(94%, 460px);
  background: rgba(10, 18, 34, .88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  padding: 12px 14px;
  pointer-events: auto;
  display: grid;
  gap: 8px;
}

.tut-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--accent);
}

.tut-sub {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.4;
}

.tut-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 26px;
}

.kchip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  transition: all .12s;
}

.kchip.lit {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-2);
  transform: translateY(1px);
}

.tut-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tut-dots { display: flex; gap: 6px; }

.tut-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
}

.tut-dot.on { background: var(--accent); }

/* ----------------------------- leaderboard ------------------------------ */

.lb-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 14px;
  font-size: 13px;
  color: var(--text-dim);
}

.lb-name-row input {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.lb-name-row input:focus { border-color: var(--accent); }

.lb-summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.lb-summary b { color: var(--accent); }

.lb-list {
  list-style: none;
  display: grid;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.lb-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-dim);
}

.lb-list .w { color: var(--accent); font-weight: 700; }
.lb-list .l { color: var(--danger); font-weight: 700; }
.lb-empty { text-align: center; font-size: 13px; color: var(--text-dim); padding: 14px 0; }

/* ------------------------------- footer -------------------------------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-dim);
}

.dim { opacity: .55; }

/* ------------------------------ utilities ------------------------------ */

.hidden { display: none !important; }

/* ------------------------------ responsive ----------------------------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 10px;
  }

  .hero-copy { text-align: center; }
  .hero-sub, .notify { margin-left: auto; margin-right: auto; }
  .notify { justify-content: center; }
  .hero-points { justify-items: center; }

  .game-wrap {
    order: -1;                       /* game first on mobile — it's the hook */
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .howto-cols { grid-template-columns: 1fr; }
  .score-pts { font-size: 17px; }
  .hud-btn { width: 34px; height: 34px; font-size: 14px; }
  .overlay-card { padding: 24px 18px; }
}
