/* VALORANT Theme */
[data-theme="valorant"] {
    --font-primary: 'Segoe UI', 'Arial Black', sans-serif;

    /* Colors */
    --bg-primary: linear-gradient(135deg, #0f1419 0%, #1e2328 100%);
    --bg-secondary: rgba(24, 32, 42, 0.9);
    --bg-tertiary: rgba(45, 55, 72, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-inverse: #000000;
    --accent-primary: #ff4655;
    --accent-secondary: #00d4ff;

    /* Buttons */
    --btn-primary: linear-gradient(135deg, #ff4655 0%, #ff6b77 100%);
    --btn-secondary: rgba(45, 55, 72, 0.8);
    --btn-hover: rgba(255, 70, 85, 0.2);
    --btn-warning: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --btn-info: linear-gradient(135deg, #00d4ff 0%, #0ea5e9 100%);

    /* Borders */
    --border-primary: 2px solid rgba(255, 70, 85, 0.3);
    --border-secondary: 1px solid rgba(160, 174, 192, 0.2);
    --border-radius: 4px;
    --border-radius-large: 8px;

    /* Effects */
    --glow-effect: 0 0 20px rgba(255, 70, 85, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
    --glow-effect-hover: 0 0 30px rgba(255, 70, 85, 0.5), 0 8px 16px rgba(0, 0, 0, 0.4);
    --text-glow: 0 0 10px rgba(255, 70, 85, 0.5);
    --hover-transform: translateY(-2px) scale(1.02);

    /* Code Editor */
    --code-bg: #0d1117;
    --code-text: #f0f6fc;
    --output-bg: rgba(13, 17, 23, 0.8);
    --feedback-bg: rgba(45, 55, 72, 0.6);

    /* Status Colors */
    --success-color: #00ff88;
    --success-color-rgb: 0, 255, 136;
    --success-bg: rgba(0, 255, 136, 0.1);
    --success-text: #00ff88;
    --error-color: #ff4655;
    --error-color-rgb: 255, 70, 85;
    --error-bg: rgba(255, 70, 85, 0.1);
    --error-text: #ff4655;
    --error-hover: #ff6b77;
    --warning-color: #00d4ff;
    --warning-color-rgb: 0, 212, 255;
    --warning-hover: #0ea5e9;
    --accent-primary-rgb: 255, 70, 85;
    --progress-gradient: linear-gradient(90deg, #ff4655 0%, #00d4ff 100%);
}

/* Animal Crossing Theme */
[data-theme="animalcrossing"] {
    --font-primary: 'Comic Sans MS', 'Segoe UI', cursive;

    /* Colors */
    --bg-primary: linear-gradient(135deg, #87ceeb 0%, #98fb98 100%);
    --bg-secondary: rgba(255, 248, 220, 0.95);
    --bg-tertiary: rgba(255, 255, 255, 0.8);
    --text-primary: #2d5016;
    --text-secondary: #5a7c45;
    --text-inverse: #ffffff;
    --accent-primary: #ff6b6b;
    --accent-secondary: #4ecdc4;

    /* Buttons */
    --btn-primary: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    --btn-secondary: rgba(255, 255, 255, 0.8);
    --btn-hover: rgba(255, 107, 107, 0.2);
    --btn-warning: linear-gradient(135deg, #ffd93d 0%, #ffed4e 100%);
    --btn-info: linear-gradient(135deg, #4ecdc4 0%, #6ee7dc 100%);

    /* Borders */
    --border-primary: 2px solid rgba(255, 107, 107, 0.5);
    --border-secondary: 1px solid rgba(90, 124, 69, 0.3);
    --border-radius: 12px;
    --border-radius-large: 20px;

    /* Effects */
    --glow-effect: 0 4px 15px rgba(255, 107, 107, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1);
    --glow-effect-hover: 0 6px 20px rgba(255, 107, 107, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    --text-glow: 0 2px 4px rgba(255, 107, 107, 0.3);
    --hover-transform: translateY(-3px) scale(1.05);

    /* Code Editor */
    --code-bg: #f8f9fa;
    --code-text: #2d5016;
    --output-bg: rgba(248, 249, 250, 0.9);
    --feedback-bg: rgba(255, 255, 255, 0.7);

    /* Status Colors */
    --success-color: #51cf66;
    --success-color-rgb: 81, 207, 102;
    --success-bg: rgba(81, 207, 102, 0.1);
    --success-text: #2b8a3e;
    --error-color: #ff6b6b;
    --error-color-rgb: 255, 107, 107;
    --error-bg: rgba(255, 107, 107, 0.1);
    --error-text: #c92a2a;
    --error-hover: #ff8e8e;
    --warning-color: #4ecdc4;
    --warning-color-rgb: 78, 205, 196;
    --warning-hover: #6ee7dc;
    --accent-primary-rgb: 255, 107, 107;
    --progress-gradient: linear-gradient(90deg, #ff6b6b 0%, #4ecdc4 50%, #ffd93d 100%);
}

/* Theme Transition Effects */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* VALORANT Specific Animations */
[data-theme="valorant"] .nav-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff4655, transparent);
    animation: scan 2s infinite;
}

@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

[data-theme="valorant"] .lesson-card.current::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 70, 85, 0.1) 50%, transparent 70%);
    border-radius: var(--border-radius);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Animal Crossing Specific Animations */
[data-theme="animalcrossing"] .cta-button {
    position: relative;
    overflow: hidden;
}

[data-theme="animalcrossing"] .cta-button::before {
    content: '✨';
    position: absolute;
    top: 50%;
    left: -20px;
    transform: translateY(-50%);
    animation: sparkle 2s infinite;
    opacity: 0;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: translateY(-50%) translateX(-20px); }
    50% { opacity: 1; transform: translateY(-50%) translateX(20px); }
}

[data-theme="animalcrossing"] .lesson-card:hover {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

[data-theme="animalcrossing"] .badge-item.earned {
    animation: wiggle 2s infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

/* Background Patterns */
[data-theme="valorant"] body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255, 70, 85, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

[data-theme="animalcrossing"] body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(255, 107, 107, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(78, 205, 196, 0.2) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

/* Responsive Theme Adjustments */
@media (max-width: 768px) {
    [data-theme="valorant"] {
        --border-radius: 6px;
        --border-radius-large: 12px;
    }

    [data-theme="animalcrossing"] {
        --border-radius: 16px;
        --border-radius-large: 24px;
    }
}

/* Print Styles */
@media print {
    [data-theme] {
        --bg-primary: white;
        --bg-secondary: white;
        --bg-tertiary: #f8f9fa;
        --text-primary: black;
        --text-secondary: #666;
        --accent-primary: #333;
        --accent-secondary: #666;
    }
}