/* Modern UI CRT Compatibility - Blend glassmorphism with CRT effects */

/* When both modern-ui and crt-active are enabled */
body.modern-ui.crt-active {
    /* Reduce CRT flicker intensity for modern mode */
}

/* Adjust CRT overlay for glassmorphic elements */
body.modern-ui.crt-active .crt-overlay {
    opacity: 0.03; /* Reduce scanline intensity */
}

/* Ensure glassmorphic elements show through CRT effect */
body.modern-ui.crt-active .panel {
    /* Combine glow effects */
    box-shadow:
        var(--ui-shadow-md),
        0 0 20px rgba(var(--accent-color-rgb), 0.1);
}

/* Adjust text glow for CRT + modern */
body.modern-ui.crt-active {
    text-shadow: 0 0 calc(var(--glow-spread) * 0.5) currentColor;
}

/* Reduce harsh shadows with CRT enabled */
body.modern-ui.crt-active button {
    box-shadow: 0 2px 10px rgba(var(--accent-color-rgb), 0.2);
}

body.modern-ui.crt-active button:hover {
    box-shadow: 0 4px 15px rgba(var(--accent-color-rgb), 0.3);
}

/* Progress bar glow with CRT */
body.modern-ui.crt-active .progress-fill {
    box-shadow: 0 0 10px rgba(var(--accent-color-rgb), 0.3);
}

/* Chat messages with subtle CRT glow */
body.modern-ui.crt-active .chat-message {
    text-shadow: 0 0 2px currentColor;
}

/* Equipment slots with CRT glow */
body.modern-ui.crt-active .equipment-slot.rarity-common {
    box-shadow:
        var(--ui-shadow-md),
        0 0 15px rgba(var(--rarity-common-rgb), 0.15);
}

body.modern-ui.crt-active .equipment-slot.rarity-uncommon {
    box-shadow:
        var(--ui-shadow-md),
        0 0 15px rgba(var(--rarity-uncommon-rgb), 0.2);
}

body.modern-ui.crt-active .equipment-slot.rarity-rare {
    box-shadow:
        var(--ui-shadow-md),
        0 0 15px rgba(var(--rarity-rare-rgb), 0.2);
}

body.modern-ui.crt-active .equipment-slot.rarity-epic {
    box-shadow:
        var(--ui-shadow-md),
        0 0 20px rgba(var(--rarity-epic-rgb), 0.25);
}

/* Zone items with CRT glow */
body.modern-ui.crt-active .zone-item.active {
    box-shadow:
        var(--glow-accent),
        0 0 10px rgba(var(--accent-color-rgb), 0.2);
}

/* Tooltip CRT glow */
body.modern-ui.crt-active .item-tooltip {
    box-shadow:
        var(--ui-shadow-lg),
        0 0 20px rgba(var(--accent-color-rgb), 0.15);
}

/* Action cards with CRT glow when active */
body.modern-ui.crt-active .action-card.active {
    box-shadow:
        var(--glow-success),
        0 0 15px rgba(var(--success-color-rgb), 0.2);
}

/* Login form CRT glow */
body.modern-ui.crt-active .auth-form {
    box-shadow:
        var(--ui-shadow-lg),
        0 0 30px rgba(var(--accent-color-rgb), 0.1);
}

/* Input focus glow with CRT */
body.modern-ui.crt-active input:focus,
body.modern-ui.crt-active select:focus,
body.modern-ui.crt-active textarea:focus {
    box-shadow:
        0 0 0 3px rgba(var(--accent-color-rgb), 0.15),
        0 0 15px rgba(var(--accent-color-rgb), 0.2);
}

/* Reduce animation intensity for CRT mode */
body.modern-ui.crt-active .progress-fill::after {
    animation-duration: 3s; /* Slower shimmer */
}

/* Keep background effects subtle with CRT */
body.modern-ui.crt-active::after {
    opacity: 0.05;
}
