:root {
    --sky-a: #0b5d73;
    --sky-b: #f2a541;
    --hill-1: #2f7d6d;
    --hill-2: #245f55;
    --hill-3: #1a4740;
    --cream: #fff8ec;
    --ink: #2b2118;
    --gold: #ffc531;
    --gold-d: #e08e0b;
    --ad: #7c3aed;
    --ad-d: #5b21b6;
    --good: #22c55e;
    --bonus: #38bdf8;
    --bad: #ef4444;
    --glass: rgba(16, 22, 30, .42);
    --glass-b: rgba(255, 255, 255, .16);
    --cell: 44px;

    /* tema değişkenleri (themes.js ezer) */
    --t-tile: #fff8ec;
    --t-tile-ink: #2b2118;
    --t-cell-empty: rgba(255,255,255,.86);
    --t-cell-a: #ffd86b;
    --t-cell-b: #f5a524;
    --t-cell-ink: #4a2b05;
    --t-wheel: rgba(255,248,236,.92);
    --t-ring: rgba(255,255,255,.65);
    --t-line: #f59e0b;
    --t-sel: #f59e0b;
    --t-sel-ink: #fff;
    --t-glow: rgba(255,197,49,.75);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b2a33; }
body {
    font-family: 'Nunito', system-ui, sans-serif;
    color: var(--cream);
    user-select: none; -webkit-user-select: none;
    touch-action: manipulation;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; transition: transform .12s; }
button:active { transform: scale(.95); }
button:disabled { opacity: .5; cursor: default; }

#app { position: relative; height: 100%; max-width: 480px; margin: 0 auto; overflow: hidden; }

/* ---------------------------------------------------------------- */
/* Arka plan sahnesi                                                 */
/* ---------------------------------------------------------------- */
.scene {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 115%);
    transition: background .6s;
}
.photo {
    position: absolute; inset: -3%; background: center / cover no-repeat;
    opacity: 0; transition: opacity .9s;
    animation: kenburns 40s ease-in-out infinite alternate;
}
.photo.show { opacity: 1; }
.scene::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.1) 30%, rgba(0,0,0,.16) 60%, rgba(0,0,0,.62) 100%);
    opacity: 0; transition: opacity .7s, background .7s;
}
.scene.has-photo::after { opacity: 1; }
.scene.dim::after { background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.3) 40%, rgba(0,0,0,.55)); }
.hills, .sun { transition: opacity .7s; }
.scene.has-photo .hills, .scene.has-photo .sun { opacity: 0; }
.sun {
    position: absolute; width: 140px; height: 140px; border-radius: 50%; right: -30px; top: 8%;
    background: radial-gradient(circle, rgba(255,240,200,.55), rgba(255,240,200,0) 70%);
}
.hills { position: absolute; left: 0; bottom: 0; width: 100%; height: 38%; }
.hills .h1 { fill: var(--hill-1); opacity: .55; }
.hills .h2 { fill: var(--hill-2); opacity: .8; }
.hills .h3 { fill: var(--hill-3); }
/* yavaşça süzülen ışık zerreleri */
.motes { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.motes i {
    position: absolute; bottom: -10px; width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,240,200,.75); box-shadow: 0 0 10px rgba(255,230,160,.9);
    animation: float 14s linear infinite; opacity: 0;
}
.motes i:nth-child(1) { left: 8%; animation-delay: 0s; }
.motes i:nth-child(2) { left: 22%; animation-delay: 3s; width: 4px; height: 4px; }
.motes i:nth-child(3) { left: 37%; animation-delay: 7s; }
.motes i:nth-child(4) { left: 51%; animation-delay: 1.5s; width: 3px; height: 3px; }
.motes i:nth-child(5) { left: 64%; animation-delay: 9s; }
.motes i:nth-child(6) { left: 76%; animation-delay: 5s; width: 4px; height: 4px; }
.motes i:nth-child(7) { left: 88%; animation-delay: 11s; }
.motes i:nth-child(8) { left: 95%; animation-delay: 4s; width: 3px; height: 3px; }

/* ---------------------------------------------------------------- */
/* Ekranlar                                                          */
/* ---------------------------------------------------------------- */
.screen {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column;
    padding: env(safe-area-inset-top) 12px calc(env(safe-area-inset-bottom) + 10px);
    opacity: 0; pointer-events: none; transform: translateY(14px) scale(.985);
    transition: opacity .3s, transform .35s cubic-bezier(.2,.8,.2,1);
}
.screen.active { opacity: 1; pointer-events: auto; transform: none; }

.topbar { display: flex; align-items: center; gap: 8px; height: 60px; flex: none; }
.spacer { flex: 1; }
.icon-btn {
    width: 42px; height: 42px; border-radius: 14px; flex: none;
    background: var(--glass); border: 1px solid var(--glass-b);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: grid; place-items: center;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lvl { flex: 1; text-align: center; line-height: 1.1; min-width: 0; }
.lvl small { display: block; font-size: 12px; opacity: .85; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvl b { font-family: 'Baloo 2', sans-serif; font-size: 22px; text-shadow: 0 2px 6px rgba(0,0,0,.35); }

.stars-pill {
    display: flex; align-items: center; gap: 6px; flex: none;
    background: var(--glass); border: 1px solid var(--glass-b); border-radius: 999px; padding: 5px 14px 5px 6px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-weight: 800; font-size: 17px;
}
.stars-pill.bump { animation: bump .45s; }
.star {
    display: inline-block; width: 26px; height: 26px; flex: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3a8'/%3E%3Cstop offset='.5' stop-color='%23ffc531'/%3E%3Cstop offset='1' stop-color='%23e08e0b'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M12 1.8l3.1 6.4 7 .9-5.1 4.9 1.3 6.9L12 17.6l-6.3 3.3 1.3-6.9L1.9 9.1l7-.9z' fill='url(%23g)' stroke='%23b7700b' stroke-width='1'/%3E%3C/svg%3E") center/contain no-repeat;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.25));
}
.star.sm { width: 16px; height: 16px; vertical-align: -3px; }
.star.lg { width: 48px; height: 48px; }

/* ---------------------------------------------------------------- */
/* Ana ekran                                                         */
/* ---------------------------------------------------------------- */
.home-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding-bottom: 8vh; }
.logo { margin: 0; text-align: center; font-family: 'Baloo 2', sans-serif; font-weight: 800; line-height: .88; }
.logo .l1 { display: block; font-size: 52px; color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.35); animation: drop .7s cubic-bezier(.3,1.5,.5,1) both; }
.logo .l2 {
    display: block; font-size: 64px;
    background: linear-gradient(100deg, #ffd65a 20%, #fff6c8 40%, #ffc531 60%, #ffb020 80%);
    background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 4px 0 rgba(120,60,0,.45)) drop-shadow(0 10px 20px rgba(0,0,0,.35));
    animation: drop .7s .12s cubic-bezier(.3,1.5,.5,1) both, shimmer 5s 1s linear infinite;
}
.chapter-card {
    width: min(300px, 100%); border-radius: 20px; padding: 14px 18px; cursor: pointer;
    background: var(--glass); border: 1px solid var(--glass-b);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center;
}
.chapter-card small { grid-column: 1 / -1; font-size: 12px; opacity: .8; letter-spacing: .6px; text-transform: uppercase; }
.chapter-card strong { grid-column: 1 / -1; font-family: 'Baloo 2', sans-serif; font-size: 24px; line-height: 1; }
.chapter-bar { height: 10px; background: rgba(255,255,255,.18); border-radius: 99px; overflow: hidden; }
.chapter-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd65a, var(--gold-d)); border-radius: 99px; transition: width .6s; }
.chapter-card span { font-size: 13px; font-weight: 800; }

.btn-play {
    position: relative; overflow: hidden;
    width: 230px; padding: 14px 0 10px; border-radius: 26px;
    background: linear-gradient(180deg, #ffd65a, var(--gold-d));
    box-shadow: 0 7px 0 #a8620a, 0 14px 28px rgba(0,0,0,.35);
    color: #4a2b05; display: flex; flex-direction: column; align-items: center;
    animation: breathe 2.6s ease-in-out infinite;
}
.btn-play::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg);
    animation: sweep 3.2s 1s ease-in-out infinite;
}
.btn-play span { font-family: 'Baloo 2', sans-serif; font-size: 40px; line-height: 1; font-weight: 800; }
.btn-play small { font-weight: 800; opacity: .8; }
.btn-play:active { transform: translateY(5px); box-shadow: 0 2px 0 #a8620a; }

.home-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pill {
    display: flex; align-items: center; gap: 7px; padding: 10px 15px; border-radius: 999px;
    background: var(--glass); border: 1px solid var(--glass-b);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-weight: 800; font-size: 14.5px;
}
.pill.wide { justify-content: center; width: 100%; background: var(--ad); border: 0; }
.pill.ready { background: linear-gradient(180deg, #34d399, #059669); border-color: transparent; animation: wiggle 2s infinite; }
.pill.ad { background: linear-gradient(180deg, #8b5cf6, var(--ad-d)); border-color: transparent; }
.ic { width: 20px; height: 20px; display: inline-block; background: center/contain no-repeat; flex: none; }
.ic.gift { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='5' rx='1'/%3E%3Cpath d='M5 13v8h14v-8M12 8v13M12 8C10 4 6 4 7 7c.5 1 5 1 5 1zM12 8c2-4 6-4 5-1-.5 1-5 1-5 1z'/%3E%3C/svg%3E"); }
.ic.ad { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='2' y='5' width='20' height='14' rx='3' fill='none' stroke='white' stroke-width='2.2'/%3E%3Cpath d='M10 9v6l5-3z' fill='white'/%3E%3C/svg%3E"); }
.ic.map { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M3 6l6-2 6 2 6-2v14l-6 2-6-2-6 2z'/%3E%3Cpath d='M9 4v14M15 6v14'/%3E%3C/svg%3E"); }

.joker-summary { display: flex; gap: 8px; }
.joker-summary span {
    display: flex; align-items: center; gap: 5px; font-weight: 800; font-size: 13px;
    padding: 5px 10px 5px 6px; border-radius: 99px; background: rgba(0,0,0,.28);
}
.joker-summary .jk { width: 22px; height: 22px; border-radius: 7px; }

/* ---------------------------------------------------------------- */
/* Harita                                                            */
/* ---------------------------------------------------------------- */
.world-list { flex: 1; overflow-y: auto; padding: 4px 2px 24px; display: flex; flex-direction: column; gap: 12px; scroll-padding-top: 4px; }
.world {
    flex: none; border-radius: 22px; overflow: hidden;
    background: linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.2)), var(--wimg, none) center / cover, linear-gradient(135deg, var(--wa), var(--wh) 70%, var(--wb) 160%);
    box-shadow: 0 5px 0 rgba(0,0,0,.25), 0 10px 22px rgba(0,0,0,.25);
    animation: rise .45s both;
}
.world.open { background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.72) 45%), var(--wimg, none) center / cover, var(--wa); }
.world.locked { filter: grayscale(.85) brightness(.75); }
.world-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; text-align: left; }
.world-head:active { transform: none; }
.world-no { flex: none; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.2); font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 20px; }
.world.current .world-no { background: var(--gold); color: #4a2b05; }
.world-title { flex: 1; min-width: 0; line-height: 1.15; }
.world-title b { display: block; font-family: 'Baloo 2', sans-serif; font-size: 21px; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.world-title small { opacity: .8; font-weight: 700; font-size: 13px; }
.world-state { flex: none; font-weight: 800; font-size: 15px; }
.ic-check, .ic-lock { display: block; width: 26px; height: 26px; background: center/contain no-repeat; }
.ic-check { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23ffc531'/%3E%3Cpath d='M7 12.5l3.2 3L17 9' fill='none' stroke='%234a2b05' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ic-lock { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }
.world-bar { height: 6px; margin: 0 16px 14px; background: rgba(0,0,0,.25); border-radius: 99px; overflow: hidden; }
.world-bar i { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.world-levels { display: none; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 0 16px 16px; }
.world.open .world-levels { display: grid; }
.lv { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 18px; animation: pop .35s both; }
.lv.done { background: linear-gradient(180deg, #ffd86b, #f5a524); color: #4a2b05; box-shadow: 0 3px 0 #a8620a; }
.lv.now { background: #fff; color: var(--ink); box-shadow: 0 0 0 4px var(--gold), 0 3px 0 4px #a8620a; animation: pop .35s both, breathe 1.6s .4s infinite; }
.lv.locked { background: rgba(0,0,0,.22); color: rgba(255,255,255,.55); }
.lv.dev { background: rgba(255,255,255,.18); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }

/* ---------------------------------------------------------------- */
/* Oyun ekranı                                                       */
/* ---------------------------------------------------------------- */
#game .topbar { gap: 6px; }
.star-track {
    align-self: center; display: flex; align-items: center; gap: 8px; margin-top: -4px;
    font-size: 12px; font-weight: 800; padding: 3px 12px 3px 8px; border-radius: 99px; background: rgba(0,0,0,.28);
}
.dots { display: flex; gap: 4px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.25); transition: background .3s; }
.dots i.on { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

.board-wrap { flex: 1 1 auto; min-height: 110px; display: grid; place-items: center; perspective: 700px; }
.board { position: relative; }
.cell { position: absolute; width: var(--cell); height: var(--cell); padding: 2px; }
.cell.enter span { animation: cellIn .45s cubic-bezier(.3,1.6,.5,1) both; animation-delay: var(--d, 0s); }
.cell span {
    display: grid; place-items: center; width: 100%; height: 100%;
    border-radius: calc(var(--cell) * .2);
    background: var(--t-cell-empty);
    box-shadow: inset 0 -3px 0 rgba(0,0,0,.12), inset 0 2px 0 rgba(255,255,255,.45), 0 2px 6px rgba(0,0,0,.18);
    font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: calc(var(--cell) * .58);
    color: transparent; transition: background .25s, color .25s, box-shadow .25s;
    backface-visibility: hidden;
}
.cell.on span {
    background: linear-gradient(180deg, var(--t-cell-a), var(--t-cell-b)); color: var(--t-cell-ink);
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), inset 0 2px 0 rgba(255,255,255,.5), 0 3px 8px rgba(0,0,0,.22);
}
.cell.flip span { animation: flip .5s cubic-bezier(.3,1.4,.5,1); }
.cell.glow span { box-shadow: 0 0 0 3px #fff, 0 0 18px 4px var(--t-glow); }
.cell.hint span { animation: flip .5s; background: linear-gradient(180deg, #a5f3fc, #22d3ee); color: #083344; }
.cell.mark span { box-shadow: inset 0 0 0 3px #a78bfa, 0 0 14px rgba(167,139,250,.8); animation: cluePulse 1.4s ease-in-out infinite; }
.cell.wave span { animation: wave .6s cubic-bezier(.3,1.6,.5,1); animation-delay: var(--d, 0s); }

/* bulunan kelimenin harfleri önizlemeden kutulara uçar */
.fly {
    position: fixed; z-index: 30; pointer-events: none; display: grid; place-items: center;
    font-family: 'Baloo 2', sans-serif; font-weight: 800; color: var(--t-cell-ink);
    background: linear-gradient(180deg, var(--t-cell-a), var(--t-cell-b)); border-radius: 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,.3);
    transition: transform .42s cubic-bezier(.5,0,.3,1), opacity .2s .38s;
}

.clue {
    display: none; align-items: flex-start; gap: 8px; margin: 2px 4px 0; padding: 8px 12px;
    border-radius: 14px; background: rgba(76,29,149,.78); border: 1px solid rgba(196,181,253,.5);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-size: 13.5px; font-weight: 700; line-height: 1.3;
}
.clue.show { display: flex; animation: slideDown .35s cubic-bezier(.3,1.4,.5,1); }
.clue b { flex: none; background: #a78bfa; color: #2e1065; border-radius: 8px; padding: 1px 7px; font-size: 12px; margin-top: 1px; }

.preview-row { height: 50px; flex: none; display: grid; place-items: center; }
.preview {
    min-width: 60px; padding: 3px 18px; border-radius: 14px;
    background: var(--t-tile); color: var(--t-tile-ink);
    font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 28px; letter-spacing: 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    opacity: 0; transform: scale(.8); transition: opacity .12s, transform .12s;
}
.preview.show { opacity: 1; transform: none; }
.preview.good { background: var(--good); color: #fff; }
.preview.bonus { background: var(--bonus); color: #fff; }
.preview.dup { background: #fbbf24; color: var(--ink); }
.preview.bad { background: var(--bad); color: #fff; animation: shake .4s; }

.play-area { flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; }
.side { display: flex; flex-direction: column; gap: 14px; width: 58px; align-items: center; }
.tool {
    position: relative; width: 54px; height: 54px; border-radius: 18px;
    background: var(--t-tile); color: var(--t-tile-ink);
    box-shadow: 0 4px 0 rgba(0,0,0,.2), 0 6px 14px rgba(0,0,0,.2);
    display: grid; place-items: center;
}
.tool:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.2); }
.tool svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tool svg .fill { fill: currentColor; stroke: none; }
.tool small {
    position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%);
    background: var(--ink); color: #fff; font-size: 11px; font-weight: 800;
    border-radius: 99px; padding: 1px 7px; white-space: nowrap;
}
.tool.ad { background: linear-gradient(180deg, #a78bfa, var(--ad)); color: #fff; }
.tool.ad small { background: var(--ad-d); }
.tool.bump { animation: bump .4s; }
.jar { width: 26px; height: 32px; border: 3px solid currentColor; border-radius: 6px 6px 9px 9px; position: relative; overflow: hidden; display: block; }
.jar i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(180deg, #7dd3fc, var(--bonus)); transition: height .4s; }
.tool.full { background: linear-gradient(180deg, #7dd3fc, #0ea5e9); color: #fff; animation: wiggle 1.4s infinite; }

.wheel {
    position: relative; width: min(60vw, 264px, 34vh); aspect-ratio: 1; flex: none;
    border-radius: 50%; background: var(--t-wheel);
    box-shadow: 0 8px 0 rgba(0,0,0,.18), 0 14px 30px rgba(0,0,0,.3), inset 0 0 0 6px var(--t-ring);
    touch-action: none;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.wheel.enter { animation: wheelIn .6s cubic-bezier(.3,1.4,.5,1); }
.wheel-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.wheel-line polyline { fill: none; stroke: var(--t-line); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; opacity: .9; filter: drop-shadow(0 0 6px var(--t-glow)); }
.tile {
    position: absolute; z-index: 2; border-radius: 50%;
    display: grid; place-items: center; color: var(--t-tile-ink);
    font-family: 'Baloo 2', sans-serif; font-weight: 800; line-height: 1;
    transition: left .35s, top .35s, background .12s, transform .15s, color .12s;
    pointer-events: none;
}
.tile.sel { background: var(--t-sel); color: var(--t-sel-ink); transform: scale(1.12); box-shadow: 0 0 16px var(--t-glow); }
.tile.spin { animation: pop .35s; }

.joker-bar { flex: none; display: flex; justify-content: center; gap: 10px; padding: 12px 0 2px; }
.joker {
    position: relative; flex: 1; max-width: 108px; height: 58px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--glass); border: 1px solid var(--glass-b);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-weight: 800; font-size: 14px;
}
.joker span { line-height: 1; }
.joker b {
    position: absolute; top: -7px; right: -5px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px;
    display: grid; place-items: center; font-size: 13px; background: var(--good); color: #fff;
    box-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.joker.empty b { background: var(--ad); }
.joker.used { animation: bump .45s; }
.jk { width: 32px; height: 32px; border-radius: 10px; display: inline-block; flex: none; background: center / 70% no-repeat; }
.jk.harf { background-color: #f59e0b; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctext x='12' y='18' text-anchor='middle' font-family='Arial Black,Arial' font-weight='900' font-size='17' fill='white'%3EA%3C/text%3E%3C/svg%3E"); }
.jk.anlam { background-color: #8b5cf6; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M3 5c3-1 6-1 9 1 3-2 6-2 9-1v14c-3-1-6-1-9 1-3-2-6-2-9-1z'/%3E%3Cpath d='M12 6v14'/%3E%3C/svg%3E"); }
.jk.kelime { background-color: #10b981; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 20L15 9M14 4v3M18 6l-2 2M20 10h-3M9 5l1 2M19 15l-2-1'/%3E%3C/svg%3E"); }
.jk.big { width: 76px; height: 76px; border-radius: 24px; box-shadow: 0 6px 0 rgba(0,0,0,.15); }

/* ---------------------------------------------------------------- */
/* Ayarlar                                                           */
/* ---------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-b); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); flex: none; }
.tabs button { flex: 1; padding: 9px 0; border-radius: 12px; font-weight: 800; font-size: 14px; opacity: .8; }
.tabs button.on { background: #fff; color: var(--ink); opacity: 1; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.tab-body { flex: 1; overflow-y: auto; padding: 12px 2px 20px; }
.pane { display: none; flex-direction: column; gap: 10px; }
.pane.on { display: flex; animation: rise .3s both; }
.set-card {
    background: rgba(255,248,236,.94); color: var(--ink); border-radius: 18px; padding: 14px 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,.22);
}
.set-row { display: flex; align-items: center; gap: 12px; }
.set-row > div { flex: 1; line-height: 1.2; }
.set-row b { display: block; font-size: 16px; }
.set-row small { opacity: .65; font-weight: 700; font-size: 12.5px; }
.set-ic { width: 38px; height: 38px; border-radius: 12px; flex: none; background: center / 60% no-repeat; }
.set-ic.music { background-color: #8b5cf6; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M9 18V5l11-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='17' cy='16' r='3'/%3E%3C/svg%3E"); }
.set-ic.sfx { background-color: #f59e0b; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5L6 9H2v6h4l5 4z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M19 5a10 10 0 0 1 0 14'/%3E%3C/svg%3E"); }
.set-ic.vibe { background-color: #10b981; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='7' y='3' width='10' height='18' rx='2'/%3E%3Cpath d='M3 8v8M21 8v8'/%3E%3C/svg%3E"); }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #cbd5e1; transition: background .2s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: transform .2s cubic-bezier(.3,1.4,.5,1); }
.switch input:checked + i { background: var(--good); }
.switch input:checked + i::after { transform: translateX(22px); }
.slider { width: 100%; margin: 14px 0 2px; -webkit-appearance: none; appearance: none; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--ad) var(--p, 50%), #e2e8f0 var(--p, 50%)); outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--ad); box-shadow: 0 2px 4px rgba(0,0,0,.25); }
.slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--ad); }
.slider:disabled { opacity: .4; }
.pane-note { margin: 0 4px; font-size: 13.5px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme {
    position: relative; border-radius: 18px; padding: 10px; text-align: left; color: var(--ink);
    background: rgba(255,248,236,.94); box-shadow: 0 4px 14px rgba(0,0,0,.22);
    display: flex; flex-direction: column; gap: 8px;
}
.theme.active { box-shadow: 0 0 0 3px var(--good), 0 4px 14px rgba(0,0,0,.22); }
.theme-prev {
    height: 74px; border-radius: 12px; display: grid; place-items: center; position: relative; overflow: hidden;
    background: radial-gradient(circle at 50% 60%, var(--p-wheel) 0 34px, transparent 35px), linear-gradient(135deg, #334155, #0f172a);
}
.theme-prev .row { display: flex; gap: 3px; position: absolute; top: 8px; }
.theme-prev .row i { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(180deg, var(--p-a), var(--p-b)); font: 800 11px/18px 'Baloo 2', sans-serif; color: var(--p-ink); text-align: center; font-style: normal; }
.theme-prev .row i.e { background: var(--p-empty); }
.theme-prev .dot { position: absolute; bottom: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--p-sel); box-shadow: 0 0 8px var(--p-glow); }
.theme b { font-size: 14.5px; }
.theme .state { font-size: 12px; font-weight: 800; display: flex; gap: 6px; flex-wrap: wrap; }
.theme .state span { padding: 3px 8px; border-radius: 99px; }
.theme .st-on { background: var(--good); color: #fff; }
.theme .st-use { background: #e2e8f0; }
.theme .st-ad { background: var(--ad); color: #fff; display: inline-flex; align-items: center; gap: 4px; }
.theme .st-ad .ic { width: 14px; height: 14px; }
.theme .st-buy { background: #fde68a; color: #7c4a03; }
.theme .st-time { background: #dbeafe; color: #1e3a8a; }
.about { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.about h3 { margin: 0; font-family: 'Baloo 2', sans-serif; font-size: 26px; }
.about p { margin: 0; font-weight: 700; opacity: .75; }
.about .small { font-size: 12.5px; line-height: 1.5; }
.about .pill { color: #fff; }

/* ---------------------------------------------------------------- */
/* Pencereler                                                        */
/* ---------------------------------------------------------------- */
.modal {
    position: absolute; inset: 0; z-index: 20; background: rgba(5,15,20,.62);
    display: grid; place-items: center; padding: 16px;
    opacity: 0; pointer-events: none; transition: opacity .2s;
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.modal.show { opacity: 1; pointer-events: auto; }
.card {
    position: relative; width: min(340px, 100%); background: var(--cream); color: var(--ink); border-radius: 28px;
    padding: 26px 22px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px;
    transform: scale(.8) translateY(20px); transition: transform .35s cubic-bezier(.3,1.6,.5,1);
    box-shadow: 0 20px 50px rgba(0,0,0,.4);
}
.modal.show .card { transform: none; }
.card h2 { margin: 0; font-family: 'Baloo 2', sans-serif; font-size: 34px; line-height: 1; }
.card p { margin: 0; opacity: .75; font-weight: 700; }
.card.win { padding-top: 44px; margin-top: 30px; overflow: visible; }
.card.win::before {
    content: ''; position: absolute; left: 50%; top: -10px; width: 420px; height: 420px; margin-left: -210px; margin-top: -170px; z-index: -1;
    background: repeating-conic-gradient(rgba(255,214,90,.35) 0 10deg, transparent 10deg 20deg);
    -webkit-mask: radial-gradient(circle, #000 20%, transparent 65%); mask: radial-gradient(circle, #000 20%, transparent 65%);
    animation: spin 14s linear infinite;
}
.stars { display: flex; gap: 6px; margin-top: -74px; }
.stars i { width: 56px; height: 56px; display: block; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3 6.6 7.2.8-5.4 4.9 1.5 7.1L12 17.8 5.7 21.4l1.5-7.1L1.8 9.4 9 8.6z' fill='%23ffc531' stroke='%23b7700b' stroke-width='1.2'/%3E%3C/svg%3E") center/contain no-repeat; animation: starIn .55s backwards cubic-bezier(.3,1.8,.5,1); filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); }
.stars i:nth-child(1) { animation-delay: .1s; }
.stars i:nth-child(2) { width: 74px; height: 74px; margin-top: -16px; animation-delay: .25s; }
.stars i:nth-child(3) { animation-delay: .4s; }
.win-star { display: flex; align-items: center; gap: 8px; font-family: 'Baloo 2', sans-serif; font-size: 38px; font-weight: 800; margin: 2px 0; }
.win-star.show { animation: pop .6s .5s both; }
.win-progress { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; opacity: .8; }
.win-progress .dots i { background: #e2d6c2; }
.btn-ad, .btn-main {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px; border-radius: 18px; color: #fff; font-weight: 800; font-size: 17px;
}
.btn-ad { background: linear-gradient(180deg, #8b5cf6, var(--ad-d)); box-shadow: 0 5px 0 #3b1580; }
.btn-ad .ic { width: 24px; height: 24px; }
.btn-ad b, .btn-main b { background: rgba(255,255,255,.22); padding: 2px 10px; border-radius: 99px; display: inline-flex; align-items: center; gap: 4px; }
.btn-ad:active, .btn-main:active { transform: translateY(4px); box-shadow: none; }
.btn-main { background: linear-gradient(180deg, #34d399, #059669); box-shadow: 0 5px 0 #065f46; }
.btn-text { padding: 10px 20px; font-weight: 800; opacity: .7; }
.btn-text.light { color: #fff; opacity: 1; background: rgba(255,255,255,.15); border-radius: 12px; }
.offer-ic { width: 70px; height: 70px; border-radius: 22px; background: #ede9fe center/44px no-repeat; }
.offer-ic.skip { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5l8 7-8 7zM12 5l8 7-8 7z' fill='%237c3aed'/%3E%3C/svg%3E"); }
.offer-ic.theme { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='8' cy='10' r='1.5' fill='%237c3aed'/%3E%3Ccircle cx='12' cy='7' r='1.5' fill='%237c3aed'/%3E%3Ccircle cx='16' cy='10' r='1.5' fill='%237c3aed'/%3E%3Cpath d='M12 21c-2 0-2-3 0-4s3-3 1-4'/%3E%3C/svg%3E"); }
.joker-card .have { font-size: 14px; }
.joker-card .btn-main span:first-child { margin-right: 2px; }
.card.credits { max-height: 85vh; text-align: left; align-items: stretch; }
.card.credits h2 { font-size: 26px; text-align: center; }
.card.credits p { font-size: 13px; text-align: center; }
.card.credits ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; font-size: 12.5px; line-height: 1.35; }
.card.credits li { padding: 8px 0; border-top: 1px solid rgba(0,0,0,.08); }
.card.credits li b { display: block; font-size: 14px; }
.card.credits a { color: #6d28d9; font-weight: 700; }
.card.credits .btn-text { align-self: center; }

/* Hediye kutusu */
.gift-stage { position: relative; width: min(320px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.gift-rays {
    position: absolute; top: -60px; width: 380px; height: 380px; opacity: 0; transition: opacity .4s;
    background: repeating-conic-gradient(rgba(255,214,90,.4) 0 9deg, transparent 9deg 18deg);
    -webkit-mask: radial-gradient(circle, #000 15%, transparent 65%); mask: radial-gradient(circle, #000 15%, transparent 65%);
    animation: spin 12s linear infinite; pointer-events: none;
}
.gift-stage.opened .gift-rays { opacity: 1; }
.giftbox { position: relative; width: 150px; height: 150px; margin-top: 30px; cursor: pointer; }
.giftbox.shake { animation: giftShake .9s ease-in-out infinite; }
.gift-body {
    position: absolute; left: 10px; right: 10px; bottom: 0; height: 100px; border-radius: 12px;
    background: linear-gradient(90deg, transparent 42%, #ffd65a 42% 58%, transparent 58%), linear-gradient(180deg, #ef4444, #b91c1c);
    box-shadow: inset 0 -8px 0 rgba(0,0,0,.18), 0 10px 24px rgba(0,0,0,.35);
}
.gift-lid {
    position: absolute; left: 0; right: 0; top: 22px; height: 36px; border-radius: 10px; z-index: 2;
    background: linear-gradient(90deg, transparent 42%, #ffd65a 42% 58%, transparent 58%), linear-gradient(180deg, #f87171, #dc2626);
    box-shadow: 0 4px 0 rgba(0,0,0,.2);
    transition: transform .6s cubic-bezier(.3,1.4,.5,1), opacity .6s;
}
.gift-lid::before, .gift-lid::after {
    content: ''; position: absolute; top: -26px; width: 34px; height: 30px; border: 7px solid #ffd65a; border-radius: 50% 50% 0 50%;
}
.gift-lid::before { left: 38px; transform: rotate(10deg); }
.gift-lid::after { right: 38px; transform: scaleX(-1) rotate(10deg); }
.gift-stage.opened .gift-lid { transform: translateY(-90px) rotate(-18deg); opacity: 0; }
.gift-stage.opened .giftbox { animation: none; }
.gift-reward { min-height: 64px; display: flex; gap: 12px; justify-content: center; align-items: center; font-family: 'Baloo 2', sans-serif; font-size: 26px; font-weight: 800; }
.gift-reward .item { display: flex; align-items: center; gap: 6px; background: var(--cream); color: var(--ink); padding: 6px 14px 6px 8px; border-radius: 16px; animation: popUp .6s cubic-bezier(.3,1.6,.5,1) both; box-shadow: 0 6px 16px rgba(0,0,0,.3); }
.gift-reward .item:nth-child(2) { animation-delay: .15s; }
.gift-reward .item .jk { width: 30px; height: 30px; }
.gift-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; opacity: 0; transition: opacity .3s .4s; pointer-events: none; }
.gift-stage.opened .gift-actions { opacity: 1; pointer-events: auto; }
.gift-hint { font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,.5); animation: breathe 1.5s infinite; }

.ad-mock { position: absolute; inset: 0; z-index: 40; background: #0a0a0f; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .2s; }
.ad-mock.show { opacity: 1; pointer-events: auto; }
.ad-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px; }
.ad-box small { letter-spacing: 2px; opacity: .6; font-weight: 800; }
.ad-count { font-family: 'Baloo 2', sans-serif; font-size: 90px; font-weight: 800; line-height: 1; color: #a78bfa; }
.ad-box p { margin: 0; opacity: .7; }

.fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 25; pointer-events: none; }
.fly-star { position: fixed; z-index: 35; width: 40px; height: 40px; pointer-events: none; transition: transform .8s cubic-bezier(.5,-0.3,.3,1), opacity .2s .75s; }

.toast {
    position: absolute; left: 50%; top: 70px; z-index: 30; transform: translate(-50%, -20px);
    background: rgba(20,20,20,.88); padding: 10px 18px; border-radius: 14px; font-weight: 800; font-size: 14px;
    opacity: 0; pointer-events: none; transition: all .25s cubic-bezier(.3,1.4,.5,1); max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- */
@keyframes pop { 0% { transform: scale(.4); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes popUp { 0% { transform: translateY(30px) scale(.3); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes bump { 50% { transform: scale(1.18); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes breathe { 50% { transform: scale(1.04); } }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-6deg); } 90% { transform: rotate(6deg); } 95% { transform: rotate(-3deg); } }
@keyframes cellIn { 0% { transform: scale(0) rotate(-20deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes flip { 0% { transform: rotateX(90deg) scale(.9); } 60% { transform: rotateX(-15deg) scale(1.12); } 100% { transform: none; } }
@keyframes wave { 0%, 100% { transform: none; } 45% { transform: translateY(-12px) scale(1.12); } }
@keyframes cluePulse { 50% { box-shadow: inset 0 0 0 3px #c4b5fd, 0 0 22px rgba(167,139,250,1); } }
@keyframes wheelIn { 0% { transform: rotate(-90deg) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes slideDown { 0% { transform: translateY(-14px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes rise { 0% { transform: translateY(16px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes drop { 0% { transform: translateY(-40px) scale(.8); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes starIn { 0% { transform: scale(0) rotate(-180deg); } 100% { transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
@keyframes sweep { 0% { left: -80px; } 40%, 100% { left: 120%; } }
@keyframes float { 0% { transform: translateY(0) translateX(0); opacity: 0; } 10% { opacity: .9; } 90% { opacity: .6; } 100% { transform: translateY(-105vh) translateX(30px); opacity: 0; } }
@keyframes kenburns { 0% { transform: scale(1); } 100% { transform: scale(1.08) translate(-1%, -1%); } }
@keyframes giftShake { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-7deg) scale(1.04); } 80% { transform: rotate(7deg) scale(1.04); } 90% { transform: rotate(-4deg); } }

@media (max-height: 680px) {
    .logo .l1 { font-size: 42px; } .logo .l2 { font-size: 50px; }
    .home-body { gap: 13px; }
    .side { gap: 10px; }
    .tool { width: 48px; height: 48px; }
    .joker { height: 50px; }
    .joker-bar { padding-top: 8px; }
    .preview-row { height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
