:root {
  --bg: #eef2ec;
  --bg-deep: #dde7df;
  --court: #8faea5;
  --court-dark: #6f8f85;
  --line: rgba(248, 250, 247, 0.82);
  --shadow: rgba(32, 49, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.82), transparent 28%),
    linear-gradient(180deg, #f5f8f2 0%, var(--bg) 42%, var(--bg-deep) 100%);
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));
}

.phone {
  width: min(100vw - 32px, 412px);
}

.stage {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 28px 80px rgba(32, 49, 45, 0.14);
}

.stage {
  overflow: hidden;
  border-radius: 32px;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  background: linear-gradient(180deg, var(--court) 0%, var(--court-dark) 100%);
  cursor: none;
  touch-action: none;
}

.minimal-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.honors {
  position: absolute;
  top: 40px;
  bottom: 40px;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
}

.honor-track {
  position: absolute;
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
  color: rgba(248, 250, 247, 0.88);
  font-family: Futura, "Avenir Next", "Century Gothic", sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.honor-track-cpu {
  top: 0;
}

.honor-track-player {
  bottom: 0;
}

.honor-symbol {
  opacity: 0.88;
}

.intro-splash {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.28), transparent 34%),
    linear-gradient(180deg, rgba(143, 174, 165, 0.52), rgba(111, 143, 133, 0.62));
  opacity: 1;
  transition: opacity 1800ms ease;
  pointer-events: auto;
}

.intro-splash.hidden {
  opacity: 0;
  pointer-events: none;
}

.intro-logo {
  width: min(82vw, 360px);
  max-width: calc(100% - 40px);
  height: auto;
  filter: drop-shadow(0 28px 64px rgba(32, 49, 45, 0.2));
  opacity: 0.98;
  transform: scale(1);
  transition: transform 1800ms ease, opacity 1800ms ease;
}

.intro-splash.hidden .intro-logo {
  opacity: 0;
  transform: scale(1.06);
}

.score-dots,
.pulse-track {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 12px;
}

.score-dots {
  min-width: 92px;
}

.score-dots-cpu {
  justify-content: flex-start;
}

.score-dots-player {
  justify-content: flex-end;
}

.hud-dot,
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(248, 250, 247, 0.26);
  border: 1px solid rgba(248, 250, 247, 0.34);
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.hud-dot.active,
.pulse-dot.active {
  background: rgba(248, 250, 247, 0.95);
  transform: scale(1.16);
}

.pulse-dot {
  width: 6px;
  height: 6px;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(68, 90, 83, 0.08);
  transition: opacity 900ms ease;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.about-card {
  width: min(330px, calc(100% - 44px));
  padding: 30px 24px 28px;
  border-radius: 28px;
  text-align: center;
  color: rgba(248, 250, 247, 0.92);
  background: rgba(120, 146, 139, 0.2);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(248, 250, 247, 0.24);
  box-shadow: 0 24px 60px rgba(32, 49, 45, 0.12);
  font-family: Futura, "Avenir Next", "Century Gothic", sans-serif;
}

.about-mark {
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.72;
}

.about-card p {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.075em;
  line-height: 1.55;
}

.about-card strong {
  font-weight: 600;
  letter-spacing: 0.12em;
}

.stage-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  min-height: 88px;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(111, 143, 133, 0), rgba(111, 143, 133, 0.24) 35%, rgba(111, 143, 133, 0.42) 100%);
}

.tennis-score,
.serve-mark {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  letter-spacing: 0.16em;
  color: rgba(49, 71, 64, 0.56);
}

.tennis-score {
  bottom: 14px;
  z-index: 2;
  font-size: 13px;
  font-weight: 500;
  pointer-events: none;
  color: rgba(248, 250, 247, 0.82);
}

.score-separator {
  display: inline-block;
  width: 18px;
}

.serve-mark {
  right: 26px;
  left: auto;
  bottom: 82px;
  width: 92px;
  height: 38px;
  z-index: 2;
  display: grid;
  place-items: center;
  font-family: Futura, "Avenir Next", "Century Gothic", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease, border-color 160ms ease;
  border: 1px solid rgba(248, 250, 247, 0.34);
  border-radius: 999px;
  background: rgba(248, 250, 247, 0.12);
  box-shadow:
    0 10px 24px rgba(32, 49, 45, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  pointer-events: auto;
  color: rgba(248, 250, 247, 0.92);
  backdrop-filter: blur(10px);
}

.serve-mark.hidden {
  opacity: 0;
  transform: translateY(6px);
}

.serve-mark:active {
  transform: scale(0.97);
  background: rgba(248, 250, 247, 0.18);
  border-color: rgba(248, 250, 247, 0.5);
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.68;
  }

  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}
