/* YILDIRIM YOLU — yerleşim ve arayüz (Faz 5)
 * Oyun canvas'ı tüm pencereyi kaplar; menüler, ipuçları ve dokunmatik düğmeler #ui katmanında üstte durur.
 */
:root {
  --gold-l: #fff1b8; --gold: #e8c66a; --gold-d: #9a7a2e;
  --ink: #e8eeff; --dim: #a9b4d8; --cyan: #6fe3ff; --purple: #3b1650;
  --panel: rgba(10, 14, 36, 0.86); --font: system-ui, "Segoe UI", sans-serif;
}

html, body {
  margin: 0; height: 100%; background: #070b1f; overflow: hidden;
  touch-action: none; -webkit-user-select: none; user-select: none;
  font-family: var(--font); color: var(--ink);
}

#game { display: block; width: 100vw; height: 100vh; height: 100dvh; }

#ui { position: fixed; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
.hidden { display: none !important; }

/* ---- paneller ---- */
.screen {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(7, 11, 31, 0.35), rgba(7, 11, 31, 0.8));
  overflow-y: auto; touch-action: pan-y; padding: 16px; box-sizing: border-box;
}
.panel {
  width: min(560px, 100%); margin: auto; padding: 22px 24px; box-sizing: border-box; text-align: center;
  background: var(--panel); border: 2px solid var(--gold); border-radius: 18px;
  box-shadow: 0 0 40px rgba(111, 227, 255, 0.18), inset 0 0 30px rgba(232, 198, 106, 0.08);
}
.panel.narrow { width: min(380px, 100%); }

/* ---- site adı rozeti: başlık panelinin tepesinde, iki yanında şimşek ---- */
.site {
  display: inline-flex; align-items: center; gap: 11px; margin: 0 0 12px; padding: 7px 18px 8px;
  border: 1px solid rgba(232, 198, 106, 0.7); border-radius: 999px;
  background: linear-gradient(rgba(111, 227, 255, 0.12), rgba(59, 22, 80, 0.4));
  box-shadow: 0 0 18px rgba(111, 227, 255, 0.25), inset 0 0 10px rgba(232, 198, 106, 0.14);
  font: 900 clamp(14px, 4vw, 19px) var(--font); letter-spacing: 0.16em; line-height: 1;
}
.site svg { flex: none; width: 13px; height: 22px; filter: drop-shadow(0 0 4px rgba(255, 212, 90, 0.85)); }
.site .s1 { color: var(--cyan); text-shadow: 0 0 10px rgba(111, 227, 255, 0.65); }
.site .s2 { color: #ffd45a; text-shadow: 0 0 10px rgba(255, 212, 90, 0.55); }
.site .s3 { color: var(--dim); font-weight: 700; letter-spacing: 0.08em; }

.logo, .big {
  margin: 0; font-weight: 900; letter-spacing: 0.04em; line-height: 1.05;
  color: #ffd45a;
  background: linear-gradient(#fff6c2, #ffd45a 50%, #e0801a); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; filter: drop-shadow(0 3px 0 var(--purple)) drop-shadow(0 0 12px rgba(255, 212, 90, 0.35));
}
.logo { font-size: clamp(30px, 8vw, 56px); }
.big { font-size: clamp(40px, 12vw, 72px); }
.sub { margin: 4px 0 16px; color: var(--cyan); letter-spacing: 0.12em; text-transform: uppercase; font-size: 13px; }
h2 { margin: 0 0 8px; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }

/* ---- form ve düğmeler ---- */
label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 6px; }
input#nick {
  width: 100%; box-sizing: border-box; padding: 12px 14px; font: 600 18px var(--font); text-align: center;
  color: var(--ink); background: rgba(255, 255, 255, 0.06); border: 2px solid rgba(111, 227, 255, 0.4);
  border-radius: 12px; outline: none; -webkit-user-select: text; user-select: text;
}
input#nick:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(111, 227, 255, 0.2); }
.err { min-height: 18px; margin: 6px 0; font-size: 13px; color: #ff8a7a; }

.btn {
  display: inline-block; padding: 12px 22px; margin: 4px; border-radius: 12px; cursor: pointer;
  font: 800 16px var(--font); letter-spacing: 0.06em; color: var(--ink);
  background: rgba(255, 255, 255, 0.08); border: 2px solid rgba(255, 255, 255, 0.25);
}
.btn:hover { border-color: var(--cyan); }
.btn.primary {
  color: var(--purple); border-color: var(--gold-l);
  background: linear-gradient(#fff1b8, #e8c66a 55%, #c9962e); box-shadow: 0 4px 0 var(--gold-d);
}
.btn.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--gold-d); }
.btn.wide { width: 100%; box-sizing: border-box; margin: 4px 0; }
.btn.small { padding: 6px 12px; font-size: 13px; }

/* ---- puan tablosu, skor listesi, yardım ---- */
.puanlar { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 16px 0 12px; }
.puanlar .puan { display: flex; flex-direction: column; align-items: center; width: 54px; font: 900 14px var(--font); color: #ffd45a; }
.puanlar canvas, .symrow canvas { display: block; }
.cols { display: flex; gap: 16px; text-align: left; margin-top: 8px; }
.cols > div { flex: 1; min-width: 0; }
ol#top10 { margin: 0; padding: 0; list-style: none; font-size: 14px; }
ol#top10 li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 6px; border-radius: 6px; }
ol#top10 li:nth-child(odd) { background: rgba(255, 255, 255, 0.04); }
ol#top10 li.me { background: rgba(111, 227, 255, 0.15); }
ol#top10 .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol#top10 .s { color: #ffd45a; font-weight: 800; }
ol#top10 .empty { color: var(--dim); justify-content: center; }
#top-title .live { margin-left: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0; color: #6fe39a; vertical-align: middle; }
.help ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; color: var(--dim); }
.help b { color: var(--ink); }
.foot { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--dim); }

/* ---- koşul onayı ve alt bağlantılar (bilgi sayfaları; reklam kuralları için görünür olmalı) ---- */
.consent { margin: 8px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--dim); }
.legal { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 12px; line-height: 1.5; color: var(--dim); }
.legal p { margin: 0 0 4px; }
.legal a { display: inline-block; margin: 0 5px; }
.consent a, .legal a { color: var(--cyan); }

/* ---- oyun sonu ---- */
.cause { margin: 6px 0 2px; color: var(--dim); }
.score-big { font: 900 clamp(44px, 12vw, 72px) var(--font); color: #ffd45a; text-shadow: 0 3px 0 var(--purple); }
.meta { margin: 2px 0 10px; color: var(--ink); font-size: 15px; }
.new { color: var(--cyan); font-weight: 900; letter-spacing: 0.1em; animation: pulse 0.8s ease-in-out infinite alternate; }
.symrow { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.symrow .sym { display: flex; flex-direction: column; align-items: center; font: 800 13px var(--font); color: var(--ink); }
.symrow .sym.zero { opacity: 0.35; }
.tip { margin: 8px 0 0; font-size: 12px; color: var(--dim); }

/* ---- sayım ve ipucu ---- */
.count {
  position: absolute; left: 0; right: 0; top: 38%; text-align: center; pointer-events: none;
  font: 900 clamp(70px, 20vw, 140px) var(--font); color: #ffd45a; text-shadow: 0 5px 0 var(--purple), 0 0 30px rgba(255, 212, 90, 0.5);
}
.count.pop { animation: pop 0.5s ease-out; }
.hint {
  position: absolute; left: 50%; top: 24%; transform: translateX(-50%); pointer-events: none;   /* gökyüzünde: yolu örtmez */
  max-width: 90vw; padding: 10px 18px; border-radius: 999px; text-align: center;
  background: rgba(10, 14, 36, 0.8); border: 2px solid var(--cyan); color: var(--ink);
  font: 800 clamp(14px, 3.8vw, 20px) var(--font); box-shadow: 0 0 20px rgba(111, 227, 255, 0.3);
}

/* ---- oyun içi düğmeler ---- */
#btn-pause {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  font: 900 14px var(--font); color: var(--ink); background: rgba(10, 14, 36, 0.6); border: 2px solid rgba(255, 255, 255, 0.3);
}
#touch { position: absolute; left: 0; right: 0; bottom: 0; height: 0; }
#touch button {
  position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); width: 76px; height: 76px; border-radius: 50%;
  font: 900 26px var(--font); color: var(--ink); touch-action: none;
  background: rgba(10, 14, 36, 0.45); border: 2px solid rgba(111, 227, 255, 0.55);
}
#touch button.on { background: rgba(111, 227, 255, 0.35); }
#t-left { left: 14px; }
#t-right { left: 102px; }
#t-jump { right: 16px; width: 96px !important; height: 96px !important; font-size: 18px !important; border-color: var(--gold) !important; }

@keyframes pop { from { transform: scale(1.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pulse { from { opacity: 0.6; } to { opacity: 1; } }

@media (max-width: 520px) {
  .cols { flex-direction: column; }
  .panel { padding: 18px 16px; }
}
