/* ═══════════════════════════════════════════════════════════════
   Tema düğmesi: güneş doğuşu / ay yükselişi (tüm sayfalar)
   Düğme: .tema-gok, içinde svg.sun-icon ve svg.moon-icon.
   İki ikon da her zaman yerinde; görünmeyen ufkun altında bekler. Tema
   değişince biri batar, öteki aşağıdan doğar. .gecis sınıfı (theme.js /
   admin.js) pencerede şafak ya da gece ışığını bir kez oynatır.
   ═══════════════════════════════════════════════════════════════ */
.tema-gok {
    --tg-boyut: 17px;
    position: relative !important; overflow: hidden; isolation: isolate;
}
.tema-gok .sun-icon,
.tema-gok .moon-icon {
    display: block !important;
    position: absolute; left: 50%; top: 50%;
    width: var(--tg-boyut) !important; height: var(--tg-boyut) !important;
    margin: 0 !important;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    transform: translate(-50%, -50%) translateY(var(--tg-y, 0)) rotate(var(--tg-r, 0deg)) scale(var(--tg-s, 1));
    transition: transform .75s cubic-bezier(.34, 1.36, .5, 1), opacity .45s ease, color .4s ease;
    will-change: transform;
}
/* Koyu tema: ay gökte, güneş ufkun altında */
[data-theme="dark"] .tema-gok .moon-icon { --tg-y: 0px; --tg-r: 0deg; --tg-s: 1; opacity: 1; color: #a7f3d0; }
[data-theme="dark"] .tema-gok .sun-icon  { --tg-y: 30px; --tg-r: -90deg; --tg-s: .6; opacity: 0; color: #ff9a4d; }
/* Açık tema: güneş gökte, ay ufkun altında */
[data-theme="light"] .tema-gok .sun-icon  { --tg-y: 0px; --tg-r: 0deg; --tg-s: 1; opacity: 1; color: #ea580c; }
[data-theme="light"] .tema-gok .moon-icon { --tg-y: 30px; --tg-r: 40deg; --tg-s: 1; opacity: 0; color: #059669; }
/* Batan ikon daha hızlı ve yaylanmadan iner */
[data-theme="dark"] .tema-gok .sun-icon,
[data-theme="light"] .tema-gok .moon-icon { transition: transform .5s cubic-bezier(.5, 0, .75, .3), opacity .35s ease .1s; }

/* Pencere ışığı ve ufuk çizgisi: yalnız geçişte görünür */
.tema-gok::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; border-radius: inherit; pointer-events: none;
}
.tema-gok::after {
    content: ""; position: absolute; left: 18%; right: 18%; bottom: 26%; height: 1px; z-index: -1; opacity: 0; pointer-events: none;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
}
[data-theme="light"] .tema-gok.gecis::before {
    background: radial-gradient(circle at 50% 85%, rgba(255, 154, 77, .55), rgba(255, 122, 26, .18) 45%, transparent 75%);
    animation: tema-safak .95s ease-out both;
}
[data-theme="dark"] .tema-gok.gecis::before {
    background: radial-gradient(circle at 50% 85%, rgba(52, 211, 153, .45), rgba(4, 120, 87, .2) 45%, transparent 75%);
    animation: tema-safak .95s ease-out both;
}
.tema-gok.gecis::after { animation: tema-ufuk .95s ease-out both; }
[data-theme="light"] .tema-gok.gecis::after { color: #ff9a4d; }
[data-theme="dark"] .tema-gok.gecis::after { color: #6ee7b7; }
@keyframes tema-safak { 0% { opacity: 0; transform: translateY(40%); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10%); } }
@keyframes tema-ufuk { 0% { opacity: 0; transform: scaleX(.3); } 30% { opacity: .9; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1.1); } }

@media (prefers-reduced-motion: reduce) {
    .tema-gok .sun-icon, .tema-gok .moon-icon { transition: opacity .2s ease !important; }
    .tema-gok.gecis::before, .tema-gok.gecis::after { animation: none; }
}
