﻿/* --- CSS VARIABLES (تم پیش‌فرض: ایندکس) --- */
:root {
    --bg-color: #060913;
    --text-color: #F8FAFC;
    --primary-color: #42EAFF; /* سایان */
    --secondary-color: #FF7E42; /* نارنجی */
    --accent-glow: #4272FF; /* آبی دکمه‌ها/اسکرولبار */
    --glass-border: rgba(66, 234, 255, 0.12);
}

/* --- تم اختصاصی برای صفحات خاص (مانند لی‌اوت یا بخش‌های طلایی) --- */
[data-theme="gold"] {
    --primary-color: #E1D788; /* طلایی */
    --secondary-color: #123C76; /* سرمه‌ای */
    --accent-glow: #123C76;
    --glass-border: rgba(225, 215, 136, 0.12);
}

/* --- Base Styles --- */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    scroll-behavior: smooth;
}

/* --- Preloader Styles --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.loader-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
    animation: spin 1s cubic-bezier(0.55, 0.055, 0.675, 0.19) infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- Glassmorphism --- */
.glass-panel {
    background: rgba(10, 15, 30, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

/* --- Simple Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-glow);
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--primary-color);
    }

/* --- ADVANCED ANIMATIONS --- */

/* 1. Fluid Background Blobs Animation */
@keyframes dynamicBlobOne {
    0% {
        transform: translate(0px, 0px) scale(1) rotate(0deg);
    }

    33% {
        transform: translate(70px, -60px) scale(1.3) rotate(120deg);
    }

    66% {
        transform: translate(-50px, 40px) scale(0.8) rotate(240deg);
    }

    100% {
        transform: translate(0px, 0px) scale(1) rotate(360deg);
    }
}

@keyframes dynamicBlobTwo {
    0% {
        transform: translate(0px, 0px) scale(1.1) rotate(0deg);
    }

    50% {
        transform: translate(-80px, 50px) scale(0.8) rotate(-180deg);
    }

    100% {
        transform: translate(0px, 0px) scale(1.1) rotate(360deg);
    }
}

.animate-blob-1 {
    animation: dynamicBlobOne 20s infinite ease-in-out;
}

.animate-blob-2 {
    animation: dynamicBlobTwo 25s infinite ease-in-out;
}

/* 2. Text Glowing Effects */
@keyframes pulseGlowCool {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(66, 234, 255, 0.3)) drop-shadow(0 0 30px rgba(66, 114, 255, 0.2));
    }

    50% {
        filter: drop-shadow(0 0 30px rgba(66, 234, 255, 0.8)) drop-shadow(0 0 50px rgba(66, 114, 255, 0.5));
    }
}

@keyframes pulseGlowWarm {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(255, 126, 66, 0.3)) drop-shadow(0 0 30px rgba(255, 179, 67, 0.2));
    }

    50% {
        filter: drop-shadow(0 0 35px rgba(255, 126, 66, 0.8)) drop-shadow(0 0 55px rgba(255, 179, 67, 0.5));
    }
}

@keyframes pulseGlowGold {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(225, 215, 136, 0.3)) drop-shadow(0 0 30px rgba(18, 60, 118, 0.2));
    }

    50% {
        filter: drop-shadow(0 0 30px rgba(225, 215, 136, 0.8)) drop-shadow(0 0 50px rgba(18, 60, 118, 0.5));
    }
}

.text-glow-cool {
    background: linear-gradient(to right, #42EAFF, #4272FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseGlowCool 4s infinite ease-in-out;
}

.text-glow-warm {
    background: linear-gradient(to right, #FFB343, #FF7E42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseGlowWarm 4s infinite ease-in-out;
}

.text-glow-gold {
    background: linear-gradient(to right, #E1D788, #C2B869);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseGlowGold 4s infinite ease-in-out;
}

/* 3. Floating UI Animation */
@keyframes floatEffect {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }
}

.animate-float {
    animation: floatEffect 6s infinite ease-in-out;
}

.delay-1 {
    animation-delay: 1.5s;
}

.delay-2 {
    animation-delay: 3s;
}

.delay-3 {
    animation-delay: 4.5s;
}

/* 4. 3D Tilt Effect Utilities */
.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
}

.tilt-content {
    transform: translateZ(40px);
}

.tilt-icon {
    transform: translateZ(60px);
}

/* 5. Offcanvas Staggered Items */
.offcanvas-item {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#offcanvas-menu.menu-open .offcanvas-item {
    opacity: 1;
    transform: translateX(0);
}

    #offcanvas-menu.menu-open .offcanvas-item:nth-child(1) {
        transition-delay: 0.1s;
    }

    #offcanvas-menu.menu-open .offcanvas-item:nth-child(2) {
        transition-delay: 0.2s;
    }

    #offcanvas-menu.menu-open .offcanvas-item:nth-child(3) {
        transition-delay: 0.3s;
    }

    #offcanvas-menu.menu-open .offcanvas-item:nth-child(4) {
        transition-delay: 0.4s;
    }

    #offcanvas-menu.menu-open .offcanvas-item:nth-child(5) {
        transition-delay: 0.5s;
    }

    #offcanvas-menu.menu-open .offcanvas-item:nth-child(6) {
        transition-delay: 0.6s;
    }
