/* ==========================================================================
   AYAK TENİSİ EKRANI (footTennisHud.js) — score, words, the stick and the three buttons, drawn on the page over the
   scene (no UI in Unity). Same dark glass look as the other mini games (miniGameHud.css). Sizes in px of the game's canvas (#gameViewport scales
   it to the screen, like every other panel; vmin would shrink twice on a phone). Everything sits inside the stage (a panel in the window, AGENTS.md §4.2).
   ========================================================================== */
.fth {
  --blue: #3b82f6;
  --orange: #f97316;
  --green: #22c55e;
  --red: #ef4444;
  --glass: linear-gradient(160deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.92) 100%);
  --line: rgba(148, 163, 184, 0.35);
  position: absolute;
  inset: 0;
  z-index: 1;   /* over the scene's touch layer, under ✕ and "Rakip aranıyor" */
  pointer-events: none;   /* only the stick, the buttons and the end card take touches */
  overflow: hidden;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  color: #f8fafc;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.fth [hidden] { display: none !important; }

/* the score: my club (blue) · score · the rival (orange) */
.fth-score {
  position: absolute; top: 13px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 13px; padding: 6px 17px;
  background: var(--glass); border: 1.6px solid var(--line); border-radius: 20px;
  box-shadow: 0 8px 23px rgba(2, 6, 23, 0.4);
}
.fth-name { max-width: 156px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; }
.fth-me { color: #93c5fd; }
.fth-rival { color: #fdba74; }
.fth-pts { display: flex; align-items: center; gap: 8px; font-family: "Outfit", sans-serif; font-weight: 800; font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; }
.fth-pts i { font-style: normal; color: #94a3b8; }
.fth-pts b:first-child { color: #60a5fa; }
.fth-pts b:last-child { color: #fb923c; }

/* the serve / waiting line */
.fth-line {
  position: absolute; top: 81px; left: 50%; transform: translateX(-50%);
  padding: 5px 17px; border-radius: 16px; background: rgba(15, 23, 42, 0.78); border: 1.3px solid var(--line);
  font-size: 20px; white-space: nowrap;
}
.fth-line.mine { color: #93c5fd; border-color: rgba(96, 165, 250, 0.6); }

/* the serve's countdown: 3 2 1, HAZIR! */
.fth-count { position: absolute; top: 143px; left: 50%; transform: translateX(-50%); text-shadow: 0 4px 13px rgba(2, 6, 23, 0.7); }
.fth-count b { display: block; font-family: "Outfit", sans-serif; font-weight: 900; font-size: 72px; line-height: 1; color: #60a5fa; white-space: nowrap; }
.fth-count.rival b { color: #fb923c; }
.fth-count.pop { animation: fth-pop 0.3s ease-out; }

/* the word of a point */
.fth-shout { position: absolute; top: 143px; left: 50%; transform: translateX(-50%); text-align: center; text-shadow: 0 4px 13px rgba(2, 6, 23, 0.7); }
.fth-shout b { display: block; font-family: "Outfit", sans-serif; font-weight: 900; font-size: 52px; line-height: 1; color: #60a5fa; white-space: nowrap; }
.fth-shout.rival b { color: #fb923c; }
.fth-shout span { display: block; margin-top: 6px; font-size: 20px; color: #e2e8f0; }
.fth-shout.pop { animation: fth-pop 0.35s ease-out; }
@keyframes fth-pop { 0% { transform: translateX(-50%) scale(0.4); opacity: 0; } 55% { transform: translateX(-50%) scale(1.15); opacity: 1; } 100% { transform: translateX(-50%) scale(1); } }

/* the controls: the stick on the left, the buttons on the right */
.fth-pad { position: absolute; bottom: 0; pointer-events: auto; touch-action: none; }
.fth-left { left: 0; width: 46%; height: 62%; display: flex; align-items: flex-end; justify-content: flex-start; padding: 0 0 39px 46px; box-sizing: border-box; }
.fth-base {
  position: relative; width: 195px; height: 195px; border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.55) 0%, rgba(15, 23, 42, 0.62) 100%);
  border: 3px solid rgba(148, 163, 184, 0.5);
  box-shadow: inset 0 0 20px rgba(2, 6, 23, 0.5), 0 6px 20px rgba(2, 6, 23, 0.35);
}
.fth-base::before, .fth-base::after { content: ""; position: absolute; background: rgba(148, 163, 184, 0.22); }
.fth-base::before { left: 50%; top: 14%; bottom: 14%; width: 1.9px; transform: translateX(-50%); }
.fth-base::after { top: 50%; left: 14%; right: 14%; height: 1.9px; transform: translateY(-50%); }
.fth-knob {
  position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42.2px 0 0 -42.2px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #93c5fd, #3b82f6 62%, #1d4ed8);
  border: 2.6px solid rgba(255, 255, 255, 0.75); box-shadow: 0 5px 13px rgba(2, 6, 23, 0.5);
}
.fth-base.down { border-color: rgba(147, 197, 253, 0.9); }

.fth-right { right: 0; width: 50%; height: 62%; display: flex; align-items: flex-end; justify-content: flex-end; gap: 20px; padding: 0 46px 39px 0; box-sizing: border-box; pointer-events: none; }
.fth-btn {
  pointer-events: auto; touch-action: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 3px solid rgba(255, 255, 255, 0.7); border-radius: 50%; color: #fff; cursor: pointer;
  font-family: "Outfit", sans-serif; font-weight: 800; box-shadow: 0 6px 17px rgba(2, 6, 23, 0.45);
  -webkit-tap-highlight-color: transparent; outline: none;
}
.fth-btn.down { transform: scale(0.92); filter: brightness(1.15); }
.fth-ic { width: 40%; height: 40%; }
.fth-big { width: 162px; height: 162px; font-size: 30px; background: radial-gradient(circle at 35% 30%, #fdba74, #f97316 60%, #c2410c); }
.fth-small { width: 98px; height: 98px; font-size: 14px; margin-bottom: 6px; text-align: center; line-height: 1.05; padding: 0 5px; box-sizing: border-box; }
.fth-small .fth-ic { width: 38%; height: 38%; }
.fth-power { background: radial-gradient(circle at 35% 30%, #fca5a5, #ef4444 62%, #b91c1c); }
.fth-lob { background: radial-gradient(circle at 35% 30%, #86efac, #22c55e 62%, #15803d); margin-bottom: 58px; }

/* the end card */
.fth-over .fth-pad { display: none; }
.fth-end { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: auto; background: rgba(8, 15, 30, 0.55); }
.fth-end-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 32px; max-width: 455px;
  background: var(--glass); border: 1.9px solid var(--line); border-radius: 20px; box-shadow: 0 13px 39px rgba(2, 6, 23, 0.55);
}
.fth-end-title { font-family: "Outfit", sans-serif; font-weight: 900; font-size: 36px; line-height: 1; color: #4ade80; letter-spacing: 0.04em; }
.fth-end-title.lost { color: #f87171; }
.fth-end-row { display: flex; align-items: center; gap: 16px; }
.fth-end-name { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; }
.fth-end-score { display: flex; align-items: center; gap: 6px; font-family: "Outfit", sans-serif; font-weight: 800; font-size: 42px; line-height: 1; font-variant-numeric: tabular-nums; }
.fth-end-score i { font-style: normal; color: #94a3b8; }
.fth-end-score b:first-child { color: #60a5fa; }
.fth-end-score b:last-child { color: #fb923c; }
.fth-end-go {
  margin-top: 4px; padding: 8px 32px; border: 0; border-radius: 16px; cursor: pointer;
  font-family: "Outfit", sans-serif; font-weight: 800; font-size: 20px; color: #fff;
  background: linear-gradient(135deg, #ffa24d, #f0611c); box-shadow: 0 6px 16px rgba(240, 97, 28, 0.4);
}

/* a phone (a short screen): the stick and the buttons a little in from the corners, where the thumbs rest */
@media (max-height: 500px) {
  .fth-left { padding: 0 0 64px 120px; }
  .fth-right { padding: 0 120px 64px 0; }
}
