/* ============================================
   PROMTZA.COM - Theme System
   CSS Variables & Dynamic Theme Switching
   ============================================ */

/* Light Theme (Default) */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --card-hover-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --header-bg: rgba(255, 255, 255, 0.8);
    --overlay-bg: rgba(0, 0, 0, 0.5);
    --input-bg: #ffffff;
    --gradient-hero: linear-gradient(135deg, #eff6ff 0%, #ffffff 50%, #fefce8 100%);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #64748b;
    --border-color: #334155;
    --card-bg: #1e293b;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(51, 65, 85, 0.3);
    --header-bg: rgba(15, 23, 42, 0.8);
    --overlay-bg: rgba(0, 0, 0, 0.8);
    --input-bg: #1e293b;
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

/* Scroll-based Theme Transitions */
[data-scroll-theme="1"] body {
    transition: background-color 0.8s ease, color 0.8s ease;
}

[data-scroll-theme="1"] .site-header {
    transition: background 0.8s ease;
}

[data-scroll-theme="1"] .tool-card,
[data-scroll-theme="1"] .category-card,
[data-scroll-theme="1"] .stat-card {
    transition: background-color 0.8s ease, border-color 0.8s ease, box-shadow 0.8s ease;
}

/* Scroll Progress Theme Mix */
[data-theme="light"][data-scroll-theme="1"] .scrolled-deep {
    --bg-primary: #f1f5f9;
    --bg-secondary: #e2e8f0;
    --bg-tertiary: #cbd5e1;
}

[data-theme="dark"][data-scroll-theme="1"] .scrolled-deep {
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
}

/* ============================================
   GLASSMORPHISM EFFECTS
   ============================================ */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   GRADIENT TEXT
   ============================================ */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-warm {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   GRADIENT BACKGROUNDS
   ============================================ */
.gradient-bg-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.gradient-bg-accent {
    background: linear-gradient(135deg, var(--accent), #fbbf24);
}

.gradient-bg-hero {
    background: var(--gradient-hero);
}

.gradient-bg-cta {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
}

/* ============================================
   NEUMORPHISM (Optional)
   ============================================ */
.neuro {
    border-radius: 20px;
    background: var(--bg-primary);
    box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.05), -8px -8px 16px rgba(255, 255, 255, 0.8);
}

.neuro-inset {
    border-radius: 20px;
    background: var(--bg-primary);
    box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.05), inset -4px -4px 8px rgba(255, 255, 255, 0.8);
}

/* ============================================
   COLOR UTILITIES
   ============================================ */
.bg-primary {
    background-color: var(--primary);
}

.bg-primary-light {
    background-color: rgba(59, 130, 246, 0.1);
}

.bg-accent {
    background-color: var(--accent);
}

.bg-accent-light {
    background-color: rgba(245, 158, 11, 0.1);
}

.text-primary {
    color: var(--primary);
}

.text-accent {
    color: var(--accent);
}

.text-success {
    color: #16a34a;
}

.text-danger {
    color: #dc2626;
}

.text-warning {
    color: #d97706;
}

.text-info {
    color: #2563eb;
}

.border-primary {
    border-color: var(--primary);
}

/* ============================================
   THEME TOGGLE ANIMATION
   ============================================ */
#themeToggle i {
    transition: transform 0.5s ease;
}

#themeToggle.rotating i {
    transform: rotate(360deg);
}

/* ============================================
   HERO GLOW EFFECTS
   ============================================ */
.glow-primary {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.3), 0 0 80px rgba(59, 130, 246, 0.1);
}

.glow-accent {
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.3), 0 0 80px rgba(245, 158, 11, 0.1);
}

.glow-purple {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.3), 0 0 80px rgba(139, 92, 246, 0.1);
}

/* ============================================
   CUSTOM SCROLLBAR PER THEME
   ============================================ */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
}

/* ============================================
   SMOOTH THEME TRANSITION HELPERS
   ============================================ */
.theme-transition {
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.theme-transition-slow {
    transition: background-color 0.8s ease, color 0.8s ease, border-color 0.8s ease, box-shadow 0.8s ease;
}

/* ============================================
   SHADOW SYSTEM
   ============================================ */
.shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.shadow {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
}

.shadow-2xl {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* ============================================
   BORDER RADIUS SYSTEM
   ============================================ */
.rounded-sm {
    border-radius: 4px;
}

.rounded {
    border-radius: 8px;
}

.rounded-md {
    border-radius: 10px;
}

.rounded-lg {
    border-radius: 14px;
}

.rounded-xl {
    border-radius: 18px;
}

.rounded-2xl {
    border-radius: 24px;
}

.rounded-full {
    border-radius: 9999px;
}