/*
  Gesturally — player web page styles.
  Palette values are exact per PRD §6.1. Do not introduce new colors without
  updating this block and the PRD together.
*/

/* Self-hosted (PRD §5.2 privacy stance: no third-party font CDN calls —
   same reasoning as no analytics/ad SDKs). Files copied from the same
   @expo-google-fonts packages the host app uses, so both surfaces render
   with the identical typeface. */
@font-face {
  font-family: 'Poppins-ExtraBold';
  src: url('/fonts/Poppins_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --primary-teal: #0E7C86;
  --deep-teal: #0B3D46;
  --aqua-pop: #17B8C4;
  --ink: #12232A;
  --light-wash: #E6F4F5;
  --signal-lime: #7CD64B;
  --alert-coral: #FF6B5C;
  --warm-white: #FBFEFE;

  --font-display: 'Poppins-ExtraBold', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--light-wash);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  /* No text selection callouts on long-press — this is a tap-to-play surface, not a document. */
  -webkit-touch-callout: none;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.view {
  display: none;
  flex: 1;
  flex-direction: column;
  padding: 24px;
  gap: 20px;
}

.view.active {
  display: flex;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--deep-teal);
  margin: 0;
}

h1 {
  font-size: clamp(28px, 8vw, 40px);
}

p {
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
}

.card {
  background: var(--warm-white);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 4px 18px rgba(11, 61, 70, 0.12);
}

/* Chunky, tactile, rounded buttons — PRD §6.3: >=16px radius, >=56px tall. */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-radius: 20px;
  border: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  cursor: pointer;
  padding: 0 28px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background: var(--primary-teal);
  color: var(--warm-white);
}

.btn-danger {
  background: var(--alert-coral);
  color: var(--warm-white);
}

.btn-outline {
  background: transparent;
  border: 3px solid var(--primary-teal);
  color: var(--primary-teal);
  box-shadow: none;
}

input[type="text"] {
  min-height: 56px;
  border-radius: 20px;
  border: 3px solid var(--primary-teal);
  padding: 0 20px;
  font-size: 20px;
  font-family: var(--font-body);
  background: var(--warm-white);
  color: var(--ink);
}

input[type="text"]:focus {
  outline: 3px solid var(--aqua-pop);
}

/* Secret-word reveal — extra-large, centered, dominates the view (PRD §6.3). */
.word-reveal {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.word-reveal .word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 14vw, 72px);
  color: var(--deep-teal);
}

.word-reveal.imposter .word {
  color: var(--alert-coral);
}

/* Timer ring — Aqua Pop, turns Coral in the final 15s (PRD §6.3). */
.timer-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 8px solid var(--aqua-pop);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--deep-teal);
  align-self: center;
}

.timer-ring.urgent {
  border-color: var(--alert-coral);
  color: var(--alert-coral);
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--warm-white);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 18px;
  font-weight: 700; /* matches the loaded Inter_700Bold face — no 600 face is bundled */
}

.player-row.selectable {
  cursor: pointer;
  border: 3px solid transparent;
}

.player-row.selected {
  border-color: var(--primary-teal);
  background: var(--light-wash);
}

/* Result screen — full-bleed color per PRD §6.3. */
.result-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

.result-view.group-win {
  background: var(--signal-lime);
}

.result-view.imposter-win {
  background: var(--alert-coral);
}

.result-view h1 {
  color: var(--deep-teal);
  font-size: clamp(36px, 10vw, 56px);
}
