/* Fonts are served from /fonts (Baloo 2 and Nunito, SIL Open Font License), not from a font CDN:
   no third-party requests and they work offline in the app. latin-ext carries ğ, ş and İ. */
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/baloo-2-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/baloo-2-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/baloo-2-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/baloo-2-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/nunito-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/nunito-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/nunito-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/nunito-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/nunito-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/nunito-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 900; font-display: swap; src: url(/fonts/nunito-latin-ext-900-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 900; font-display: swap; src: url(/fonts/nunito-latin-900-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  --bg1: #1e0b3e;
  --bg2: #3a1565;
  --select: #4dabff;
  --accent: #ff6b6b;
  --good: #4ecb71;
  --bad: #ff5252;
  --dup: #ffb84d;
  /* Yazi/ust katman rengi: arka plan acik/koyu olunca birlikte degisir */
  --fg: #ffffff; --fg-rgb: 255,255,255;
  /* Varsayilan: koyu harf kutulari */
  --tile-a: #2f2158; --tile-b: #190f3d; --tile-text: #ffffff;
  --tile-border: transparent;
  --combo-a: #ffe9b3; --combo-b: #ffb84d; --combo-text: #5a3200;
  --tile-shadow: 0 4px 0 rgba(0,0,0,0.25), 0 2px 6px rgba(0,0,0,0.2);
  /* Tile feedback flashes and the selection (used inside keyframes too) */
  --flash-good-a: #7bf59d; --flash-good-b: #30c35e;
  --flash-dup-a: #ffd27a; --flash-dup-b: #ffa733;
  --flash-bad-a: #ff9a9a; --flash-bad-b: #ff4d4d;
  --active-a: #8fd0ff; --active-b: #3d9bff; --active-text: #072a4d; --active-glow: rgba(77,171,255,0.8);
  --line: rgba(77,171,255,0.9);
  /* New look: fonts, flat surfaces and the four accent colors (themes override them) */
  --font-ui: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Baloo 2', 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --surface: #2a1c52; --surface-2: #1d1340; --line-soft: rgba(255,255,255,0.16);
  --primary: #5b3bd6; --on-primary: #ffffff;
  --c-orange: #e2702e; --c-teal: #1f9a8c; --c-green: #2f9e57;
  --star: #ffd93d;
}
/* ---- ANIMASYON PROFILI: NEON kendi renk paletini kullanir (tema
   secimleri bu modda devre disi), ilk "Deneme 2: Neon" ile ayni gorunum ---- */
body.anim-neon {
  --bg1: #0a0520; --bg2: #1c0b3a;
  --fg: #ffffff; --fg-rgb: 255,255,255;
  --good: #39ff9e; --bad: #ff3b5c;
  --tile-a: #1c1c2e; --tile-b: #2a2a44; --tile-text: #cfe0ff;
  --tile-border: rgba(140,160,255,0.15);
  --combo-a: #3a0f4a; --combo-b: #22082c; --combo-text: #ff8bf2;
  --tile-shadow: 0 4px 0 rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.3);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg1);
  color: var(--fg);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  touch-action: none;
}
#bg-layer {
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(160deg, var(--bg1), var(--bg2));
  filter: hue-rotate(0deg);
  transition: filter 1.4s ease-out;
}
#app-root { position: relative; width: 100%; height: 100%; }
/* 100dvh follows the visible area when mobile browser bars show or hide (iOS Safari bottom bar) */
@supports (height: 100dvh) { html, body { height: 100dvh; } }
.screen { display: none; width: 100%; height: 100%; }
.screen.active { display: flex; flex-direction: column; align-items: center; }

#app {
  position: relative;
  width: 100%; height: 100%;
  max-width: 560px; /* wide screens: keep the HUD, lists and board together in one centered column */
  display: flex; flex-direction: column;
  align-items: center;
}
#topbar {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px 6px 18px;
  color: var(--fg);
}
#topbar .label { font-size: 12px; opacity: 0.7; letter-spacing: 1px; }
#topbar .value { font-size: 26px; font-weight: 700; }
#score-box { text-align: left; flex: 1; display: flex; align-items: center; gap: 10px; }
#title { flex: 1; }
#refresh-area { flex: 1; display: flex; justify-content: flex-end; }

#title {
  color: var(--fg); font-size: 16px; font-weight: 800; letter-spacing: 1.5px;
  text-align:center; opacity:0.9; white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#refresh-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(var(--fg-rgb),0.15);
  color: var(--fg);
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, background 0.2s;
  flex-shrink: 0;
}
#refresh-btn:active { transform: rotate(180deg) scale(0.9); background: rgba(var(--fg-rgb),0.3); }
