/* Oyunlar bölümü: liste ve oyun sayfaları. Mor yok (proje kuralı). Dosya değişince OYUN_STATIK_SURUM artırılır. */
:root {
    --oy-coral: #FF6B4A;
    --oy-coral-koyu: #D9482A;
    --oy-nane: #4FD19B;
    --oy-nane-koyu: #1E8F62;
    --oy-gunes: #FFCD3A;
    --oy-gok: #7BBCF0;
    --oy-turkuaz: #26A69A;
    --oy-krem: #FFF4E8;
    --oy-krem-2: #FFE8D2;
    --oy-murekkep: #1F2330;
    --oy-murekkep-acik: #4A5368;
    --oy-golge: 0 10px 30px rgba(217, 72, 42, 0.12);
    --oy-yaricap: 22px;
}

.oyun-sayfa { color: var(--oy-murekkep); }
.oyun-sayfa h1, .oyun-sayfa h2, .oyun-sayfa h3 { color: var(--oy-murekkep); font-weight: 800; letter-spacing: -0.01em; }

/* Başlık */
.oyun-baslik { display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 12px; }
.oyun-baslik h1 { font-size: clamp(1.45rem, 5.2vw, 2.1rem); line-height: 1.2; margin: 0 0 6px; }
.oyun-baslik-emoji {
    flex: 0 0 auto; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
    font-size: 30px; background: linear-gradient(135deg, var(--oy-gunes), #FFB36B); box-shadow: var(--oy-golge);
}
.oyun-giris { font-size: 1.05rem; line-height: 1.55; color: var(--oy-murekkep-acik); margin: 0; }

.oyun-etiketler { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 16px; }
.oyun-etiketler li {
    background: #fff; border: 1px solid var(--oy-krem-2); border-radius: 999px; padding: 4px 12px;
    font-size: 0.9rem; font-weight: 600; color: var(--oy-murekkep-acik);
}

/* Reklam alanları: oyun kartının dışında, araya boşluk bırakılır */
.oyun-reklam { margin: 28px 0; }
.oyun-reklam-ust { margin: 0 0 16px; }
.oyun-reklam-sabit { width: 100%; height: 100px; }
@media (min-width: 768px) { .oyun-reklam-sabit { height: 90px; } }

/* Oyun kartı */
.oyun-kart {
    position: relative; background: linear-gradient(180deg, var(--oy-krem) 0%, #FFFDF9 100%);
    border: 2px solid var(--oy-krem-2); border-radius: var(--oy-yaricap); padding: 16px; box-shadow: var(--oy-golge);
    overflow: hidden;
}
@media (min-width: 576px) { .oyun-kart { padding: 22px; } }
.oyun-uyari { margin: 0; font-weight: 700; color: var(--oy-coral-koyu); }

.oyun-ust-cubuk { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.oyun-secenekler { display: flex; flex-wrap: wrap; gap: 8px; }

.oyun-dugme {
    appearance: none; border: 2px solid transparent; border-radius: 999px; min-height: 48px; padding: 10px 18px;
    font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; line-height: 1.1; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: #fff; color: var(--oy-murekkep); border-color: var(--oy-krem-2);
    transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.oyun-dugme:hover { transform: translateY(-1px); text-decoration: none; color: var(--oy-murekkep); }
.oyun-dugme:active { transform: translateY(1px) scale(.98); }
.oyun-dugme:focus-visible { outline: 3px solid var(--oy-gok); outline-offset: 2px; }
.oyun-dugme[aria-pressed="true"], .oyun-dugme.secili { background: var(--oy-murekkep); color: #fff; border-color: var(--oy-murekkep); }
.oyun-dugme-ana { background: var(--oy-coral); color: #fff; border-color: var(--oy-coral); box-shadow: 0 6px 0 var(--oy-coral-koyu); }
.oyun-dugme-ana:hover { color: #fff; }
.oyun-dugme-ana:active { box-shadow: 0 2px 0 var(--oy-coral-koyu); }
.oyun-dugme-kucuk { min-height: 44px; padding: 8px 14px; font-size: .95rem; }
.oyun-dugme-ikon { width: 48px; padding: 0; font-size: 1.3rem; }

.oyun-ilerleme { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.oyun-ilerleme span { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--oy-krem-2); }
.oyun-ilerleme span.dogru { background: var(--oy-nane); border-color: var(--oy-nane); }
.oyun-ilerleme span.yanlis { background: var(--oy-gunes); border-color: var(--oy-gunes); }
.oyun-ilerleme span.simdi { border-color: var(--oy-coral); transform: scale(1.25); }

.oyun-geri-bildirim { min-height: 1.6em; margin: 12px 0 0; text-align: center; font-weight: 800; font-size: 1.1rem; }
.oyun-geri-bildirim.iyi { color: var(--oy-nane-koyu); }
.oyun-geri-bildirim.nazik { color: var(--oy-coral-koyu); }

/* Sonuç kartı */
.oyun-sonuc { text-align: center; padding: 18px 8px 6px; animation: oyPop .45s ease both; }
.oyun-sonuc h2 { font-size: 1.6rem; margin: 6px 0; }
.oyun-sonuc p { font-size: 1.1rem; color: var(--oy-murekkep-acik); }
.oyun-yildizlar { font-size: 2rem; letter-spacing: 4px; }
.oyun-sonuc .oyun-secenekler { justify-content: center; margin-top: 12px; }

/* Konfeti (azaltılmış harekette çizilmez) */
.oyun-konfeti { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 3px; pointer-events: none; animation: oyDus 1.4s ease-in forwards; }

@keyframes oyPop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes oySalla { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes oyDus { to { transform: translateY(420px) rotate(540deg); opacity: 0; } }
@keyframes oyParla { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 205, 58, .9); } 50% { box-shadow: 0 0 0 10px rgba(255, 205, 58, 0); } }
.salla { animation: oySalla .35s ease; }

/* Rehber metni, diğer oyunlar, masal bağlantıları */
.oyun-rehber { margin-top: 8px; }
.oyun-rehber h2 { font-size: 1.3rem; margin: 22px 0 8px; }
.oyun-rehber p, .oyun-rehber li { font-size: 1.02rem; line-height: 1.7; color: #33384A; }
.oyun-rehber ul, .oyun-rehber ol { padding-left: 1.2rem; }

.oyun-diger h2, .oyun-masal h2 { font-size: 1.3rem; margin: 26px 0 12px; }
.oyun-izgara { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.oyun-mini { display: block; background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--oy-krem-2); text-decoration: none; color: var(--oy-murekkep); }
.oyun-mini img { display: block; width: 100%; height: auto; }
.oyun-mini-ad { display: block; padding: 8px 10px 10px; font-weight: 800; font-size: .95rem; }
.oyun-mini:hover { box-shadow: var(--oy-golge); color: var(--oy-murekkep); text-decoration: none; }
.oyun-tumu { margin: 12px 0 0; font-weight: 800; }
.oyun-masal ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.oyun-masal a { display: block; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--oy-krem-2); font-weight: 700; color: var(--oy-murekkep); }
.oyun-masal a:hover { background: var(--oy-krem); text-decoration: none; }

/* Liste sayfası */
.oyun-liste { display: grid; gap: 18px; }
.oyun-liste-kart { background: #fff; border: 2px solid var(--oy-krem-2); border-radius: var(--oy-yaricap); overflow: hidden; box-shadow: var(--oy-golge); }
.oyun-liste-gorsel img { display: block; width: 100%; height: auto; }
.oyun-liste-metin { padding: 14px 16px 18px; }
.oyun-liste-metin h2 { font-size: 1.35rem; margin: 0 0 6px; }
.oyun-liste-metin h2 a { color: var(--oy-murekkep); }
.oyun-liste-metin p { font-size: 1.02rem; line-height: 1.6; color: var(--oy-murekkep-acik); margin: 0 0 10px; }
@media (min-width: 768px) {
    .oyun-liste-kart { display: grid; grid-template-columns: 46% 1fr; align-items: center; }
    .oyun-liste-gorsel img { height: 100%; object-fit: cover; }
}

/* ===== Toplama çıkarma ===== */
.mat-soru { text-align: center; margin: 6px 0 10px; }
.mat-islem { font-size: clamp(2.3rem, 11vw, 3.6rem); font-weight: 900; color: var(--oy-murekkep); letter-spacing: .02em; }
.mat-elmalar { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 40px; font-size: 1.6rem; margin-top: 6px; }
.mat-elmalar .grup { display: inline-flex; flex-wrap: wrap; max-width: 46%; justify-content: center; gap: 2px; }
.mat-elmalar .isaret { font-weight: 900; color: var(--oy-coral); font-size: 1.8rem; }
.mat-cevaplar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.mat-cevap { min-height: 72px; font-size: 1.9rem; border-radius: 20px; box-shadow: 0 6px 0 rgba(0, 0, 0, .12); }
.mat-cevap:nth-child(1) { background: #FFE0D6; }
.mat-cevap:nth-child(2) { background: #D8F5E7; }
.mat-cevap:nth-child(3) { background: #DCEEFD; }
.mat-cevap.dogru { background: var(--oy-nane); color: #fff; border-color: var(--oy-nane); }
.mat-cevap.ipucu { animation: oyParla 1s ease 2; border-color: var(--oy-gunes); }

/* ===== Hayvan sesleri ===== */
.hay-sahne { display: grid; justify-items: center; gap: 10px; }
.hay-resim { width: min(240px, 70vw, 32vh); aspect-ratio: 1; object-fit: cover; border-radius: 28px; border: 6px solid #fff; box-shadow: var(--oy-golge); background: #fff; }
.hay-ses-dugme { font-size: 1.1rem; }
.hay-dev-hoparlor { width: 150px; height: 150px; border-radius: 50%; font-size: 3.6rem; background: var(--oy-gunes); border: 6px solid #fff; box-shadow: var(--oy-golge); cursor: pointer; }
.hay-secenekler { display: grid; gap: 10px; width: 100%; margin-top: 8px; }
.hay-secenekler.isimler { grid-template-columns: 1fr; }
.hay-secenekler.resimler { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hay-secenek { min-height: 56px; font-size: 1.25rem; border-radius: 18px; }
.hay-secenek img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; display: block; }
.hay-secenekler.resimler .hay-secenek { padding: 6px; border-radius: 18px; }
.hay-secenek.dogru { background: var(--oy-nane); border-color: var(--oy-nane); color: #fff; }
.hay-ingilizce { display: none; text-align: center; background: #fff; border-radius: 16px; padding: 10px 14px; border: 1px dashed var(--oy-gok); }
.hay-ingilizce.gorunur { display: block; animation: oyPop .3s ease both; }
.hay-ingilizce b { font-size: 1.3rem; }
@media (min-width: 576px) { .hay-secenekler.isimler { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ===== Hafıza ===== */
.haf-tahta { display: grid; gap: 10px; margin: 0 auto; max-width: 520px; }
.haf-tahta.s3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 420px; }
.haf-tahta.s4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.haf-kart { position: relative; aspect-ratio: 1; perspective: 700px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 18px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.haf-kart:focus-visible { outline: 3px solid var(--oy-gok); outline-offset: 3px; }
.haf-ic { position: absolute; inset: 0; transition: transform .45s ease; transform-style: preserve-3d; }
.haf-kart.acik .haf-ic { transform: rotateY(180deg); }
.haf-yuz { position: absolute; inset: 0; border-radius: 18px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
.haf-arka {
    background: radial-gradient(circle at 30% 25%, #FFB36B 0, var(--oy-coral) 60%); border: 3px solid #fff;
    box-shadow: 0 5px 0 var(--oy-coral-koyu); color: #fff; font-size: 1.8rem; font-weight: 900;
}
.haf-on { background: #fff; transform: rotateY(180deg); border: 3px solid var(--oy-krem-2); }
.haf-on img { width: 74%; height: 74%; object-fit: contain; }
.haf-kart.eslesti .haf-on { border-color: var(--oy-nane); box-shadow: 0 0 0 3px rgba(79, 209, 155, .35); }
.haf-etiket { position: absolute; bottom: 4px; left: 4px; right: 4px; font-size: .8rem; font-weight: 800; color: var(--oy-nane-koyu); text-align: center; }
.haf-bilgi { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-weight: 800; margin-top: 12px; }
.haf-bilgi span { background: #fff; border-radius: 999px; padding: 6px 14px; border: 1px solid var(--oy-krem-2); }
.oyun-lisans { font-size: .85rem; color: var(--oy-murekkep-acik); margin: 10px 0 0; text-align: center; }

/* ===== Boyama ===== */
.boy-resimler { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.boy-resimler .oyun-dugme { flex: 0 0 auto; }
.boy-tuval { background: #fff; border-radius: 18px; border: 2px solid var(--oy-krem-2); margin: 10px auto; max-width: 520px; touch-action: manipulation; }
.boy-tuval svg { display: block; width: 100%; height: auto; }
.boy-tuval .b { cursor: pointer; transition: fill .12s ease; }
.boy-palet { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; max-width: 520px; margin: 0 auto; }
.boy-renk { aspect-ratio: 1; min-height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); cursor: pointer; padding: 0; }
.boy-renk.secili { box-shadow: 0 0 0 3px var(--oy-murekkep); transform: scale(1.08); }
.boy-renk:focus-visible { outline: 3px solid var(--oy-gok); outline-offset: 2px; }
.boy-araclar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
@media print {
    body.boyama-sayfasi * { visibility: hidden !important; }
    body.boyama-sayfasi .boy-tuval, body.boyama-sayfasi .boy-tuval * { visibility: visible !important; }
    .boy-tuval { position: absolute; left: 0; top: 0; width: 100%; max-width: none; border: 0; margin: 0; }
}

/* ===== Ksilofon ===== */
.ksi-govde { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 10px; background: linear-gradient(180deg, #8D5A2B, #6B421E); border-radius: 22px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .2); margin: 8px 0; }
.ksi-cubuk {
    flex: 1 1 0; min-width: 0; border: 0; border-radius: 12px; cursor: pointer; display: flex; align-items: flex-end; justify-content: center;
    padding: 0 0 10px; color: #fff; font-weight: 900; font-size: clamp(.8rem, 3.4vw, 1.05rem); text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 4px 0 rgba(0, 0, 0, .25); position: relative;
    transition: transform .08s ease, filter .08s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ksi-cubuk::before, .ksi-cubuk::after { content: ""; position: absolute; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: rgba(255, 255, 255, .7); }
.ksi-cubuk::before { top: 10px; }
.ksi-cubuk::after { bottom: 34px; }
.ksi-cubuk.calan { transform: translateY(3px) scale(.97); filter: brightness(1.18); }
.ksi-cubuk.sirada { animation: oyParla 1s ease infinite; outline: 4px solid #fff; outline-offset: 2px; }
.ksi-cubuk:focus-visible { outline: 3px solid var(--oy-gok); outline-offset: 2px; }
@media (max-width: 420px) {
    .ksi-govde { gap: 4px; padding: 14px 6px; margin-left: -6px; margin-right: -6px; }
}
.ksi-sarkilar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.ksi-sarkilar .oyun-dugme { flex: 0 0 auto; }
.ksi-notalar { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 10px; }
.ksi-notalar span { min-width: 30px; padding: 4px 6px; border-radius: 8px; background: #fff; border: 1px solid var(--oy-krem-2); font-size: .8rem; font-weight: 800; text-align: center; color: var(--oy-murekkep-acik); }
.ksi-notalar span.calindi { background: var(--oy-nane); border-color: var(--oy-nane); color: #fff; }
.ksi-notalar span.simdi { background: var(--oy-gunes); border-color: var(--oy-gunes); color: var(--oy-murekkep); }

/* ===== Labirent ===== */
.lab-tahta { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #FFFDF6; box-shadow: 0 0 0 3px #0B4F5B inset; touch-action: none; cursor: pointer; }
.lab-tahta canvas { display: block; }
.lab-tahta:focus-visible { outline: 3px solid var(--oy-gok); outline-offset: 3px; }
.lab-tavsan, .lab-havuc { position: absolute; left: 0; top: 0; pointer-events: none; object-fit: contain; }
.lab-tavsan { transition: transform .12s ease; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }
.lab-ped { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(2, 56px); gap: 8px; justify-content: center; margin-top: 14px; }
.lab-ok { width: 56px; min-height: 56px; padding: 0; font-size: 1.5rem; border-radius: 16px; }
.lab-ped .lab-ok:nth-child(1) { grid-column: 2; grid-row: 1; }
.lab-ped .lab-ok:nth-child(2) { grid-column: 1; grid-row: 2; }
.lab-ped .lab-ok:nth-child(3) { grid-column: 2; grid-row: 2; }
.lab-ped .lab-ok:nth-child(4) { grid-column: 3; grid-row: 2; }
.lab-ipucu { grid-column: 1 / 4; grid-row: 3; justify-self: center; margin-top: 4px; }

/* ===== XOX ===== */
.xox-durum { min-height: 44px; display: flex; justify-content: center; align-items: center; margin-bottom: 8px; }
.xox-sira { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1.1rem; padding: 6px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--oy-krem-2); }
.xox-sira.x { color: var(--oy-coral-koyu); border-color: #FFC9B8; }
.xox-sira.o { color: #0B6E66; border-color: #A8E3DD; }
.xox-sira img { width: 30px; height: 30px; }
.xox-tahta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: min(100%, 360px); margin: 0 auto; }
.xox-tahta.bekliyor .xox-kare { cursor: wait; }
.xox-kare { aspect-ratio: 1; border: 0; border-radius: 20px; background: #fff; box-shadow: 0 5px 0 #F3D9C4, inset 0 0 0 2px var(--oy-krem-2); cursor: pointer; padding: 6%; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.xox-kare:disabled { cursor: default; }
.xox-kare:focus-visible { outline: 3px solid var(--oy-gok); outline-offset: 2px; }
.xox-kare.kazanan { background: #E4F9EF; box-shadow: 0 5px 0 var(--oy-nane), inset 0 0 0 3px var(--oy-nane); }
.xox-isaret { width: 100%; height: 100%; fill: none; stroke-width: 13; stroke-linecap: round; }
.xox-isaret.x { stroke: var(--oy-coral); }
.xox-isaret.o { stroke: var(--oy-turkuaz); }
.xox-isaret path, .xox-isaret circle { stroke-dasharray: 180; stroke-dashoffset: 180; animation: xoxCiz .35s ease forwards; }
.xox-isaret path + path { animation-delay: .12s; }
@keyframes xoxCiz { to { stroke-dashoffset: 0; } }
.xox-skor { text-align: center; font-weight: 800; color: var(--oy-murekkep-acik); margin: 12px 0 0; }
.xox-son { display: grid; justify-items: center; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .xox-isaret path, .xox-isaret circle { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
    .oyun-sayfa *, .oyun-sayfa *::before, .oyun-sayfa *::after { animation: none !important; transition: none !important; }
}
