/* ============================================================
   theme.css - فایل مشترک حالت روز/شب برای همه فرم‌ها
   ============================================================ */

/* ===== متغیرهای حالت شب (پیش‌فرض) ===== */
[data-theme="dark"] {
    --sky-blue: #4A90D9;
    --sky-blue-light: #6BB5F5;
    --sky-blue-dark: #3A7ABF;
    
    --white: #FFFFFF;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255,255,255,0.6);
    --text-muted: rgba(255,255,255,0.35);
    
    --orange: #E67E22;
    --orange-light: #F39C12;
    --orange-dark: #D35400;
    
    --pistachio: #93C5A4;
    --pistachio-light: #B5D9C4;
    --pistachio-dark: #6BAF82;
    
    --bg-primary: #0D1A2E;
    --bg-secondary: #1A2A4A;
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-card: rgba(255, 255, 255, 0.04);
    
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --glass-blur: blur(16px);
    --glass-radius: 20px;
    
    --gradient-blue: linear-gradient(135deg, #4A90D9, #6BB5F5);
    --gradient-orange: linear-gradient(135deg, #E67E22, #F39C12);
    --gradient-pistachio: linear-gradient(135deg, #93C5A4, #B5D9C4);
    
    --shadow-blue: 0 8px 32px rgba(74, 144, 217, 0.3);
    --shadow-orange: 0 8px 32px rgba(230, 126, 34, 0.3);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.2);
    
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --bg-animated-start: #0D1A2E;
    --bg-animated-mid: #1A2A4A;
    --bg-animated-end: #0D1A2E;
    --particle-color: rgba(74, 144, 217, 0.3);
    --glass-particle-color: rgba(147, 197, 164, 0.06);
}

/* ===== متغیرهای حالت روز ===== */
[data-theme="light"] {
    --sky-blue: #4A90D9;
    --sky-blue-light: #6BB5F5;
    --sky-blue-dark: #3A7ABF;
    
    --white: #FFFFFF;
    --text-primary: #1A1A2E;
    --text-secondary: rgba(0, 0, 0, 0.6);
    --text-muted: rgba(0, 0, 0, 0.35);
    
    --orange: #E67E22;
    --orange-light: #F39C12;
    --orange-dark: #D35400;
    
    --pistachio: #93C5A4;
    --pistachio-light: #B5D9C4;
    --pistachio-dark: #6BAF82;
    
    --bg-primary: #E0D8CC;
    --bg-secondary: #EDE6DA;
    --bg-glass: rgba(255, 255, 255, 0.55);
    --bg-card: rgba(255, 255, 255, 0.65);
    
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --glass-blur: blur(16px);
    --glass-radius: 20px;
    
    --gradient-blue: linear-gradient(135deg, #4A90D9, #6BB5F5);
    --gradient-orange: linear-gradient(135deg, #E67E22, #F39C12);
    --gradient-pistachio: linear-gradient(135deg, #93C5A4, #B5D9C4);
    
    --shadow-blue: 0 8px 32px rgba(74, 144, 217, 0.3);
    --shadow-orange: 0 8px 32px rgba(230, 126, 34, 0.3);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1);
    
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --bg-animated-start: #E0D8CC;
    --bg-animated-mid: #EDE6DA;
    --bg-animated-end: #E0D8CC;
    --particle-color: rgba(74, 144, 217, 0.06);
    --glass-particle-color: rgba(147, 197, 164, 0.03);
}

/* ===== دکمه تغییر حالت روز/شب (مشترک) ===== */
.theme-toggle {
    position: fixed;
    top: 75px;
    left: 20px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glass);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--sky-blue);
    box-shadow: var(--shadow-blue);
}

.theme-toggle i {
    transition: var(--transition);
}

[data-theme="dark"] .theme-toggle .fa-sun { display: block; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
[data-theme="light"] .theme-toggle .fa-sun { display: none; }
[data-theme="light"] .theme-toggle .fa-moon { display: block; }

@media (max-width: 768px) {
    .theme-toggle {
        top: 65px;
        left: 16px;
        width: 38px;
        height: 38px;
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        top: 60px;
        left: 12px;
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
}

/* ===== ذرات پس‌زمینه (مشترک) ===== */
.bg-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(74, 144, 217, 0.06);
    border-radius: 50%;
    animation: floatBg 14s ease-in-out infinite;
}

.bg-particles span:nth-child(1) { left: 8%; animation-delay: 0s; }
.bg-particles span:nth-child(2) { left: 22%; animation-delay: 2s; width: 6px; height: 6px; }
.bg-particles span:nth-child(3) { left: 38%; animation-delay: 4s; }
.bg-particles span:nth-child(4) { left: 52%; animation-delay: 1s; width: 8px; height: 8px; }
.bg-particles span:nth-child(5) { left: 68%; animation-delay: 3s; }
.bg-particles span:nth-child(6) { left: 82%; animation-delay: 5s; width: 5px; height: 5px; }
.bg-particles span:nth-child(7) { left: 15%; animation-delay: 6s; width: 7px; height: 7px; }
.bg-particles span:nth-child(8) { left: 48%; animation-delay: 2.5s; }

@keyframes floatBg {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.2; }
    50% { transform: translateY(-120px) scale(1.5); opacity: 0.5; }
}