/* Padel Score App - Design System */

:root {
  /* Screen sizes */
  --screen-size: 454px;

  /* Primary colors */
  --color-bg: #000000;
  --color-team-a: #00AAFF;
  --color-team-b: #FF6600;
  --color-ball: #CCFF00;
  --color-gold: #FFD700;

  /* Text colors */
  --color-text: #FFFFFF;
  --color-text-secondary: #AAAAAA;
  --color-text-dim: #555555;
  --color-text-dim-alt: #666666;
  --color-text-dim-light: #888888;

  /* Accent colors */
  --color-deuce: #FFCC00;
  --color-win: #00CC66;
  --color-loss: #FF4444;
  --color-recording: #FF0000;
  --color-recording-paused: #880000;
  --color-accent: #00AAFF;

  /* Flash/Feedback colors */
  --color-flash-a: #004466;
  --color-flash-b: #663300;
  --color-win-bg-a: #001833;
  --color-win-bg-b: #331800;
  --color-ball-glow: #445500;  /* Greenish glow matches ball color */
  --color-ball-highlight: #EEFF88;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a1a;
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding: 40px;
  justify-content: center;
  align-items: flex-start;
}

/* Watch frame container */
.watch-frame {
  width: var(--screen-size);
  height: var(--screen-size);
  border-radius: 50%;
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 8px #333,
    0 0 0 12px #222,
    0 20px 60px rgba(0,0,0,0.5);
}

.watch-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 1px solid #333;
  pointer-events: none;
}

/* Screen label */
.screen-label {
  text-align: center;
  color: #888;
  font-size: 14px;
  margin-top: 16px;
  font-weight: 500;
}

.screen-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Typography */
.font-xtiny {
  font-size: 14px;
  font-weight: 400;
}

.font-small {
  font-size: 18px;
  font-weight: 500;
}

.font-medium {
  font-size: 24px;
  font-weight: 600;
}

.font-large {
  font-size: 32px;
  font-weight: 700;
}

.font-number-medium {
  font-size: 42px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.font-number-mild {
  font-size: 36px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.font-number-hot {
  font-size: 80px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.color-text { color: var(--color-text); }
.color-text-secondary { color: var(--color-text-secondary); }
.color-text-dim { color: var(--color-text-dim); }
.color-text-dim-light { color: var(--color-text-dim-light); }
.color-team-a { color: var(--color-team-a); }
.color-team-b { color: var(--color-team-b); }
.color-gold { color: var(--color-gold); }
.color-deuce { color: var(--color-deuce); }
.color-win { color: var(--color-win); }
.color-loss { color: var(--color-loss); }
.color-accent { color: var(--color-accent); }

/* Absolute positioning helpers */
.absolute { position: absolute; }
.relative { position: relative; }

/* Padel Ball SVG */
.padel-ball {
  display: inline-block;
}

.padel-ball.large {
  width: 45px;  /* ~10% of 454px screen */
  height: 45px;
}

.padel-ball.small {
  width: 20px;
  height: 20px;
}

/* Menu button */
.menu-button {
  width: 64%;
  height: 10%;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 18%;  /* (100-64)/2 to center */
  transform: translateY(-50%);
}

.menu-button.selected {
  color: var(--color-text);
}

.menu-button.unselected {
  background: transparent;
  border: 1px solid var(--color-text-dim-light);
  color: var(--color-text-dim-light);
}

.menu-button.resume { background: var(--color-win); }
.menu-button.new-game { background: var(--color-accent); }
.menu-button.history { background: var(--color-text-dim-alt); }

/* Edge indicators */
.edge-indicator {
  position: absolute;
  width: 4%;
  top: 20%;
  height: 60%;
}

.edge-indicator.left {
  left: 0;
  background: var(--color-team-a);
  display: flex;
  align-items: center;
  justify-content: center;
}

.edge-indicator.right {
  right: 0;
  background: var(--color-team-b);
  display: flex;
  align-items: center;
  justify-content: center;
}

.edge-indicator .edge-letter {
  color: var(--color-text);
  font-size: 10px;
  font-weight: 600;
}

/* Recording dot */
.recording-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-recording);
  position: absolute;
}

/* Heart icon */
.heart-icon {
  width: 12px;
  height: 15px;
}

/* Win/Loss circle */
.wl-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-bg);
}

.wl-circle.win { background: var(--color-win); }
.wl-circle.loss { background: var(--color-loss); }

/* Trophy */
.trophy {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
}

/* Match ended backgrounds */
.bg-win-a { background: var(--color-win-bg-a); }
.bg-win-b { background: var(--color-win-bg-b); }

/* Scroll arrow */
.scroll-arrow {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
}

.scroll-arrow.up {
  border-bottom: 8px solid var(--color-accent);
}

.scroll-arrow.down {
  border-top: 8px solid var(--color-accent);
}
