/* ==========================================================================
   🚀 OKUL KONSEPTİ ROKET KAYDIRMA BUTONU (YEŞİL & KAHVE KONSEPTİ)
   ========================================================================== */

.scroll-rocket-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    width: 68px;
    height: 68px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.rocket-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 🚀 Roket SVG Kutusu & Döndürme İvmesi */
.rocket-svg-wrapper {
    width: 58px;
    height: 58px;
    position: relative;
    z-index: 3;
    transition: transform 0.6s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    filter: drop-shadow(0 8px 16px rgba(17, 40, 16, 0.35));
}

.rocket-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* 🔥 DİNAMİK ATEŞ EFEKTİ (ROKET EGZOZU) */
.rocket-fire-container {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 40px;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* İç Beyaz/Yeşil Çirkin Sıcak Çekirdek */
.flame-core {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 22px;
    background: linear-gradient(to bottom, #ffffff 0%, #a3e635 100%);
    border-radius: 50% 50% 50% 50% / 80% 80% 20% 20%;
    animation: flamePulse 0.15s infinite alternate;
    box-shadow: 0 0 12px #a3e635;
}

/* Dış Turuncu/Kırmızı Alev Halesi */
.flame-outer {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 34px;
    background: linear-gradient(to bottom, #f59e0b 0%, #ef4444 80%, rgba(239, 68, 68, 0) 100%);
    border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
    opacity: 0.85;
    animation: flameFlicker 0.2s infinite alternate;
    filter: blur(1px);
}

/* Kıvılcım ve Parlama Halkaları */
.flame-particles {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.6) 0%, rgba(239, 68, 68, 0) 70%);
    animation: glowSpark 0.4s infinite alternate;
}

/* ==========================================================================
   🔄 DURUM 1: SAYFA EN TEPEDEYKEN (AŞAĞI YÖNLÜ ROKET)
   ========================================================================== */

.scroll-rocket-btn.is-at-top .rocket-svg-wrapper {
    transform: rotate(180deg); /* Roketi aşağı döndür */
}

/* Sayfa tepedeyken roket ateşi yumuşak bir süzülme ışığına dönüşür */
.scroll-rocket-btn.is-at-top .rocket-fire-container {
    bottom: auto;
    top: -12px;
    transform: translateX(-50%) rotate(180deg);
    opacity: 0.6;
}

.scroll-rocket-btn.is-at-top .flame-core {
    height: 14px;
    background: #a3e635;
}

/* ==========================================================================
   🚀 DURUM 2: SAYFA AŞAĞIDAYKEN (YUKARI YÖNLÜ FIRLATMA ROKETİ)
   ========================================================================== */

.scroll-rocket-btn.is-scrolled .rocket-svg-wrapper {
    transform: rotate(0deg); /* Roketi yukarı döndür */
    animation: rocketHover 2.5s ease-in-out infinite;
}

.scroll-rocket-btn.is-scrolled .rocket-fire-container {
    opacity: 1;
}

/* ==========================================================================
   ✨ HOVER & TIKLAMA HAREKETLERİ
   ========================================================================== */

.scroll-rocket-btn:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 12px 24px rgba(163, 230, 53, 0.4));
}

.scroll-rocket-btn:hover .flame-outer {
    height: 42px;
    opacity: 1;
}

.scroll-rocket-btn:active {
    transform: scale(0.92);
}

/* 🏷️ İPUCU TOOLTİP (HOVER'DA ÇIKAR) */
.rocket-tooltip {
    position: absolute;
    right: 76px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: #112810;
    color: #a3e635;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 30px;
    white-space: nowrap;
    letter-spacing: 0.5px;
    border: 1.5px solid #a3e635;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.scroll-rocket-btn:hover .rocket-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ==========================================================================
   🎬 ANIMASYON KODLARI (KEYFRAMES)
   ========================================================================== */

@keyframes rocketHover {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(1deg); }
}

@keyframes flamePulse {
    0% { height: 18px; transform: translateX(-50%) scaleX(0.9); }
    100% { height: 26px; transform: translateX(-50%) scaleX(1.1); }
}

@keyframes flameFlicker {
    0% { opacity: 0.7; transform: translateX(-50%) scale(0.95); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

@keyframes glowSpark {
    0% { transform: translateX(-50%) scale(0.8); opacity: 0.4; }
    100% { transform: translateX(-50%) scale(1.3); opacity: 0.9; }
}

/* ==========================================================================
   📱 MOBİL UYUMLULUK
   ========================================================================== */

@media (max-width: 768px) {
    .scroll-rocket-btn {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .rocket-svg-wrapper {
        width: 48px;
        height: 48px;
    }

    /* Mobilde tooltip yerine doğrudan dokunma odaklı tutuyoruz */
    .rocket-tooltip {
        display: none;
    }
}