/* renkler.css — Renkler Ormanı'nın web oyunları (Adım 4, js/renkler.js) */

/* Orman oyunları yalnız krallıktan açılır: menü yeniden çizilirse kartları görünmesin */
.game-card[data-game^="renk-"] { display: none !important; }

.rk-yuzey { align-items: center; justify-content: center; overflow: hidden; }
.tur-sahne.rk-soru-sahne {
    width: 100%; flex: 1 1 auto; border-radius: 26px; padding: 16px;
    background: linear-gradient(rgba(255, 255, 255, .3), rgba(255, 255, 255, .3)), url('../assets/img/ogrenme/bg/renkler-ormani.webp') center / cover;
}
.rk-kova { display: grid; place-items: center; width: 100%; height: 100%; position: relative; }
.rk-kova img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }

/* boyama sayfası: çizgi resmi, boyanınca renkli hâli üstünde belirir */
.rk-sayfa {
    position: relative; width: min(46vh, 340px, 70vw); aspect-ratio: 1; margin: 0 auto; background: #fff;
    border-radius: 30px; box-shadow: 0 10px 0 #f3d6e6, 0 16px 30px rgba(150, 60, 110, .16); overflow: hidden;
}
.rk-sayfa img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
.rk-renkli { opacity: 0; transform: scale(.96); transition: opacity .9s ease, transform .9s cubic-bezier(.3, 1.4, .5, 1); }
.rk-sayfa.boyandi .rk-renkli { opacity: 1; transform: none; }

/* renk karıştır: kova + kova = ? */
.rk-karisim { display: flex; align-items: center; justify-content: center; gap: clamp(6px, 2vw, 18px); flex-wrap: wrap; }
.rk-karisim .rk-kova {
    width: clamp(96px, 14vw, 150px); height: clamp(96px, 14vw, 150px); background: rgba(255, 255, 255, .85);
    border-radius: 30px; padding: 10px; box-shadow: 0 8px 0 rgba(200, 160, 220, .6), 0 12px 22px rgba(90, 50, 120, .16);
}
.rk-karisim > b { font: 800 clamp(40px, 6vw, 64px)/1 'Baloo 2', 'Nunito', system-ui, sans-serif; color: #fff; text-shadow: 0 3px 8px rgba(120, 60, 140, .5); }
.rk-soru img { opacity: .45; transition: opacity .5s; }
.rk-soru i {
    position: absolute; inset: 0; display: grid; place-items: center; font: 800 clamp(44px, 6vw, 64px)/1 'Baloo 2', 'Nunito', system-ui, sans-serif;
    font-style: normal; color: #ff5c8d; text-shadow: 0 3px 0 #fff;
}
.rk-soru.cozuldu img { opacity: 1; animation: ny-otur .4s cubic-bezier(.3, 1.6, .5, 1); }
.rk-soru.cozuldu i { display: none; }

/* renk karıştır: renk şişeleri + sihirli kazan, doğru renkte kazandan bukalemun çıkar (ressam atölyesi) */
.tur-sahne.rk-soru-sahne.rk-atolye { background: linear-gradient(rgba(255, 255, 255, .2), rgba(255, 255, 255, .2)), url('../assets/img/renk/bg-ressam-atolyesi.webp') center / cover; }
.rk-sihir .rk-sise { background: rgba(255, 255, 255, .7); }
.rk-sihir .rk-kazan { width: clamp(130px, 19vw, 200px); height: clamp(130px, 19vw, 200px); background: none; box-shadow: none; overflow: visible; }
.rk-sihir .rk-kazan .rk-kazan-img { position: relative; z-index: 2; opacity: 1; }
.rk-sihir .rk-kazan i { z-index: 3; }
.rk-sihir .rk-bukalemun { position: absolute; left: 18%; top: 10%; width: 64%; height: 64%; object-fit: contain; z-index: 1; opacity: 0; transform: translateY(30%) scale(.6); transition: transform .7s cubic-bezier(.3, 1.6, .5, 1), opacity .3s; }
.rk-sihir .rk-soru.cozuldu .rk-bukalemun { opacity: 1; transform: translateY(-58%) scale(1.15); animation: none; }
.rk-sihir .rk-soru.cozuldu .rk-kazan-img { animation: ny-otur .4s cubic-bezier(.3, 1.6, .5, 1); }

/* ---------------------------------------------------------------- renk kazanı (sürüklemeli, js/renkler.js RenkKazani) */
.kz-sahne { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 8px; touch-action: none; }
.kz-noktalar { display: flex; gap: 10px; }
.kz-noktalar span { width: 18px; height: 18px; border-radius: 50%; background: rgba(145, 80, 255, .25); transition: background .3s, transform .3s; }
.kz-noktalar span.tamam { background: #9150ff; }
.kz-noktalar span.simdi { background: #fff; box-shadow: 0 0 0 3px #9150ff; transform: scale(1.2); }
.kz-orta { flex: 1 1 auto; display: flex; align-items: flex-end; justify-content: center; gap: clamp(20px, 6vw, 90px); width: 100%; min-height: 0; }
.kz-bukalemun { position: relative; width: clamp(150px, 20vw, 230px); aspect-ratio: 1; }
.kz-bukalemun > img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(60, 30, 80, .25)); }
.kz-bukalemun.oldu > img { animation: kz-zipla .7s cubic-bezier(.3, 1.6, .5, 1) 2; }
.kz-bukalemun.hayir > img { animation: kz-hayir .5s; }
.kz-istek { position: absolute; top: -18%; right: -22%; width: 46%; aspect-ratio: 1; display: grid; place-items: center;
    background: rgba(255, 255, 255, .85); border-radius: 50%; box-shadow: 0 6px 14px rgba(100, 50, 140, .22); }
.kz-istek img { width: 74%; height: 74%; object-fit: contain; }
.kz-istek.gel { animation: kz-gel .5s cubic-bezier(.3, 1.6, .5, 1); }
.kz-kazan { width: clamp(190px, 26vw, 300px); aspect-ratio: 1; }
.kz-kazan img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(60, 30, 80, .25)); }
.kz-kazan.calkala img { animation: kz-calkala .5s ease-in-out; }
.kz-raf { display: flex; justify-content: center; gap: clamp(14px, 3vw, 36px); padding: 10px 24px 6px; border-radius: 28px; background: rgba(255, 255, 255, .55); }
.kz-sise { width: clamp(92px, 10vw, 120px); height: clamp(92px, 10vw, 120px); padding: 4px; background: none; border: 0; touch-action: none; cursor: grab; position: relative; z-index: 1; transform-origin: 50% 30%; }
.kz-sise img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .2)); }
.kz-sise.tasiniyor { z-index: 50; cursor: grabbing; }
.kz-sise.donuyor { z-index: 50; transition: transform .38s cubic-bezier(.3, 1.2, .5, 1); }
.kz-sise.parla { animation: mat-parla 1.2s ease-in-out infinite; }
@keyframes kz-zipla { 0%, 100% { transform: none; } 40% { transform: translateY(-30px) scale(1.12); } }
@keyframes kz-hayir { 0%, 100% { transform: none; } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes kz-gel { from { transform: scale(0); } to { transform: none; } }
@keyframes kz-calkala { 0%, 100% { transform: none; } 30% { transform: scale(1.06, .94); } 60% { transform: scale(.97, 1.03); } }

/* ---------------------------------------------------------------- boya atölyesi (oyuncak): kova sayfaya taşınır */
.rk-boyaevi { position: relative; width: 100%; flex: 1 1 auto; border-radius: 26px;
    background: linear-gradient(rgba(255, 255, 255, .2), rgba(255, 255, 255, .2)), url('../assets/img/renk/bg-ressam-atolyesi.webp') center / cover; }
.rk-alan { position: absolute; inset: 0; overflow: hidden; border-radius: 26px; touch-action: none; }
.rk-alan button { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rk-buyuk-sayfa { position: absolute; left: 50%; top: 40%; height: 68%; aspect-ratio: 1; max-width: 70%; transform: translate(-50%, -50%);
    background: #fff; border-radius: 30px; box-shadow: 0 10px 0 #f3d6e6, 0 16px 30px rgba(150, 60, 110, .2); overflow: hidden;
    transition: left .6s cubic-bezier(.3, 1.2, .5, 1), opacity .6s; }
.rk-buyuk-sayfa.gel { left: 150%; transition: none; }
.rk-buyuk-sayfa.git { left: -60%; opacity: 0; transition: left .6s ease-in, opacity .6s; }
.rk-buyuk-sayfa img { position: absolute; inset: 5%; width: 90%; height: 90%; object-fit: contain; pointer-events: none; user-select: none; }
.rk-kat { clip-path: circle(0% at var(--x) var(--y)); -webkit-clip-path: circle(0% at var(--x) var(--y)); transition: clip-path .9s ease-out, -webkit-clip-path .9s ease-out; }
.rk-kat.yayil { clip-path: circle(150% at var(--x) var(--y)); -webkit-clip-path: circle(150% at var(--x) var(--y)); }
.rk-buyuk-sayfa.parilti { animation: rk-parilti 1.1s ease-in-out; }
@keyframes rk-parilti { 30% { transform: translate(-50%, -50%) scale(1.06) rotate(-2deg); box-shadow: 0 0 0 8px #fff, 0 0 40px 12px #ffe27a; } 60% { transform: translate(-50%, -50%) scale(1.03) rotate(2deg); } }
.rk-surkova { height: 17%; aspect-ratio: 1; transform: translate(-50%, -50%); touch-action: none;
    transition: left .35s ease, top .35s ease, transform .2s; animation: rk-kova-gel .5s backwards cubic-bezier(.3, 1.6, .5, 1); }
.rk-surkova img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 8px 8px rgba(80, 40, 60, .3)); }
.rk-surkova.tasiniyor { transition: none; transform: translate(-50%, -50%) scale(1.2) rotate(-12deg); z-index: 5; }
.rk-surkova.dok img { animation: rk-dok .6s ease-in-out; }
.rk-surkova.zipla img { animation: rk-zipla .45s ease-out; }
.rk-surkova.parla img { animation: rk-parla 1s ease-in-out infinite; }
@keyframes rk-kova-gel { from { transform: translate(-50%, 120%) scale(.6); opacity: 0; } }
@keyframes rk-dok { 40% { transform: rotate(-70deg) translate(-10%, -10%); } }
@keyframes rk-zipla { 40% { transform: translateY(-35%) scale(1.1, .92); } 70% { transform: translateY(0) scale(.95, 1.06); } }
@keyframes rk-parla { 0%, 100% { filter: drop-shadow(0 8px 8px rgba(80, 40, 60, .3)); transform: scale(1); } 50% { filter: drop-shadow(0 0 16px #ffe27a) drop-shadow(0 0 6px #fff); transform: scale(1.1); } }
