/* =========================================================
   THEMES LOADER - Tüm temaların ortak stilleri
   Bu dosya her zaman yüklenir, tema-spesifik CSS'ler dinamik
   ========================================================= */

/* Tema geçiş animasyonları */
body,
html {
    transition: background 0.5s ease, color 0.3s ease;
}

.card,
.felix-card,
.neon-frame,
.sidebar,
.site-footer,
iframe {
    transition: all 0.4s ease;
}

/* Tema değişimi sırasında smooth geçiş */
[data-theme] * {
    transition: border-color 0.3s ease, 
                box-shadow 0.3s ease, 
                background 0.3s ease,
                color 0.3s ease;
}

/* Tema seçici buton aktif durumu */
.theme-btn.active {
    border-color: var(--accent, #D4AF37) !important;
    box-shadow: 0 0 15px var(--glow, rgba(212,175,55,0.5)) !important;
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.1), 
        rgba(255,255,255,0.05)) !important;
}

/* Tema seçici container animasyonu */
.theme-selector-container {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tüm temalarda ortak - iframe güzel görünüm */
iframe {
    border-radius: 12px !important;
    overflow: hidden;
}

/* Tüm temalarda ortak - çizgiler için base */
/* NOT: Royal Gold theme kendi çizgilerini kullanır (body.royal-gold-theme::before/after) */
body:not(.royal-gold-theme)::before,
body:not(.royal-gold-theme)::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* İçerik z-index düzeni */
.content-wrapper,
.container,
.main-content,
.sidebar,
.neon-frame,
.winners-card,
nav,
header,
main,
footer {
    position: relative;
    z-index: 1;
}

/* Tema değişimi loading animasyonu */
body.theme-loading {
    pointer-events: none;
}

body.theme-loading::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fadeOut 0.5s ease;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Mobil optimizasyon - tüm temalar için */
@media (max-width: 768px) {
    /* Animasyonları devre dışı bırak */
    body::before,
    body::after {
        animation: none !important;
    }
    
    /* Tema seçici mobil düzen */
    .theme-selector-container {
        padding: 12px !important;
        margin: 12px 0 !important;
    }
    
    .theme-btn {
        padding: 10px 6px !important;
        font-size: 9px !important;
    }
    
    .theme-btn span:first-child {
        font-size: 18px !important;
    }
}

/* Performans optimizasyonu */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
