:root {
  --blue: #1f65c8;
  --blue2: #1551a9;
  --cell: rgba(239, 247, 255, 0.92);
  --found: #165ec1;
  --text: #10233f;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); touch-action: none; }
body {
  background: linear-gradient(#1557bd 0%, #3aa7ef 48%, #bdefff 68%, #6ebd5f 100%);
  overflow: hidden;
}
.app {
  width: min(100vw, 520px);
  height: 100dvh;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 14px env(safe-area-inset-bottom);
  display: grid;
  grid-template-rows: auto 1fr auto 270px;
  gap: 8px;
  background:
    radial-gradient(circle at 18% 76%, rgba(255,255,255,.35), transparent 16%),
    radial-gradient(circle at 82% 79%, rgba(255,255,255,.22), transparent 18%);
}
.topbar { display:flex; align-items:center; justify-content:space-between; padding: 12px 4px 4px; color:white; }
.brand { font-size: 24px; font-weight: 900; letter-spacing: -.5px; }
.subtitle { opacity: .9; font-size: 14px; }
.small-btn { border:0; padding: 10px 14px; border-radius: 999px; color:white; background:rgba(0,0,0,.18); font-weight:800; }
.board-wrap { display:flex; align-items:center; justify-content:center; min-height: 0; }
.board { display:grid; gap: 5px; transform-origin:center; }
.cell {
  width: 42px; height: 42px; border-radius: 8px;
  display:flex; align-items:center; justify-content:center;
  font-size: 25px; font-weight: 900; color:white;
  background: transparent;
}
.cell.active { background: var(--cell); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.cell.found { background: linear-gradient(180deg, #2473d8, #145ab7); }
.status { text-align:center; color:white; min-height: 86px; }
.current-word { display:inline-flex; min-width:120px; min-height:50px; padding: 7px 24px; align-items:center; justify-content:center; border-radius:999px; background:rgba(11,67,159,.86); font-size:34px; font-weight:950; letter-spacing:2px; }
.message { margin-top: 5px; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.bonus { font-size:13px; opacity:.9; margin-top:3px; }
.wheel-wrap { position:relative; display:flex; justify-content:center; align-items:center; }
.wheel {
  position:relative; width: 248px; height: 248px; border-radius: 50%;
  background: rgba(255,255,255,.78); backdrop-filter: blur(3px);
  box-shadow: 0 18px 45px rgba(0,0,0,.17);
}
.letter {
  position:absolute; width:70px; height:70px; border-radius:50%; border:0;
  background:linear-gradient(180deg, #2775d8, #1557bd); color:white;
  font-size:36px; font-weight:950; display:flex; align-items:center; justify-content:center;
  transform: translate(-50%, -50%); user-select:none;
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}
.letter.selected { filter: brightness(1.25); transform: translate(-50%, -50%) scale(1.08); }
.shuffle {
  position:absolute; left:50%; top:50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%; border:0;
  background: rgba(255,255,255,.95); color: var(--blue); font-size: 32px; font-weight:900;
  box-shadow: 0 4px 12px rgba(0,0,0,.16); z-index:5;
}
.lines { position:absolute; width:248px; height:248px; pointer-events:none; z-index:2; }
.lines line, .lines polyline { stroke: var(--blue); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; opacity:.9; }
@media (max-height: 720px) {
  .app { grid-template-rows: auto 1fr auto 230px; }
  .wheel, .lines { width: 220px; height: 220px; }
  .letter { width:62px; height:62px; font-size:32px; }
  .cell { width:36px; height:36px; font-size:22px; }
}
.back { width:42px; height:42px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:white; text-decoration:none; background:rgba(0,0,0,.18); font-size:36px; font-weight:500; line-height:1; }
