/* OkuOku İngilizce kelime oyunu */
:root { --navy: #0B4FA3; --orange: #F7891E; --ink: #1F2A44; --muted: #64748B; --ok: #16A34A; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    font-family: "Nunito", system-ui, sans-serif; color: var(--ink);
    background:
        radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--c) 22%, transparent), transparent 45%),
        radial-gradient(circle at 88% 82%, rgba(247,137,30,.18), transparent 45%),
        #F4F9FD;
    display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Üst bar */
.k-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(255,255,255,.88); backdrop-filter: blur(8px); }
.k-back { width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--navy); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(11,79,163,.14); flex: none; }
.k-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.k-title strong { font-family: "Baloo 2", sans-serif; font-size: 1.25rem; color: var(--navy); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-title span { color: var(--muted); font-size: .9rem; }
.k-toggle { border: 2px solid #E2E8F0; background: #fff; color: var(--muted); border-radius: 999px; padding: 7px 14px; font: 700 .95rem "Nunito", sans-serif; cursor: pointer; }
.k-toggle[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }

.k-progress { height: 8px; background: rgba(11,79,163,.08); }
.k-progress div { height: 100%; width: 0; background: var(--c); border-radius: 0 8px 8px 0; transition: width .4s; }

/* Kart */
.k-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px; }
.k-card {
    position: relative; width: 100%; max-width: 520px; background: #fff; border-radius: 32px; padding: 28px 24px 22px; text-align: center;
    box-shadow: 0 20px 50px rgba(11,79,163,.16); border: 4px solid color-mix(in srgb, var(--c) 35%, #fff);
}
.k-card.pop { animation: pop .45s cubic-bezier(.2,1.5,.4,1); }
@keyframes pop { from { transform: scale(.85) rotate(-2deg); opacity: 0; } to { transform: none; opacity: 1; } }
.k-card.win { animation: win .6s ease; border-color: var(--ok); }
@keyframes win { 0%,100% { transform: scale(1); } 40% { transform: scale(1.06) rotate(1.5deg); } 70% { transform: scale(.98) rotate(-1deg); } }
.k-card.learned::after { content: "✓"; position: absolute; top: 14px; right: 18px; width: 34px; height: 34px; border-radius: 50%;
    background: var(--ok); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.k-count { position: absolute; top: 16px; left: 20px; font-family: "Baloo 2", sans-serif; font-weight: 700; color: var(--muted); }
.k-pic { height: clamp(120px, 28vh, 220px); display: flex; align-items: center; justify-content: center; margin: 6px 0 4px; }
.k-pic span { font-size: clamp(90px, 22vh, 170px); line-height: 1; filter: drop-shadow(0 8px 14px rgba(0,0,0,.12)); }
.k-pic img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 16px; }
.k-word { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(2.4rem, 8vw, 3.6rem); color: var(--navy); line-height: 1.1; word-break: break-word; }
.k-tr { font-size: 1.35rem; font-weight: 700; color: var(--orange); margin-top: 4px; min-height: 1.6em; }
.k-tr.hidden { visibility: hidden; }
.k-status { margin-top: 14px; min-height: 2.6em; font-size: 1.1rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; }
.k-status.listen { color: var(--c); }
.k-status.ok { color: var(--ok); font-size: 1.35rem; }
.k-status.warn { color: #B45309; }
.k-status small { font-weight: 600; color: var(--muted); width: 100%; }

/* Alt bar */
.k-bar { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.9); backdrop-filter: blur(8px); }
.kbtn { font: 800 1.15rem "Baloo 2", sans-serif; border: 0; border-radius: 999px; padding: 12px 22px; background: #fff; color: var(--navy);
    box-shadow: 0 3px 10px rgba(11,79,163,.15); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: transform .15s; }
.kbtn:hover { transform: translateY(-2px); }
.kbtn:disabled { opacity: .35; transform: none; cursor: default; }
.kbtn.mic { background: var(--orange); color: #fff; font-size: 1.3rem; padding: 14px 30px; }
.kbtn.mic.listening { background: #DC2626; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.55); } 50% { box-shadow: 0 0 0 16px rgba(220,38,38,0); } }
.kbtn.primary { background: var(--orange); color: #fff; }
.kbtn.big { font-size: 1.4rem; padding: 14px 36px; }

/* Başlangıç / bitiş */
.k-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(11,79,163,.35); backdrop-filter: blur(4px); }
.k-overlay[hidden] { display: none; }
.k-dialog { background: #fff; border-radius: 28px; padding: 30px 28px 24px; text-align: center; max-width: 400px; width: 100%;
    box-shadow: 0 30px 60px rgba(0,0,0,.25); animation: pop .4s cubic-bezier(.2,1.4,.4,1); }
.k-big { font-size: 4.5rem; line-height: 1.1; }
.k-dialog h2 { font-family: "Baloo 2", sans-serif; color: var(--navy); margin: 6px 0 4px; font-size: 1.7rem; }
.k-dialog p { color: var(--muted); margin: 4px 0 16px; }
.k-help { font-weight: 700; color: var(--ink) !important; }
.k-note { font-size: .9rem; background: #FFF7ED; color: #9A3412 !important; border-radius: 12px; padding: 10px 12px; margin-top: 16px !important; }
.k-dialog a { color: var(--navy); font-weight: 700; }

@media (max-width: 560px) {
    .kbtn .lbl { display: none; }
    .kbtn { padding: 12px 18px; }
    .k-card { padding: 24px 16px 18px; border-radius: 26px; }
}
