/* KULE GÖÇÜ: gökyüzündeki üç ada arasında taşınan mücevher diskler */
.kule-sahne {
  --kalin: clamp(24px, 4.6vw, 36px);
  --taban: 92px;
  position: relative;
  height: max(420px, calc(var(--taban) + (var(--n, 5) + 3.6) * var(--kalin)));
  overflow: hidden;
  isolation: isolate; /* diskler sonuç ekranının üstüne çıkmasın */
  touch-action: none;
  cursor: pointer;
  background: linear-gradient(180deg, #57b5f2 0%, #a6dcfb 48%, #ffe3c2 100%);
}
[data-tema="karanlik"] .kule-sahne { background: linear-gradient(180deg, #14123f 0%, #3b2a74 55%, #a34f87 100%); }
.gok, .adalar, .diskler { position: absolute; inset: 0; }
.gok, .diskler { pointer-events: none; }

.gunes-top { position: absolute; left: 44%; top: 30px; width: 84px; height: 84px; border-radius: 50%; background: #fff6c8; box-shadow: 0 0 60px 26px rgba(255, 243, 180, 0.75); }
[data-tema="karanlik"] .gunes-top { background: radial-gradient(circle at 35% 35%, #fff, #d9d3ff); box-shadow: 0 0 50px 14px rgba(214, 205, 255, 0.45); }
.bulut { position: absolute; width: 130px; height: 36px; border-radius: 99px; background: #fff; opacity: 0.85; animation: suzul 48s linear infinite; }
.bulut::before, .bulut::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.bulut::before { width: 56px; height: 56px; left: 22px; bottom: 8px; }
.bulut::after { width: 40px; height: 40px; right: 22px; bottom: 10px; }
[data-tema="karanlik"] .bulut { background: #8d7bd0; opacity: 0.4; }
.b1 { top: 60px; animation-delay: -8s; }
.b2 { top: 128px; animation-duration: 66s; animation-delay: -40s; scale: 0.7; }
.b3 { top: 26px; animation-duration: 80s; animation-delay: -58s; scale: 0.5; }
@keyframes suzul { from { left: -20%; } to { left: 110%; } }
.dag { position: absolute; bottom: 0; width: 70%; height: 46%; opacity: 0.5; clip-path: polygon(0 100%, 18% 46%, 30% 64%, 52% 8%, 70% 52%, 82% 36%, 100% 100%); background: linear-gradient(#8fb7e8, #cfe6f5); }
[data-tema="karanlik"] .dag { background: linear-gradient(#43307f, #7a3f86); }
.d1 { left: -8%; }
.d2 { right: -14%; height: 36%; }

.adalar { display: grid; grid-template-columns: repeat(3, 1fr); }
.ada { position: relative; border: 0; padding: 0; background: none; cursor: pointer; font: inherit; }
.ada:focus { outline: none; }
.ada:focus-visible { outline: 3px solid #fff; outline-offset: -6px; border-radius: 20px; }
.direk {
  position: absolute; left: 50%; bottom: calc(var(--taban) - 8px);
  width: 16px; height: calc((var(--n, 5) + 0.9) * var(--kalin)); margin-left: -8px;
  border-radius: 10px 10px 2px 2px;
  background: linear-gradient(90deg, #8a5a2b, #f0c27b 40%, #b57b3c 70%, #7a4b20);
}
.direk::before { content: ""; position: absolute; left: 50%; top: -11px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #ffd76b 45%, #c98a12); }
/* Yüzen ada: üstü çimen, altı kaya */
.kaya {
  position: absolute; left: 3%; right: 3%; bottom: 8px; height: calc(var(--taban) - 8px);
  clip-path: polygon(0 12%, 6% 2%, 50% 0, 94% 2%, 100% 12%, 92% 42%, 78% 52%, 66% 80%, 54% 72%, 46% 100%, 34% 74%, 20% 58%, 8% 42%);
  background: linear-gradient(180deg, #7ed957 0%, #4fae3c 22%, #8a6a55 26%, #5d4538 70%, #40302b 100%);
}
.ada.hedef .kaya { background: linear-gradient(180deg, #ffe27a 0%, #f2b632 22%, #9a6a3c 26%, #6b4527 70%, #482d1c 100%); }
.no { position: absolute; left: 50%; bottom: 34px; translate: -50% 0; color: #fff; font-weight: 700; font-size: 1.15rem; text-shadow: 0 1px 4px #000; }
.bayrak { position: absolute; left: 50%; bottom: calc(var(--taban) + (var(--n, 5) + 0.9) * var(--kalin) + 2px); width: 40px; height: 26px; margin-left: 3px; background: linear-gradient(90deg, #ff4d6d, #ff8fa3); clip-path: polygon(0 0, 100% 22%, 78% 50%, 100% 78%, 0 100%); transform-origin: left; animation: dalgalan 1.6s ease-in-out infinite alternate; }
@keyframes dalgalan { from { transform: skewY(-6deg) scaleX(1); } to { transform: skewY(7deg) scaleX(0.86); } }
.ada::before { content: ""; position: absolute; inset: 10px 4% 20px; border-radius: 24px; opacity: 0; transition: opacity 0.2s; background: radial-gradient(ellipse at 50% 80%, rgba(255, 255, 255, 0.65), transparent 70%); }
.ada.olur::before { opacity: 1; }
.ada.kutla::before { opacity: 1; animation: parla 0.9s ease-in-out infinite alternate; }
@keyframes parla { to { opacity: 0.3; } }

.disk { position: absolute; height: var(--kalin); transform: translate(-50%, 0); filter: drop-shadow(0 4px 4px rgba(30, 15, 60, 0.3)); }
.disk i {
  display: block; height: calc(100% - 2px); border-radius: 99px;
  background:
    radial-gradient(ellipse 46% 40% at 50% 4%, rgba(255, 255, 255, 0.75), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 8px, transparent 8px 20px),
    linear-gradient(180deg, var(--r1), var(--r2));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35), inset 0 -5px 8px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.disk.kalkik i { transform: translateY(-22px) scale(1.05); animation: havada 0.9s 0.18s ease-in-out infinite alternate; }
@keyframes havada { from { transform: translateY(-22px) scale(1.05); } to { transform: translateY(-28px) scale(1.05); } }
.disk.suruk { z-index: 99 !important; }
.toz { position: absolute; width: 10px; height: 10px; border-radius: 50%; z-index: 60; }

.kule-alt { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--yuzey); color: var(--soluk); }
.kule-alt b { color: var(--yazi); }
.kule-alt .buton { margin-inline-start: auto; }

.mini-kule { display: flex; gap: 4px; align-items: flex-end; height: 52px; padding: 4px; border-radius: 8px; background: linear-gradient(#57b5f2, #ffe3c2); }
[data-tema="karanlik"] .mini-kule { background: linear-gradient(#241d58, #7b4580); }
.mini-kule div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; border-bottom: 3px solid #4fae3c; }
.mini-kule div:last-child { border-color: #f2b632; }
.mini-kule i { height: 5px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { .bulut, .bayrak, .disk.kalkik i, .ada.kutla::before { animation: none; } }
