/* ===================================
   THEME STYLESHEET - TechParadox
   Light/Dark theme variables and styles
   =================================== */

   :root {
    /* Dark theme (default) */
    --bg-primary: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    --bg-secondary: rgba(255, 255, 255, 0.02);
    --bg-card: rgba(74, 222, 128, 0.1);
    --bg-card-hover: rgba(74, 222, 128, 0.15);
    --bg-series: linear-gradient(135deg, rgba(74, 222, 128, 0.08), rgba(34, 211, 238, 0.08));
    --bg-cta: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(34, 211, 238, 0.1));
    --bg-stat: rgba(255, 255, 255, 0.05);
    
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --text-accent: #4ade80;
    
    --border-primary: rgba(74, 222, 128, 0.3);
    --border-secondary: rgba(255, 255, 255, 0.1);
    
    --shadow-card: 0 10px 30px rgba(74, 222, 128, 0.2);
    --shadow-series: 0 15px 40px rgba(74, 222, 128, 0.2);
    --shadow-cta: 0 4px 15px rgba(74, 222, 128, 0.4);
    
    /* Brand colors remain consistent */
    --brand-primary: #4ade80;
    --brand-secondary: #22d3ee;
    --brand-tertiary: #a855f7;
    
    /* Particle colors */
    --particle-color: #4ade80;
    --particle-opacity: 0.6;
}

/* Light theme variables */
[data-theme="light"] {
    --bg-primary: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --bg-secondary: rgba(0, 0, 0, 0.02);
    --bg-card: rgba(74, 222, 128, 0.05);
    --bg-card-hover: rgba(74, 222, 128, 0.1);
    --bg-series: linear-gradient(135deg, rgba(74, 222, 128, 0.03), rgba(34, 211, 238, 0.03));
    --bg-cta: linear-gradient(135deg, rgba(74, 222, 128, 0.08), rgba(34, 211, 238, 0.08));
    --bg-stat: rgba(0, 0, 0, 0.03);
    
    --text-primary: #1f2937;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --text-accent: #059669;
    
    --border-primary: rgba(74, 222, 128, 0.4);
    --border-secondary: rgba(0, 0, 0, 0.1);
    
    --shadow-card: 0 10px 30px rgba(74, 222, 128, 0.15);
    --shadow-series: 0 15px 40px rgba(74, 222, 128, 0.15);
    --shadow-cta: 0 4px 15px rgba(74, 222, 128, 0.3);
    
    --particle-color: #059669;
    --particle-opacity: 0.4;
}

/* Apply theme variables to elements */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: 50px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-series);
    background: var(--bg-card-hover);
}

.theme-toggle:focus {
    outline: 3px solid var(--brand-primary);
    outline-offset: 4px;
}

.theme-icon {
    font-size: 1.1rem;
    color: var(--brand-primary);
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(180deg);
}

/* Theme-aware component updates */
.section-title {
    color: var(--text-accent);
}

.content-text {
    color: var(--text-secondary);
}

.feature-card {
    background: var(--bg-card);
    border-color: var(--border-primary);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-card);
}

.feature-title {
    color: var(--text-primary);
}

.feature-desc {
    color: var(--text-muted);
}

.series-section {
    background: var(--bg-secondary);
    border-color: var(--border-secondary);
}

.series-card {
    background: var(--bg-series);
}

.series-title {
    color: var(--text-primary);
}

.series-desc {
    color: var(--text-secondary);
}

.main-series:hover {
    border-color: var(--border-primary);
    box-shadow: var(--shadow-series);
}

.upgrade-series:hover {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 15px 40px rgba(34, 211, 238, 0.2);
}

.cta-section {
    background: var(--bg-cta);
    border-color: var(--border-primary);
}

.cta-text {
    color: var(--text-secondary);
}

.cta-button {
    box-shadow: var(--shadow-cta);
}

.cta-button:hover {
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.6);
}

.stat-card {
    background: var(--bg-stat);
    border-color: var(--border-secondary);
}

.stat-number {
    color: var(--brand-primary);
}

.stat-label {
    color: var(--text-muted);
}

.footer {
    border-color: var(--border-primary);
}

.social-links a {
    color: var(--brand-primary);
}

.social-links a:hover {
    color: var(--brand-secondary);
}

.copyright {
    color: var(--text-muted);
}

/* Logo theme awareness */
[data-theme="light"] .logo-glow {
    background: radial-gradient(circle, rgba(5, 150, 105, 0.2) 0%, transparent 70%);
}

[data-theme="light"] .logo-image {
    filter: drop-shadow(0 0 20px rgba(5, 150, 105, 0.4));
}

[data-theme="light"] .logo:hover .logo-image {
    filter: drop-shadow(0 0 40px rgba(5, 150, 105, 0.8));
}

[data-theme="light"] .logo:hover .logo-glow {
    background: radial-gradient(circle, rgba(5, 150, 105, 0.3) 0%, rgba(8, 145, 178, 0.15) 50%, transparent 70%);
}

/* Particle theme awareness */
.particle {
    background: var(--particle-color) !important;
    opacity: var(--particle-opacity) !important;
}

/* Light theme specific adjustments */
[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #059669, #0891b2, #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-subtitle {
    color: var(--text-muted);
}

[data-theme="light"] .cta-title {
    background: linear-gradient(135deg, #059669, #0891b2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .series-icon {
    background: linear-gradient(135deg, #059669, #0891b2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Theme transition animations */
* {
    transition: background-color 0.3s ease, 
                border-color 0.3s ease, 
                box-shadow 0.3s ease,
                color 0.3s ease;
}

/* Responsive theme toggle */
@media screen and (max-width: 768px) {
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .theme-icon {
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .theme-toggle {
        padding: 0.5rem;
        gap: 0;
    }
    
    .theme-toggle .theme-label {
        display: none;
    }
}