/* Takılma! arayüzü: ana menü, oyun içi göstergeler, dokunmatik kontroller ve pencereler. Sahne #cv tuvalinde çizilir. */
:root { --bg: #1b1140; --ink: #fff; --dim: #c9c2ec; --yel: #ffd23f; --org: #ff8a3c; --pink: #ff4d8d; --grn: #3ecf8e; --card: rgba(27, 17, 64, .88); --line: rgba(255, 255, 255, .16); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 500 16px/1.35 'Baloo 2', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- düğmeler ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 4px 16px 0; border: 0; border-radius: 16px; background: #3a2a7a; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: .02em; cursor: pointer; box-shadow: 0 5px 0 #20124f, 0 8px 18px rgba(0, 0, 0, .3); transition: transform .08s, box-shadow .08s, filter .15s; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #20124f; }
.btn.pri { background: linear-gradient(180deg, #ffe169, var(--yel) 45%, var(--org)); color: #3a1c00; box-shadow: 0 5px 0 #b3531a, 0 8px 22px rgba(255, 138, 60, .45); }
.btn.pri:active { box-shadow: 0 1px 0 #b3531a; }
.btn.pink { background: linear-gradient(180deg, #ff7aa8, var(--pink)); box-shadow: 0 5px 0 #a81d57, 0 8px 22px rgba(255, 77, 141, .4); }
.btn.pink:active { box-shadow: 0 1px 0 #a81d57; }
.btn.xl { min-height: 68px; font-size: 28px; border-radius: 22px; }
.btn.sm { min-height: 44px; font-size: 14.5px; padding: 3px 10px 0; border-radius: 14px; }
.btn.ghost { background: rgba(255, 255, 255, .1); box-shadow: none; font-weight: 700; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn:focus-visible, input:focus-visible, .chip:focus-visible { outline: 3px solid var(--yel); outline-offset: 2px; }

/* ---------- ana menü ---------- */
.menu { position: fixed; inset: 0 auto 0 0; width: min(430px, 100%); padding: max(14px, env(safe-area-inset-top)) 22px max(14px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: center; gap: 11px; overflow-y: auto; touch-action: pan-y; background: linear-gradient(90deg, rgba(27, 17, 64, .93) 62%, rgba(27, 17, 64, 0)); }
.back { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 22px; color: var(--dim); text-decoration: none; font-weight: 700; font-size: 14px; }
.logo { margin: 18px 0 0; font-size: clamp(46px, 13vw, 70px); line-height: .95; font-weight: 800; letter-spacing: .01em; color: var(--yel); transform: rotate(-4deg); text-shadow: 0 4px 0 #b3531a, 0 8px 0 #20124f, 0 12px 22px rgba(0, 0, 0, .45); }
.logo i { display: inline-block; font-style: normal; color: var(--pink); transform: rotate(14deg) translateY(-4px); text-shadow: 0 4px 0 #a81d57, 0 8px 0 #20124f; animation: wob 1.6s ease-in-out infinite; }
@keyframes wob { 50% { transform: rotate(22deg) translateY(-9px); } }
.tagline { margin: 0 0 4px; color: var(--dim); font-weight: 700; font-size: 17px; }
.courses { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none; touch-action: pan-x; }
.courses::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-width: 86px; padding: 7px 10px 5px; border-radius: 14px; border: 2px solid transparent; background: rgba(255, 255, 255, .1); text-align: center; cursor: pointer; line-height: 1.15; }
.chip b { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; } .chip span { font-size: 21px; } .chip small { display: block; font-size: 12px; color: var(--dim); font-weight: 700; }
.chip.on { border-color: var(--yel); background: rgba(255, 210, 63, .18); } .chip.done small { color: var(--grn); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.joinrow { display: grid; grid-template-columns: 1fr 100px; gap: 9px; margin-top: 2px; }
input { min-height: 44px; padding: 3px 14px 0; border-radius: 14px; border: 2px solid var(--line); background: rgba(0, 0, 0, .28); font-weight: 800; font-size: 17px; user-select: text; -webkit-user-select: text; min-width: 0; }
#code { text-align: center; letter-spacing: .3em; text-transform: uppercase; } #code::placeholder { letter-spacing: .08em; font-size: 14px; color: #8f86bd; }
#menuMsg { min-height: 20px; margin: 0; text-align: center; color: #ffb3a8; font-weight: 700; font-size: 14.5px; }
.fine { margin: 0; text-align: center; color: #8f86bd; font-size: 13px; } .fine a { color: var(--yel); font-weight: 700; }
.chal { padding: 12px 14px 10px; border-radius: 18px; background: linear-gradient(135deg, rgba(255, 77, 141, .32), rgba(255, 138, 60, .26)); border: 2px solid rgba(255, 77, 141, .7); font-weight: 700; font-size: 16.5px; line-height: 1.3; animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.chal b { color: var(--yel); font-size: 21px; } .chal small { display: block; color: var(--dim); font-size: 13.5px; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }

/* ---------- oyun içi ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left)); }
.hl { position: absolute; top: max(8px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.hl b, .hl span { padding: 2px 12px 0; border-radius: 12px; background: rgba(20, 12, 50, .72); font-weight: 800; }
#hTime { font-size: 26px; font-variant-numeric: tabular-nums; min-width: 96px; } #hTime small { font-size: 17px; opacity: .8; }
#hFalls, #hTarget { font-size: 15px; } #hTarget { color: var(--yel); }
.prog { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 50%; width: min(46vw, 420px); height: 12px; transform: translateX(-50%); border-radius: 8px; background: rgba(20, 12, 50, .72); box-shadow: 0 0 0 2px rgba(255, 255, 255, .2); }
.prog > i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--yel), var(--org)); }
.prog .flag { position: absolute; right: -11px; top: -11px; font-size: 19px; }
#hDots b { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #fff; background: var(--c); transition: left .25s linear; }
#hDots b.me { width: 18px; height: 18px; margin: -9px 0 0 -9px; z-index: 2; } #hDots u { position: absolute; top: -3px; width: 3px; height: 18px; margin-left: -1px; background: rgba(255, 255, 255, .55); border-radius: 2px; }
#hRank { position: absolute; top: max(52px, calc(env(safe-area-inset-top) + 44px)); right: max(10px, env(safe-area-inset-right)); margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-weight: 800; font-size: 14px; }
#hRank li { display: flex; align-items: center; gap: 6px; padding: 1px 10px 0 6px; border-radius: 10px; background: rgba(20, 12, 50, .68); white-space: nowrap; } #hRank li.me { background: rgba(255, 210, 63, .9); color: #3a1c00; } #hRank li.off { opacity: .5; }
#hRank i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); border: 1.5px solid #fff; } #hRank em { font-style: normal; opacity: .8; font-size: 12.5px; }
#hMenu { position: absolute; top: max(8px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); width: 42px; height: 38px; border: 0; border-radius: 12px; background: rgba(20, 12, 50, .72); font-size: 20px; font-weight: 800; pointer-events: auto; cursor: pointer; }
#hToast { position: absolute; top: 19%; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
#hToast div { padding: 4px 18px 1px; border-radius: 16px; background: rgba(20, 12, 50, .8); font-weight: 800; font-size: clamp(18px, 4.6vw, 26px); text-align: center; animation: toast 2.2s forwards; }
#hToast div.good { background: rgba(62, 207, 142, .92); color: #06321f; } #hToast div.bad { background: rgba(255, 77, 141, .92); }
@keyframes toast { 0% { transform: scale(.5); opacity: 0; } 10% { transform: scale(1.12); opacity: 1; } 18% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-16px); } }
#hHint { position: absolute; top: 30%; left: 50%; transform: translateX(-50%); padding: 6px 20px 3px; border-radius: 16px; background: var(--yel); color: #3a1c00; font-weight: 800; font-size: clamp(17px, 4.4vw, 24px); white-space: nowrap; box-shadow: 0 5px 0 #b3531a; animation: bob 0.7s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateX(-50%) translateY(-7px); } }
#hKeys { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); padding: 3px 14px 1px; border-radius: 12px; background: rgba(20, 12, 50, .7); font-size: 14px; font-weight: 700; white-space: nowrap; color: var(--dim); }
#count { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; font-size: clamp(90px, 30vw, 190px); font-weight: 800; color: var(--yel); text-shadow: 0 6px 0 #b3531a, 0 12px 0 #20124f, 0 18px 30px rgba(0, 0, 0, .5); }
#count.tick { animation: tick .5s cubic-bezier(.2, 1.6, .4, 1); } @keyframes tick { from { transform: scale(2); opacity: 0; } }
#net { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); padding: 6px 16px 3px; border-radius: 12px; background: var(--pink); font-weight: 800; z-index: 50; }

/* ---------- dokunmatik ---------- */
#touch { position: fixed; inset: 0; pointer-events: none; }
#joy { position: absolute; left: max(22px, env(safe-area-inset-left)); bottom: max(26px, env(safe-area-inset-bottom)); width: 132px; height: 132px; border-radius: 50%; background: rgba(255, 255, 255, .14); border: 2px solid rgba(255, 255, 255, .3); pointer-events: auto; }
#joyKnob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(255, 255, 255, .78); box-shadow: 0 3px 10px rgba(0, 0, 0, .35); }
#tJump, #tDuck { position: absolute; border: 0; border-radius: 50%; font-weight: 800; pointer-events: auto; color: #3a1c00; box-shadow: 0 5px 0 rgba(0, 0, 0, .35); }
#tJump { right: max(20px, env(safe-area-inset-right)); bottom: max(34px, env(safe-area-inset-bottom)); width: 104px; height: 104px; font-size: 20px; background: rgba(255, 210, 63, .92); }
#tDuck { right: max(132px, calc(env(safe-area-inset-right) + 112px)); bottom: max(18px, env(safe-area-inset-bottom)); width: 78px; height: 78px; font-size: 16px; background: rgba(255, 255, 255, .85); }
#tJump.on, #tDuck.on { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .35); filter: brightness(.9); }

/* ---------- pencereler ---------- */
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 14px; background: rgba(10, 5, 30, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); touch-action: pan-y; }
.box { position: relative; width: min(440px, 100%); max-height: 100%; overflow-y: auto; padding: 20px 20px 18px; border-radius: 26px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 24px 70px rgba(0, 0, 0, .55); text-align: center; display: flex; flex-direction: column; gap: 10px; animation: pop .35s cubic-bezier(.2, 1.5, .4, 1); }
.box > * { flex-shrink: 0; }
.box h2 { margin: 0; font-size: 30px; font-weight: 800; line-height: 1; color: var(--yel); text-shadow: 0 3px 0 #b3531a; } .box h2 i { font-style: normal; color: var(--pink); text-shadow: 0 3px 0 #a81d57; }
.box h3 { margin: 4px 0 0; font-size: 15px; color: var(--dim); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.box p { margin: 0; } .box .dim { color: var(--dim); font-size: 14.5px; } .box a { color: var(--yel); font-weight: 800; }
.x { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 12px; background: none; color: var(--dim); font-size: 22px; cursor: pointer; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { padding: 8px 4px 5px; border-radius: 16px; background: rgba(255, 255, 255, .09); line-height: 1.15; } .stats small { display: block; color: var(--dim); font-size: 13px; font-weight: 700; } .stats b { font-size: 23px; font-weight: 800; font-variant-numeric: tabular-nums; } .stats b small { display: inline; font-size: 14px; }
.record { align-self: center; padding: 3px 16px 0; border-radius: 12px; background: var(--grn); color: #06321f; font-weight: 800; animation: wob2 .8s ease-in-out infinite alternate; } @keyframes wob2 { to { transform: rotate(-3deg) scale(1.06); } }
.say { font-size: 18.5px; font-weight: 700; line-height: 1.3; } .say b { color: var(--yel); }
.list { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.list .r { display: grid; grid-template-columns: 30px 1fr auto auto; align-items: center; gap: 8px; padding: 5px 12px 3px; border-radius: 12px; background: rgba(255, 255, 255, .07); font-weight: 700; }
.list .r.me { background: rgba(255, 210, 63, .22); box-shadow: inset 0 0 0 2px var(--yel); } .list .r.fr b::after { content: ' 🤝'; }
.list .r i { font-style: normal; font-weight: 800; color: var(--dim); } .list .r b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .list .r span { font-weight: 800; font-variant-numeric: tabular-nums; } .list .r em { font-style: normal; font-size: 13px; color: var(--dim); min-width: 38px; text-align: right; }
.list .gap { text-align: center; color: var(--dim); line-height: .6; }
.tabs { display: flex; gap: 6px; } .tabs button { flex: 1; min-height: 38px; padding-top: 3px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .09); font-weight: 800; cursor: pointer; } .tabs button.on { background: var(--yel); color: #3a1c00; }
.codebig { font-size: 54px; line-height: 1; font-weight: 800; letter-spacing: .16em; color: var(--yel); text-shadow: 0 4px 0 #b3531a; user-select: all; -webkit-user-select: all; padding-left: .16em; }
.plist { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; } .plist span { display: flex; align-items: center; gap: 6px; padding: 3px 12px 1px 7px; border-radius: 12px; background: rgba(255, 255, 255, .1); font-weight: 800; } .plist span.off { opacity: .45; } .plist i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2px solid #fff; }
.sw { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; } .sw button { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; background: var(--c); cursor: pointer; } .sw button.on { border-color: #fff; transform: scale(1.15); }
.share3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.linkbox { padding: 8px 12px 6px; border-radius: 12px; background: rgba(0, 0, 0, .3); font-size: 14px; word-break: break-all; user-select: all; -webkit-user-select: all; color: var(--dim); }
.note { padding: 8px 12px 6px; border-radius: 14px; background: rgba(255, 255, 255, .07); font-size: 14.5px; color: var(--dim); }

@media (max-width: 700px) {
  .menu { inset: 0; width: 100%; background: linear-gradient(180deg, rgba(27, 17, 64, .9), rgba(27, 17, 64, .72)); padding-left: max(22px, calc(50% - 200px)); padding-right: max(22px, calc(50% - 200px)); }
  .back { left: max(22px, calc(50% - 200px)); }
  #hKeys { display: none; }
  .prog { left: 132px; right: 74px; width: auto; transform: none; top: max(21px, calc(env(safe-area-inset-top) + 13px)); }
  #hTime { font-size: 22px; min-width: 84px; } #hTime small { font-size: 15px; }
}
@media (max-height: 640px) { .menu { justify-content: flex-start; gap: 8px; } .logo { font-size: 42px; margin-top: 22px; } .tagline, .fine { display: none; } .btn.xl { min-height: 56px; font-size: 24px; } .btn { min-height: 44px; } }
@media (max-height: 480px) and (orientation: landscape) { #joy { width: 112px; height: 112px; bottom: 14px; } #tJump { width: 88px; height: 88px; bottom: 16px; } #tDuck { width: 68px; height: 68px; right: 116px; bottom: 10px; } #hToast { top: 14%; } }

/* Parkur düğmeleri yana kaydırmayla değil, alt alta sıralanarak gösterilir: bilgisayarda fareyle kaydırılamadığı için sondakiler görünmüyordu */
.menu .courses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; padding-bottom: 2px; }
.box .courses { flex-wrap: wrap; justify-content: center; overflow: visible; padding-bottom: 2px; }
.menu .chip, .box .chip { min-width: 0; } .box .chip { flex: 1 1 86px; max-width: 140px; }
.chip b { overflow: hidden; text-overflow: ellipsis; }