/* OnderCode Kelime Bulmaca — Onda temasının üstüne oyun düzeni. Renkler Onda değişkenlerinden gelir. */
html, body { height: 100%; overscroll-behavior: none; }
body { background: var(--o-bg); }
.ocb { min-height: 100dvh; display: flex; flex-direction: column; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.ocb button { font: inherit; color: inherit; touch-action: manipulation; }
.ocb-splash { flex: 1; display: grid; place-items: center; }
.ocb-logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--o-accent), color-mix(in srgb, var(--o-accent) 55%, #A855F7)); color: #fff; font-weight: 800; font-size: 18px; flex: none; }
.ocb-splash .ocb-logo { width: 64px; height: 64px; font-size: 34px; border-radius: 18px; animation: ocb-pulse 1.2s ease-in-out infinite; }
@keyframes ocb-pulse { 50% { transform: scale(.92); opacity: .7; } }

/* ---------- üst çubuk ---------- */
.ocb-page { flex: 1; display: flex; flex-direction: column; }
.ocb-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; background: color-mix(in srgb, var(--o-bg) 88%, transparent); backdrop-filter: blur(10px); }
.ocb-brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.ocb-brand b, .ocb-brand .ocb-h1 { display: block; font-size: 16px; font-weight: 700; margin: 0; line-height: 1.25; }
.ocb-brand small, .ocb-title small { display: block; color: var(--o-muted); font-size: 12px; }
.ocb-title { flex: 1; min-width: 0; }
.ocb-title b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocb-icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--o-border); background: var(--o-surface); font-size: 24px !important; line-height: 1; cursor: pointer; flex: none; }
.ocb-coin { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--o-surface); border: 1px solid var(--o-border); font-weight: 700; font-variant-numeric: tabular-nums; }
.ocb-coin i { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FDE68A, #F59E0B 60%, #B45309); box-shadow: inset 0 0 0 2px #FCD34D; }

/* ---------- ana sayfa ---------- */
.ocb-home, .ocb-levelpage { width: 100%; max-width: 720px; margin: 0 auto; padding: 6px 14px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.ocb-daily-word { border-radius: var(--o-radius-lg); padding: 18px; color: #fff; background: linear-gradient(135deg, var(--o-accent), color-mix(in srgb, var(--o-accent) 45%, #A855F7)); box-shadow: var(--o-shadow-lg); }
.ocb-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.ocb-dw-en { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.ocb-dw-tr { font-size: 20px; font-weight: 600; margin-top: 2px; }
.ocb-link { background: none; border: 0; padding: 0; margin-top: 6px; color: #fff !important; text-decoration: underline; cursor: pointer; opacity: .9; }
.ocb-row { display: flex; align-items: center; gap: 12px; }
.ocb-grow { flex: 1; min-width: 0; }
.ocb-section { font-size: 13px !important; text-transform: uppercase; letter-spacing: .08em; color: var(--o-muted); margin-top: 6px !important; }
.ocb-levels { display: flex; flex-direction: column; gap: 10px; }
.ocb-level { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 14px; border-radius: var(--o-radius-lg); border: 1px solid var(--o-border); background: var(--o-surface); cursor: pointer; box-shadow: var(--o-shadow); }
.ocb-level:active { transform: scale(.99); }
.ocb-level.locked { opacity: .55; cursor: default; }
.ocb-level-badge { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--lv); flex: none; }
.ocb-level-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ocb-level-body small { color: var(--o-muted); }
.ocb-level-go { font-size: 22px; color: var(--o-muted); }
.ocb-setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.ocb-setting + .ocb-setting { border-top: 1px solid var(--o-border); }
.ocb-switch { position: relative; width: 46px; height: 28px; flex: none; }
.ocb-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.ocb-switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--o-border-strong); transition: .2s; }
.ocb-switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; }
.ocb-switch input:checked + i { background: var(--o-accent); }
.ocb-switch input:checked + i::after { transform: translateX(18px); }
.ocb-foot { text-align: center; color: var(--o-faint); font-size: 12px; }

/* ---------- seviye sayfası ---------- */
.ocb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.ocb-tile { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--o-border); background: var(--o-surface); font-weight: 700; cursor: pointer; }
.ocb-tile.solved { background: var(--lv); color: #fff; border-color: transparent; }
.ocb-tile.started { border: 2px solid var(--lv); }
.ocb-tile.open { border: 2px dashed var(--lv); }
.ocb-tile.locked { opacity: .4; cursor: default; }
.ocb-done { padding: 14px; border-radius: var(--o-radius-lg); background: var(--o-soft); text-align: center; font-weight: 600; }

/* ---------- oyun ekranı ---------- */
.ocb-play { flex: 1; height: 100dvh; display: flex; flex-direction: column; outline: none; overflow: hidden; }
.ocb-play .ocb-top { position: static; padding-bottom: 2px; padding-top: calc(4px + env(safe-area-inset-top)); }
.ocb-cluebar { margin: 0 10px; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 14px; background: var(--lv); color: #fff; box-shadow: var(--o-shadow); }
.ocb-cluebar.hidden-mode { background: linear-gradient(135deg, #F59E0B, #D97706); }
.ocb-arrow { font-size: 20px; opacity: .9; }
.ocb-clue-text { flex: 1; min-width: 0; font-size: clamp(17px, 4.6vw, 24px); font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.ocb-clue-meta { font-size: 12px; opacity: .85; white-space: nowrap; }

.ocb-board-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; margin: 8px 10px 4px; --bw: min(100vw - 20px, 760px); position: relative; overflow: hidden; }
.ocb-board {
    /* tahta, kalan alana en-boy oranı korunarak sığar (ekran ne olursa olsun) */
    /* --bw: tahtanın genişliği; bulmaca.js kalan alana göre hesaplar (yazı boyutları da buna bağlı) */
    width: var(--bw);
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    aspect-ratio: var(--w) / var(--h);
    display: grid; grid-template-columns: repeat(var(--w), 1fr); grid-template-rows: repeat(var(--h), 1fr);
    gap: 2px;
}
.ocb-cell { position: relative; border-radius: 5px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ocb-cell.empty { background: transparent; }
.ocb-cell.clue { flex-direction: column; align-items: stretch; background: color-mix(in srgb, var(--lv) 16%, var(--o-surface-alt)); color: var(--o-text); cursor: pointer; padding: 1px; }
.ocb-cell.clue.active { background: color-mix(in srgb, var(--lv) 38%, var(--o-surface-alt)); }
.ocb-clue { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.02; font-weight: 600; position: relative; padding: 0 calc(var(--bw) * .9 / 100); overflow-wrap: normal; word-break: normal; hyphens: manual; }
.ocb-clue .t { display: block; width: 100%; overflow-wrap: normal; }
.ocb-cell.two .ocb-clue + .ocb-clue { border-top: 1px solid color-mix(in srgb, var(--lv) 35%, transparent); }
.ocb-clue.ok { opacity: .45; text-decoration: line-through; }
.ocb-clue .a { position: absolute; color: var(--lv); font-size: calc(var(--bw) * 2.6 / 100); line-height: 1; }
.ocb-clue.r .a { right: calc(var(--bw) * -.2 / 100); top: 50%; transform: translateY(-50%); }
.ocb-clue.d .a { bottom: calc(var(--bw) * -.6 / 100); left: 50%; transform: translateX(-50%); }
/* çengel oklar: kelime sağdaki kareden aşağı (↴) ya da alttaki kareden sağa (↳) */
.ocb-clue.rd .a { right: calc(var(--bw) * -.1 / 100); bottom: calc(var(--bw) * -.3 / 100); }
.ocb-clue.dr .a { left: calc(var(--bw) * .1 / 100); bottom: calc(var(--bw) * -.5 / 100); }
.ocb-cell.letter { background: var(--o-surface); border: 1px solid var(--o-border); cursor: pointer; font-weight: 700; font-size: calc(var(--bw) * 7.4 / 100); text-transform: none; }
.ocb-cell.letter.word { background: color-mix(in srgb, var(--lv) 16%, var(--o-surface)); border-color: color-mix(in srgb, var(--lv) 45%, var(--o-border)); }
.ocb-cell.letter.cursor { background: color-mix(in srgb, var(--lv) 42%, var(--o-surface)); border: 2px solid var(--lv); }
.ocb-cell.letter.ok { color: color-mix(in srgb, var(--o-success) 85%, var(--o-text)); }
.ocb-cell.letter.wrong { color: var(--o-danger); background: color-mix(in srgb, var(--o-danger) 12%, var(--o-surface)); }
.ocb-cell.letter.revealed span { text-decoration: underline dotted; text-underline-offset: calc(var(--bw) * .6 / 100); }
.ocb-cell.letter.ring::before { content: ""; position: absolute; inset: 9%; border-radius: 50%; border: calc(var(--bw) * .5 / 100) solid #F59E0B; pointer-events: none; }
.ocb-ring-no { position: absolute; top: calc(var(--bw) * .3 / 100); left: calc(var(--bw) * .7 / 100); font-size: calc(var(--bw) * 2.2 / 100); font-style: normal; color: #D97706; font-weight: 700; }

.ocb-hidden { margin: 2px 10px 0; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; border: 1px dashed color-mix(in srgb, #F59E0B 60%, var(--o-border)); cursor: pointer; }
.ocb-hidden.active { border-style: solid; border-color: #F59E0B; background: color-mix(in srgb, #F59E0B 10%, transparent); }
.ocb-hidden.ok { border-style: solid; border-color: var(--o-success); }
.ocb-hidden.shake { animation: ocb-shake .4s; }
@keyframes ocb-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.ocb-hidden-label { font-size: 12px; color: var(--o-muted); white-space: nowrap; }
.ocb-hidden-boxes { display: flex; gap: 5px; flex-wrap: wrap; }
.ocb-hbox { position: relative; width: 30px; height: 32px; border-radius: 50%; border: 2px solid #F59E0B; display: grid; place-items: center; font-weight: 800; font-size: 16px; background: var(--o-surface); }
.ocb-hbox i { position: absolute; top: -7px; left: -4px; font-size: 10px; font-style: normal; color: #D97706; font-weight: 700; }

.ocb-hints { position: relative; display: flex; gap: 8px; margin: 6px 10px 0; }
.ocb-hint { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 12px; border: 1px solid var(--o-border); background: var(--o-surface); cursor: pointer; }
.ocb-hint small { color: var(--o-muted); font-variant-numeric: tabular-nums; }
.ocb-hint:disabled { opacity: .5; cursor: default; }
.ocb-cooldown { position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--lv) var(--pct), transparent var(--pct)); }

.ocb-kb { padding: 8px 4px calc(6px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; max-width: 760px; width: 100%; margin: 0 auto; }
.ocb-kb-row { display: flex; gap: 4px; justify-content: center; }
.ocb-key { flex: 1; max-width: 64px; height: clamp(40px, 6.2dvh, 56px); border-radius: 8px; border: 0; background: var(--o-surface); box-shadow: 0 1px 0 var(--o-border-strong); font-weight: 700 !important; font-size: clamp(15px, 4.4vw, 22px) !important; cursor: pointer; padding: 0; }
.ocb-key:active { background: var(--o-soft); transform: translateY(1px); }
.ocb-key.wide { flex: 1.6; max-width: 100px; }

.ocb-reward { text-align: center; display: flex; flex-direction: column; gap: 10px; }
.ocb-reward-coins { font-size: 44px; font-weight: 800; color: #D97706; }
.ocb-reward-coins span { font-size: 16px; margin-left: 6px; color: var(--o-muted); font-weight: 600; }
.ocb-reward ul { list-style: none; padding: 0; margin: 0; color: var(--o-muted); }
.ocb-reward-hidden { padding: 10px; border-radius: 12px; background: var(--o-surface-alt); }

/* tablet ve geniş ekran: klavye ve ipuçları tahtayla aynı genişlikte */
@media (min-width: 768px) {
    .ocb-cluebar { width: min(760px, calc(100% - 20px)); margin-left: auto; margin-right: auto; }
}
/* yatay telefon: yükseklik az, klavye kısalır */
@media (max-height: 560px) {
    .ocb-key { height: 34px; }
    .ocb-hidden { display: none; }
}

/* gizli kelime ve ipuçları tek satırda: tahtaya daha çok yer kalır */
.ocb-tools { display: flex; gap: 8px; margin: 4px 10px 0; align-items: stretch; }
.ocb-tools .ocb-hidden { flex: 1; min-width: 0; margin: 0; padding: 6px 8px; }
.ocb-tools .ocb-hints { margin: 0; flex: none; }
.ocb-tools .ocb-hint { flex: none; flex-direction: column; gap: 0; height: auto; min-width: 62px; padding: 4px 10px; line-height: 1.15; }
.ocb-tools .ocb-hint b { font-size: 13px; }
.ocb-tools .ocb-hint small { font-size: 11px; }
@media (max-width: 480px) {
    .ocb-hidden-label { display: none; }
    .ocb-hbox { width: 26px; height: 28px; font-size: 14px; }
    .ocb-hidden-boxes { gap: 4px; }
}
@media (min-width: 768px) { .ocb-tools { width: min(760px, calc(100% - 20px)); margin-left: auto; margin-right: auto; } }

/* Sesle cevap */
.ocb-mic { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(255,255,255,.22); color: #fff; padding: 0; }
.ocb-mic:hover { background: rgba(255,255,255,.32); }
.ocb-mic.on { background: #fff; color: var(--o-danger); animation: ocb-pulse 1s ease-in-out infinite; }
.ocb-heard { display: block; font-size: 13px; font-weight: 600; opacity: .95; margin-top: 2px; }
.ocb-cell.letter.voicewrong { animation: ocb-shake .45s; background: color-mix(in srgb, var(--o-danger) 22%, var(--o-surface)); color: var(--o-danger); }

/* %70 bulununca sıradaki bulmaca */
.ocb-next { flex: none; border: 0; border-radius: 999px; padding: 6px 12px; margin-right: 6px; background: var(--lv); color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ocb-next:hover { filter: brightness(1.08); }

/* Başka cihazda devam et (taşıma kodu) */
.ocb-card-transfer { margin-top: 14px; }
.ocb-tr { display: flex; flex-direction: column; gap: 12px; }
.ocb-tr-sum { margin: 0; font-size: 14px; }
.ocb-tr-code { font: 700 20px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; word-spacing: .2em;
  padding: 12px 14px; border-radius: 12px; background: var(--o-surface-2, rgba(37,99,235,.08)); border: 1px dashed var(--o-border, #cbd5e1);
  text-align: center; overflow-wrap: anywhere; cursor: copy; user-select: all; }
.ocb-tr-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ocb-tr-acts > * { flex: 1 1 160px; }
.ocb-tr-qr { display: flex; align-items: center; gap: 14px; }
.ocb-tr-qr svg { width: 128px; height: 128px; flex: none; border-radius: 8px; }
.ocb-tr-qr small { color: var(--o-muted); }
.ocb-tr-steps { margin: 0; padding-left: 20px; font-size: 14px; }
.ocb-tr-steps li { margin: 3px 0; }
.ocb-tr-note { margin: 0; font-size: 13px; }
.ocb-tr-preview { padding: 10px 12px; border-radius: 10px; background: rgba(22,163,74,.10); font-size: 14px; }
@media (max-width: 520px) { .ocb-tr-qr { display: none; } }

.ocb-about p { margin: 0 0 8px; color: var(--o-muted); font-size: 13px; line-height: 1.55; }
