@font-face { font-family: Baloo; src: url(font/baloo2-body.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Baloo; src: url(font/baloo2-digits.woff2) format('woff2'); unicode-range: U+30-39; font-display: swap; }

:root { --gece: #1b1036; --mor: #3d2a72; --krem: #fff6e4; --soluk: #b9a9e0; --gunes: #ffb31f; --gunes-koyu: #a85a00; --r1: #9aa0a9; --r2: #454952; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; background: var(--gece); }
body { font-family: Baloo, 'Trebuchet MS', sans-serif; font-weight: 800; color: var(--krem); touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 3px solid var(--krem); outline-offset: 2px; }
[hidden] { display: none !important; }
img { -webkit-user-drag: none; pointer-events: none; }

#zemin { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(120% 75% at 50% 42%, var(--mor), var(--gece) 72%); }
#tonu { position: absolute; inset: 0; opacity: 0; background: radial-gradient(90% 60% at 50% 40%, var(--r1), var(--r2) 55%, transparent 90%); transition: opacity .25s; }
#isinlar { position: absolute; left: 50%; top: 40%; width: 200vmax; height: 200vmax; margin: -100vmax; border-radius: 50%; opacity: 0; transition: opacity .35s;
  background: repeating-conic-gradient(var(--r1) 0 7deg, transparent 7deg 20deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 8%, transparent 62%); mask-image: radial-gradient(closest-side, #000 8%, transparent 62%); }
#isinlar.donuyor { animation: don 18s linear infinite; }
@keyframes don { to { transform: rotate(360deg); } }

#oyun { position: relative; height: 100%; height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column;
  padding: max(10px, env(safe-area-inset-top)) 14px max(6px, env(safe-area-inset-bottom)); }

header { display: flex; align-items: center; gap: 8px; }
#para { display: flex; align-items: center; gap: 8px; margin-right: auto; padding: 4px 16px 4px 6px; background: #0e0722a8; border-radius: 40px; font-size: 28px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.sikke { display: inline-block; width: .95em; height: .95em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b0, #ffc62e 45%, #c07800); box-shadow: inset 0 0 0 .1em #ffe27a, inset 0 0 0 .17em #b97200; vertical-align: -.12em; flex: none; }
#eniyi { display: flex; align-items: center; gap: 7px; text-align: left; padding: 3px 12px 3px 3px; border-radius: 14px; background: #0e0722a8; line-height: 1.05; }
#eniyi small { display: block; font-size: 10px; color: var(--soluk); }
#eniyi b { font-size: 15px; }
#eniyi-resim { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(var(--r1), var(--r2)); }
#ses { width: 38px; height: 38px; border-radius: 50%; background: #0e0722a8 center / 22px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff6e4'%3E%3Cpath d='M3 9v6h4l6 5V4L7 9H3z'/%3E%3Cpath d='M16 8a5 5 0 010 8M18.500 5a9 9 0 010 14' fill='none' stroke='%23fff6e4' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
#ses[aria-pressed=true] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b9a9e0'%3E%3Cpath d='M3 9v6h4l6 5V4L7 9H3z'/%3E%3Cpath d='M16 9l6 6M22 9l-6 6' stroke='%23b9a9e0' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }

#sahne { position: relative; flex: 1; min-height: 0; --kutu: min(64vw, 270px, 34dvh); }
#kutu, .hayalet { position: absolute; left: 50%; bottom: 9%; width: var(--kutu); height: var(--kutu); margin-left: calc(var(--kutu) / -2); transform-origin: 50% 90%; }
#kutu::before { content: ''; position: absolute; left: 6%; right: 6%; bottom: -3%; height: 14%; border-radius: 50%; background: radial-gradient(closest-side, #05021299, transparent); }
#govde, #kapak, .hayalet > div { position: absolute; inset: 0; }
#govde img, #kapak img, .hayalet img { width: 100%; height: 100%; object-fit: contain; }
#kapak.resimli { display: none; }
/* görsel yoksa çizilen kutu */
.cizim { position: absolute; left: 12%; right: 12%; border-radius: 12px; border: 4px solid #0004; background: linear-gradient(var(--k1), var(--k2)); }
.hayalet [data-parca=govde] .cizim { top: 46%; bottom: 6%; }
.hayalet [data-parca=kapak] .cizim { top: 28%; height: 21%; left: 8%; right: 8%; }
.hayalet { z-index: 1; pointer-events: none; }
.hayalet [data-parca=kapak] { transform-origin: 30% 45%; }
.hayalet [data-parca=govde] { transform-origin: 50% 90%; }
.cizim::after { content: ''; position: absolute; left: 43%; width: 14%; top: -4px; bottom: -4px; background: var(--k3); }
#govde .cizim { top: 46%; bottom: 6%; border-top-left-radius: 3px; border-top-right-radius: 3px; }
#kapak .cizim { top: 28%; height: 21%; left: 8%; right: 8%; }
#sizinti { position: absolute; left: -12%; right: -12%; top: calc(var(--dikis, 45%) - 22%); height: 44%; z-index: 1; opacity: 0; pointer-events: none;
  background: radial-gradient(50% 13% at 50% 50%, #fff 40%, var(--s, #fff) 72%, transparent), radial-gradient(closest-side, #fff, var(--s, #fff) 30%, transparent); }
#sizinti::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: 50%; height: 120%; background: repeating-conic-gradient(from -70deg at 50% 100%, var(--s, #fff) 0 5deg, transparent 5deg 17deg);
  -webkit-mask-image: radial-gradient(70% 100% at 50% 100%, #000, transparent 75%); mask-image: radial-gradient(70% 100% at 50% 100%, #000, transparent 75%); }
header, #kutular, #ac, #tutamac { transition: opacity .3s; }
.karanlik header, .karanlik #kutular, .karanlik #ac, .karanlik #tutamac { opacity: .16; }
#zemin::after { content: ''; position: absolute; inset: 0; background: radial-gradient(75% 50% at 50% 52%, transparent 30%, #04010cee 95%); opacity: 0; transition: opacity .4s; }
body:has(.karanlik) #zemin::after { opacity: 1; }
#kutu.bekliyor { animation: soluk 2.6s ease-in-out infinite; }
@keyframes soluk { 50% { transform: translateY(-9px) scale(1.015, .99); } }

#ipucu { position: absolute; left: 0; right: 0; top: 14%; text-align: center; font-size: 16px; line-height: 1.35; color: var(--soluk); padding: 0 40px; }
#zincir { position: absolute; right: 0; bottom: 4px; padding: 1px 11px; border-radius: 20px; background: var(--krem); color: var(--gece); font-size: 15px; rotate: -5deg; }

#odul { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-bottom: 2%; pointer-events: none; }
#plaka { position: relative; width: min(66vw, 280px, 31dvh); aspect-ratio: 1; flex: none; border-radius: 28% / 28%; background: radial-gradient(circle at 50% 38%, var(--r1), var(--r2) 82%); border: 5px solid var(--r1); box-shadow: 0 14px 0 #0004; }
#plaka-resim { position: absolute; inset: 3%; display: grid; place-items: center; }
#plaka-resim img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 6px #0006); }
.yedek { font-size: min(34vw, 130px); line-height: 1; }
#yeni, #tek { position: absolute; right: -12px; top: -10px; padding: 0 12px; border-radius: 20px; background: var(--krem); color: var(--gece); font-size: 17px; rotate: 11deg; }
#tek { left: -14px; right: auto; top: auto; bottom: -8px; rotate: -14deg; background: #fff; color: #b0001c; border: 3px double #b0001c; border-radius: 6px; font-size: 22px; }
#odul h2 { margin-top: 14px; font-size: clamp(21px, 7vw, 30px); line-height: 1.15; padding: 0 8px; text-shadow: 0 3px 0 #0007; }
#odul p { display: flex; align-items: center; gap: 12px; font-size: 18px; text-shadow: 0 2px 0 #0007; }
#odul-nadirlik { color: var(--r1); }
#odul-deger { font-size: 28px; font-variant-numeric: tabular-nums; }
#odul-sat { pointer-events: auto; margin-top: 4px; padding: 4px 22px; border-radius: 30px; background: #0e0722cc; border: 2px solid #ffffff3d; font-size: 16px; }
#odul-sat:disabled { opacity: .45; }
/* ödül çıkınca kutu aşağıda küçülür */
.acik #kutu { opacity: 0; }

#kutular { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin: 6px 0 10px; }
.sec { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 4px 0 6px; border-radius: 15px; background: #0e072280; border: 2px solid transparent; overflow: hidden; font-size: 13px; line-height: 1.2; }
.sec .mini { width: 80%; aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.sec .mini img { width: 100%; height: 100%; object-fit: contain; }
.sec .mini .cizim { inset: 24% 12% 14%; border-width: 2px; border-radius: 5px; }
.sec[aria-pressed=true] { background: var(--mor); border-color: var(--gunes); transform: translateY(-4px); }
.sec.kilitli .mini { filter: grayscale(1) brightness(.55); }
.sec.kilitli { color: var(--soluk); }
.sec.kilitli::after { content: ''; position: absolute; top: 22%; width: 18px; height: 22px; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 22'%3E%3Cpath d='M4 10V7a5 5 0 0110 0v3' fill='none' stroke='%23fff6e4' stroke-width='3'/%3E%3Crect x='1' y='9' width='16' height='12' rx='3' fill='%23fff6e4'/%3E%3C/svg%3E"); }
.sec .dolum { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--gunes); transform-origin: left; }
.sec.parla { animation: parla .5s ease-in-out 4; }
@keyframes parla { 50% { transform: translateY(-9px) scale(1.1); background: var(--gunes); color: var(--gece); } }

#ac { touch-action: none; position: relative; height: clamp(74px, 11dvh, 96px); flex: none; border-radius: 28px; color: #4a2300; line-height: 1;
  background: linear-gradient(#ffe066, var(--gunes) 55%, #ff9500); box-shadow: 0 8px 0 var(--gunes-koyu), 0 14px 18px #0006; margin-bottom: 14px; }
#ac::before { content: ''; position: absolute; left: 22px; right: 22px; top: 7px; height: 22%; border-radius: 20px; background: #ffffff70; }
#ac b { position: relative; display: block; font-size: clamp(32px, 10vw, 42px); line-height: 1.05; }
#ac small { position: relative; display: block; font-size: 15px; opacity: .8; }
#ac.basili { transform: translateY(6px); box-shadow: 0 2px 0 var(--gunes-koyu), 0 6px 10px #0006; filter: brightness(.96); }
#ac.yetmez { filter: grayscale(.75) brightness(.8); }

#tutamac, #kapat { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: none; padding: 7px 0 4px; font-size: 15px; color: var(--soluk); touch-action: none; }
#tutamac i, #kapat i { width: 46px; height: 5px; border-radius: 3px; background: #ffffff4d; }
#tutamac.zipla { animation: zipla .3s; }
@keyframes zipla { 40% { transform: translateY(-7px) scale(1.08); color: var(--krem); } }

#perde { position: fixed; inset: 0; z-index: 4; background: #0a0419b0; }
#cekmece { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; height: 86dvh; display: flex; flex-direction: column; padding: 0 14px max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(#34225f, var(--gece)); border-radius: 28px 28px 0 0; transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .9, .3, 1.05); visibility: hidden; }
#cekmece.acikti { transform: none; visibility: visible; }
#cekmece:not(.acikti) { transition: transform .22s ease-in, visibility 0s .22s; }
#sekmeler { display: flex; gap: 6px; padding: 5px; margin: 6px 0 10px; border-radius: 18px; background: #0e072290; }
#sekmeler button { flex: 1; padding: 5px 0; border-radius: 13px; color: var(--soluk); font-size: 16px; }
#sekmeler button[aria-selected=true] { background: var(--krem); color: var(--gece); }
#icerik { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding-bottom: 12px; }
.izgara { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; align-content: start; }
.esya { position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 4px 7px; border-radius: 18px; background: radial-gradient(circle at 50% 30%, var(--r1), var(--r2) 88%); line-height: 1.15; text-shadow: 0 1px 2px #000a; min-width: 0; }
.esya .resim { width: 100%; aspect-ratio: 1.15; display: grid; place-items: center; }
.esya img, .goz img, .sira img, #eniyi-resim img { width: 100%; height: 100%; object-fit: contain; }
.esya .yedek { font-size: 46px; }
.esya .ad { font-size: 12px; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.esya .deger { font-size: 15px; }
.esya .adet { position: absolute; right: 5px; top: 3px; padding: 0 7px; border-radius: 12px; background: #0e0722c0; font-size: 13px; }
.esya:active { transform: scale(.94); }
.esya.essiz { border: 3px solid #ffd7d2; animation: nabiz 1.8s ease-in-out infinite; }
@keyframes nabiz { 50% { filter: brightness(1.22); } }
.esya .damga { position: absolute; left: 4px; top: 5px; padding: 0 6px; border: 2px solid #fff; border-radius: 4px; font-size: 12px; rotate: -13deg; }
.esya.onay .deger { background: var(--krem); color: #b0001c; border-radius: 10px; padding: 0 8px; text-shadow: none; }
.bos { grid-column: 1 / -1; text-align: center; color: var(--soluk); padding: 40px 20px; font-size: 17px; line-height: 1.4; }

.raf { margin-bottom: 10px; }
.raf h3 { display: flex; justify-content: space-between; font-size: 14px; color: var(--r1); padding: 0 3px 2px; }
.raf div { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.goz { aspect-ratio: 1; display: grid; place-items: center; padding: 2px; border-radius: 12px; background: radial-gradient(circle at 50% 35%, var(--r1), var(--r2)); }
.goz.yok { background: #0e072299; }
.goz.yok img, .goz.yok .yedek { filter: brightness(0) invert(.35); opacity: .65; }
.goz .yedek, .sira .yedek { font-size: 28px; }
#albumyazi { min-height: 24px; text-align: center; font-size: 15px; color: var(--soluk); }

.sira { display: grid; grid-template-columns: 26px 48px 1fr auto; align-items: center; gap: 10px; padding: 5px 12px 5px 6px; margin-bottom: 6px; border-radius: 16px; background: linear-gradient(90deg, var(--r2), #0e072266); }
.sira > b:first-child { text-align: center; color: var(--soluk); }
.sira .resim { width: 48px; height: 48px; display: grid; place-items: center; }
.sira span { font-size: 15px; line-height: 1.15; }
.sira small { display: block; color: var(--r1); font-size: 12px; }
.not { text-align: center; color: var(--soluk); font-size: 14px; padding: 10px; }

#toplu { flex: none; padding: 12px; border-radius: 20px; background: linear-gradient(#ffe066, var(--gunes)); color: #4a2300; box-shadow: 0 5px 0 var(--gunes-koyu); font-size: 18px; margin-bottom: 5px; }
#toplu:disabled { filter: grayscale(1) brightness(.6); }

#essiz-yazi { position: fixed; z-index: 6; left: 0; right: 0; top: 8.5%; display: flex; justify-content: center; font-family: Baloo, sans-serif; font-size: min(21vw, 96px); line-height: 1.2; pointer-events: none; }
#essiz-yazi span { display: inline-block; color: #fff; -webkit-text-stroke: 3px #7a0010; text-shadow: 0 7px 0 #7a0010, 0 0 34px #ff3b2f; }
#flas { position: fixed; inset: 0; z-index: 7; background: #fff; opacity: 0; pointer-events: none; }
#parcacik { position: fixed; inset: 0; z-index: 6; width: 100%; height: 100%; pointer-events: none; }
.ucan { position: fixed; z-index: 3; pointer-events: none; }

@media (max-height: 700px) { #eniyi small { display: none; } .sec { font-size: 11px; } #kutular .mini { width: 62%; } #odul h2 { margin-top: 6px; } }
@media (prefers-reduced-motion: reduce) { #kutu.bekliyor, #isinlar.donuyor, .esya.essiz { animation: none; } }
