/* Base theme variables */
:root {
    /* Christmas Theme (Default) */
    --primary-color: #ff4747;
    --secondary-color: #4caf50;
    --accent-color: #ffd700;
    --background-color: #000000;
    --container-bg: rgba(16, 32, 40, 0.2);
    --text-color: #ff4747;
    --border-color: rgba(255, 215, 0, 0.15);
    --button-gradient: linear-gradient(45deg, #ff4747, #4caf50);
    --progress-gradient: linear-gradient(90deg, #ff4747, #ffd700);
    --error-border: rgba(255, 71, 71, 0.15);
    --particle-characters: '';
    --particle-color: rgba(255, 255, 255, 0.9);
    --animation-name: snowfall;
    --text-shadow: 0 0 10px rgba(255, 71, 71, 0.7),
                   0 0 20px rgba(255, 71, 71, 0.5);
    --glitch-shadow: #ff4747;
    --status-text: #ff4747;
    --value-text: #ffd700;
    --header-text: #ff4747;
    --log-text: #ff4747;
    --info-text: #4caf50;
    --success-text: #ffd700;
    --warning-text: #ff9800;
    --error-text: #ff8080;
    --neon-glow: 0 0 5px rgba(255, 71, 71, 0.3),
                 0 0 10px rgba(255, 71, 71, 0.2),
                 0 0 15px rgba(255, 71, 71, 0.1),
                 0 0 20px rgba(255, 215, 0, 0.05);
}

/* Winter Theme (January) - New Beginning */
[data-theme='winter'] {
    --primary-color: #e3f2fd;
    --primary-color-rgb: 227, 242, 253;
    --secondary-color: #90caf9;
    --accent-color: #ffffff;
    --accent-color-rgb: 255, 255, 255;
    --text-color: #e3f2fd;
    --background-color: #000000;
    --container-bg: rgba(0, 0, 0, 0.2);
    --border-color: rgba(227, 242, 253, 0.15);
    --button-gradient: linear-gradient(45deg, #e3f2fd, #90caf9);
    --progress-gradient: linear-gradient(90deg, #e3f2fd, #ffffff);
    --particle-characters: '❄,❅,❆,✧,✦';
    --particle-color: rgba(255, 255, 255, 0.9);
    --animation-name: newBeginning;
    --flying-object: '❄,☃,⛄,✧,✦';
    --flying-object-color: #ffffff;
    --flying-object-size: 2em;
    --status-text: #e3f2fd;
    --value-text: #ffffff;
    --header-text: #e3f2fd;
    --log-text: #e3f2fd;
    --info-text: #90caf9;
    --success-text: #ffffff;
    --warning-text: #ffd700;
    --error-text: #ff8080;
    --neon-glow: 0 0 5px rgba(227, 242, 253, 0.3),
                 0 0 10px rgba(227, 242, 253, 0.2),
                 0 0 15px rgba(227, 242, 253, 0.1),
                 0 0 20px rgba(255, 255, 255, 0.05);
}

/* Mobile-specific winter theme */
@media (max-width: 768px) {
    [data-theme='winter'] {
        --background-color: #1a237e;
        --container-bg: rgba(25, 35, 126, 0.2);
    }

    [data-theme='winter'] .status-box,
    [data-theme='winter'] .system-info,
    [data-theme='winter'] .error-log {
        background: linear-gradient(135deg, rgba(25, 35, 126, 0.4), rgba(25, 35, 126, 0.2));
    }

    [data-theme='winter'] .container {
        background: linear-gradient(135deg, rgba(25, 35, 126, 0.3), rgba(25, 35, 126, 0.1));
    }

    @keyframes winterContainerGlow {
        0% {
            background: linear-gradient(135deg, rgba(25, 35, 126, 0.3), rgba(25, 35, 126, 0.1));
            backdrop-filter: blur(15px);
        }
        50% {
            background: linear-gradient(135deg, rgba(25, 35, 126, 0.4), rgba(25, 35, 126, 0.2));
            backdrop-filter: blur(20px);
        }
        100% {
            background: linear-gradient(135deg, rgba(25, 35, 126, 0.3), rgba(25, 35, 126, 0.1));
            backdrop-filter: blur(15px);
        }
    }
}

/* Valentine Theme (February) */
[data-theme='valentine'] {
    --primary-color: #ff69b4;
    --primary-color-rgb: 255, 105, 180;
    --secondary-color: #ff1493;
    --accent-color: #ffffff;
    --accent-color-rgb: 255, 255, 255;
    --text-color: #ff69b4;
    --particle-characters: '♥,♡,💕,✿,💝';
    --particle-color: rgba(255, 105, 180, 0.9);
    --animation-name: float;
    --flying-object: '💘,💝,💖,💗,🌹';
    --flying-object-color: #ff69b4;
    --flying-object-size: 2.5em;
    --status-text: #ff69b4;
    --value-text: #ffffff;
    --header-text: #ff69b4;
    --log-text: #ff69b4;
    --info-text: #ff1493;
    --success-text: #ffffff;
    --warning-text: #ffd700;
    --error-text: #ff8080;
}

/* Spring Theme (March) */
[data-theme='spring'] {
    --primary-color: #98fb98;
    --primary-color-rgb: 152, 251, 152;
    --secondary-color: #90ee90;
    --accent-color: #ffffff;
    --accent-color-rgb: 255, 255, 255;
    --text-color: #98fb98;
    --particle-characters: '🌸,✿,❀,💐,🌺';
    --particle-color: rgba(152, 251, 152, 0.9);
    --animation-name: flutter;
    --flying-object: '🦋,🌸,🌺,🌼,🐝';
    --flying-object-color: #98fb98;
    --flying-object-size: 2em;
    --status-text: #98fb98;
    --value-text: #ffffff;
    --header-text: #98fb98;
    --log-text: #98fb98;
    --info-text: #90ee90;
    --success-text: #ffffff;
    --warning-text: #ffd700;
    --error-text: #ff8080;
}

/* Rain Theme (April) */
[data-theme='rain'] {
    --primary-color: #4682b4;
    --primary-color-rgb: 70, 130, 180;
    --secondary-color: #87ceeb;
    --accent-color: #ffffff;
    --accent-color-rgb: 255, 255, 255;
    --text-color: #4682b4;
    --particle-characters: '💧,☔,⚡,☁,✨';
    --particle-color: rgba(70, 130, 180, 0.9);
    --animation-name: fall;
    --flying-object: '☔,⛈️,🌧️,⚡,🌈';
    --flying-object-color: #4682b4;
    --flying-object-size: 2.5em;
    --status-text: #4682b4;
    --value-text: #ffffff;
    --header-text: #4682b4;
    --log-text: #4682b4;
    --info-text: #87ceeb;
    --success-text: #ffffff;
    --warning-text: #ffd700;
    --error-text: #ff8080;
}

/* Flower Theme (May) */
[data-theme='flower'] {
    --primary-color: #ff69b4;
    --primary-color-rgb: 255, 105, 180;
    --secondary-color: #98fb98;
    --accent-color: #ffffff;
    --accent-color-rgb: 255, 255, 255;
    --text-color: #ff69b4;
    --particle-characters: '🌸,🌺,🌹,🌷,💐';
    --particle-color: rgba(255, 105, 180, 0.9);
    --animation-name: flutter;
    --flying-object: '🌸,🌺,🌻,🌼,🌷';
    --flying-object-color: #ff69b4;
    --flying-object-size: 2em;
    --status-text: #ff69b4;
    --value-text: #ffffff;
    --header-text: #ff69b4;
    --log-text: #ff69b4;
    --info-text: #98fb98;
    --success-text: #ffffff;
    --warning-text: #ffd700;
    --error-text: #ff8080;
}

/* Summer Theme (June) */
[data-theme='summer'] {
    --primary-color: #ffd700;
    --primary-color-rgb: 255, 215, 0;
    --secondary-color: #ff8c00;
    --accent-color: #ffffff;
    --accent-color-rgb: 255, 255, 255;
    --text-color: #ffd700;
    --particle-characters: '☀,🌞,✨,🌴,🌊';
    --particle-color: rgba(255, 215, 0, 0.9);
    --animation-name: shine;
    --flying-object: '🌞,🏖️,🌴,🌺,🍹';
    --flying-object-color: #ffd700;
    --flying-object-size: 2.5em;
    --status-text: #ffd700;
    --value-text: #ffffff;
    --header-text: #ffd700;
    --log-text: #ffd700;
    --info-text: #ff8c00;
    --success-text: #ffffff;
    --warning-text: #ff8c00;
    --error-text: #ff8080;
}

/* Beach Theme (July) */
[data-theme='beach'] {
    --primary-color: #00bfff;
    --primary-color-rgb: 0, 191, 255;
    --secondary-color: #87ceeb;
    --accent-color: #ffffff;
    --accent-color-rgb: 255, 255, 255;
    --text-color: #00bfff;
    --particle-characters: '🐚,🌊,🐠,✨,🏖️';
    --particle-color: rgba(0, 191, 255, 0.9);
    --animation-name: wave;
    --flying-object: '🐟,🐠,🐋,🐢,🦀';
    --flying-object-color: #00bfff;
    --flying-object-size: 2.5em;
    --status-text: #00bfff;
    --value-text: #ffffff;
    --header-text: #00bfff;
    --log-text: #00bfff;
    --info-text: #87ceeb;
    --success-text: #ffffff;
    --warning-text: #ffd700;
    --error-text: #ff8080;
}

/* Star Theme (August) */
[data-theme='star'] {
    --primary-color: #ffd700;
    --primary-color-rgb: 255, 215, 0;
    --secondary-color: #4169e1;
    --accent-color: #ffffff;
    --accent-color-rgb: 255, 255, 255;
    --text-color: #ffd700;
    --particle-characters: '⭐,✨,💫,🌟,✦';
    --particle-color: rgba(255, 215, 0, 0.9);
    --animation-name: sparkle;
    --flying-object: '🌠,⭐,🌟,✨,🚀';
    --flying-object-color: #ffd700;
    --flying-object-size: 2em;
    --status-text: #ffd700;
    --value-text: #ffffff;
    --header-text: #ffd700;
    --log-text: #ffd700;
    --info-text: #4169e1;
    --success-text: #ffffff;
    --warning-text: #ffd700;
    --error-text: #ff8080;
}

/* Autumn Theme (September) */
[data-theme='autumn'] {
    --primary-color: #ff8c00;
    --primary-color-rgb: 255, 140, 0;
    --secondary-color: #8b4513;
    --accent-color: #ffffff;
    --accent-color-rgb: 255, 255, 255;
    --text-color: #ff8c00;
    --particle-characters: '🍁,🍂,🍃,✨,🌰';
    --particle-color: rgba(255, 140, 0, 0.9);
    --animation-name: fall;
    --flying-object: '🍁,🍂,🍃,🌰,🍄';
    --flying-object-color: #ff8c00;
    --flying-object-size: 2em;
    --status-text: #ff8c00;
    --value-text: #ffffff;
    --header-text: #ff8c00;
    --log-text: #ff8c00;
    --info-text: #8b4513;
    --success-text: #ffffff;
    --warning-text: #ffd700;
    --error-text: #ff8080;
}

/* Halloween Theme (October) */
[data-theme='halloween'] {
    --primary-color: #ff4500;
    --primary-color-rgb: 255, 69, 0;
    --secondary-color: #9932cc;
    --accent-color: #ffffff;
    --accent-color-rgb: 255, 255, 255;
    --text-color: #ff4500;
    --particle-characters: '👻,🎃,🦇,✨,🕸️';
    --particle-color: rgba(255, 69, 0, 0.9);
    --animation-name: spooky;
    --flying-object: '🎃,👻,🦇,🕷️,🧙';
    --flying-object-color: #ff4500;
    --flying-object-size: 2.5em;
    --status-text: #ff4500;
    --value-text: #ffffff;
    --header-text: #ff4500;
    --log-text: #ff4500;
    --info-text: #9932cc;
    --success-text: #ffffff;
    --warning-text: #ffd700;
    --error-text: #ff8080;
}

/* Harvest Theme (November) */
[data-theme='harvest'] {
    --primary-color: #daa520;
    --primary-color-rgb: 218, 165, 32;
    --secondary-color: #cd853f;
    --accent-color: #ffffff;
    --accent-color-rgb: 255, 255, 255;
    --text-color: #daa520;
    --particle-characters: '🍂,🦃,🌾,✨,🍁';
    --particle-color: rgba(218, 165, 32, 0.9);
    --animation-name: fall;
    --flying-object: '🦃,🍁,🌾,🎃,🥧';
    --flying-object-color: #daa520;
    --flying-object-size: 2.5em;
    --status-text: #daa520;
    --value-text: #ffffff;
    --header-text: #daa520;
    --log-text: #daa520;
    --info-text: #cd853f;
    --success-text: #ffffff;
    --warning-text: #ffd700;
    --error-text: #ff8080;
}

/* Christmas Theme (December) */
[data-theme='christmas'] {
    --primary-color: #ff4747;
    --primary-color-rgb: 255, 71, 71;
    --secondary-color: #4caf50;
    --accent-color: #ffd700;
    --accent-color-rgb: 255, 215, 0;
    --text-color: #ff4747;
    --particle-characters: '❄,✨,⭐,🎄,🎁';
    --particle-color: rgba(255, 255, 255, 0.9);
    --animation-name: snowfall;
    --flying-object: '🎅,🦌,⭐,🎄,🎁';
    --flying-object-color: #ff4747;
    --flying-object-size: 2.5em;
    --status-text: #ff4747;
    --value-text: #ffd700;
    --header-text: #ff4747;
    --log-text: #ff4747;
    --info-text: #4caf50;
    --success-text: #ffd700;
    --warning-text: #ff9800;
    --error-text: #ff8080;
}

/* Animation Keyframes */
@keyframes fall {
    0% { transform: translateY(-100%) rotate(0deg); }
    100% { transform: translateY(100vh) rotate(360deg); }
}

@keyframes sparkle {
    0% { transform: translateY(-100%) scale(1) rotate(0deg); }
    50% { transform: translateY(50vh) scale(1.2) rotate(180deg); }
    100% { transform: translateY(100vh) scale(1) rotate(360deg); }
}

@keyframes float {
    0% { transform: translateY(-100%) translateX(0) rotate(0deg); }
    50% { transform: translateY(50vh) translateX(20px) rotate(180deg); }
    100% { transform: translateY(100vh) translateX(0) rotate(360deg); }
}

@keyframes flutter {
    0% { transform: translateY(-100%) translateX(0) rotate(0deg); }
    25% { transform: translateY(25vh) translateX(10px) rotate(90deg); }
    50% { transform: translateY(50vh) translateX(-10px) rotate(180deg); }
    75% { transform: translateY(75vh) translateX(10px) rotate(270deg); }
    100% { transform: translateY(100vh) translateX(0) rotate(360deg); }
}

@keyframes shine {
    0% { transform: translateY(-100%) scale(1) rotate(0deg); opacity: 1; }
    50% { transform: translateY(50vh) scale(1.5) rotate(180deg); opacity: 0.8; }
    100% { transform: translateY(100vh) scale(1) rotate(360deg); opacity: 1; }
}

@keyframes borderPulse {
    0% {
        border-color: rgba(255, 0, 255, 0.3);
        box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
    }
    50% {
        border-color: rgba(191, 128, 255, 0.5);
        box-shadow: 0 0 20px rgba(191, 128, 255, 0.7);
    }
    100% {
        border-color: rgba(0, 255, 255, 0.3);
        box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    }
}

@keyframes textFlicker {
    0% {
        text-shadow: 
            0 0 10px var(--primary-color),
            0 0 20px var(--primary-color),
            0 0 30px var(--accent-color);
    }
    50% {
        text-shadow: 
            0 0 15px var(--primary-color),
            0 0 25px var(--primary-color),
            0 0 35px var(--accent-color);
    }
    100% {
        text-shadow: 
            0 0 10px var(--primary-color),
            0 0 20px var(--primary-color),
            0 0 30px var(--accent-color);
    }
}

@keyframes snowfall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes christmasGlow {
    0% {
        box-shadow: 0 0 15px rgba(255, 71, 71, 0.1),
                    0 0 30px rgba(76, 175, 80, 0.05);
    }
    50% {
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.15),
                    0 0 40px rgba(255, 215, 0, 0.1);
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 71, 71, 0.1),
                    0 0 30px rgba(76, 175, 80, 0.05);
    }
}

@keyframes christmasPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 71, 71, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 71, 71, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 71, 71, 0);
    }
}

@keyframes christmasTextGlow {
    0% {
        text-shadow: 0 0 10px rgba(255, 71, 71, 0.5),
                     0 0 20px rgba(76, 175, 80, 0.3);
    }
    50% {
        text-shadow: 0 0 15px rgba(76, 175, 80, 0.6),
                     0 0 30px rgba(255, 215, 0, 0.4);
    }
    100% {
        text-shadow: 0 0 10px rgba(255, 71, 71, 0.5),
                     0 0 20px rgba(76, 175, 80, 0.3);
    }
}

@keyframes christmasProgress {
    0% {
        background-position: 100% 0%;
    }
    100% {
        background-position: -100% 0%;
    }
}

@keyframes flyAcross {
    0% {
        transform: translateX(-100%) translateY(var(--fly-y)) rotate(var(--rotate-start));
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(100vw) translateY(var(--fly-y)) rotate(var(--rotate-end));
        opacity: 0;
    }
}

@keyframes bobUpDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes glitchEffect {
    0% {
        filter: none;
        transform: none;
    }
    20% {
        filter: hue-rotate(-45deg) brightness(1.2);
        transform: translate(-2px, 2px);
    }
    40% {
        filter: hue-rotate(45deg) contrast(1.5);
        transform: translate(2px, -2px);
    }
    60% {
        filter: hue-rotate(-90deg) saturate(1.5);
        transform: translate(-1px, 1px);
    }
    80% {
        filter: hue-rotate(90deg) brightness(0.9);
        transform: translate(1px, -1px);
    }
    100% {
        filter: none;
        transform: none;
    }
}

.theme-transition {
    animation: glitchEffect 0.3s ease-in-out;
}

/* New Beginning Animation */
@keyframes newBeginning {
    0% {
        transform: translateY(-10vh) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) rotate(180deg) scale(1.2);
        opacity: 0.8;
    }
    80% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(110vh) rotate(360deg) scale(0.8);
        opacity: 0;
    }
}

/* Theme-specific styles */
.container {
    background: var(--container-bg);
    border-color: var(--border-color);
}

.ascii-art {
    color: var(--primary-color);
    border-color: var(--border-color);
}

.glitch {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glitch-shadow);
}

.status-indicator {
    background: var(--primary-color);
}

.progress-fill {
    background: var(--progress-gradient);
}

.refresh-button {
    background: var(--button-gradient);
    color: var(--text-color);
}

.error-log {
    border-color: var(--error-border);
}

.particle {
    color: var(--particle-color);
    animation-name: var(--animation-name);
}

/* Christmas Theme Styles */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.particle {
    position: fixed;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    animation: snowfall 10s linear infinite;
    z-index: 1000;
    pointer-events: none;
    font-size: 1.2em;
    will-change: transform;
}

.container,
.status-box,
.system-info,
.error-log {
    position: relative;
    z-index: 1;
}

.particle:nth-child(3n) {
    animation-duration: 8s;
}

.particle:nth-child(3n + 1) {
    animation-duration: 12s;
}

.particle:nth-child(3n + 2) {
    animation-duration: 15s;
}

.status-box,
.system-info,
.error-log {
    border: 1px solid rgba(255, 71, 71, 0.15);
    box-shadow: 0 0 15px rgba(255, 71, 71, 0.1),
                0 0 30px rgba(76, 175, 80, 0.05);
    animation: christmasGlow 4s infinite alternate;
}

.header {
    border-bottom: 1px solid rgba(255, 71, 71, 0.15);
    background: linear-gradient(
        90deg,
        rgba(8, 24, 32, 0.15) 0%,
        rgba(255, 71, 71, 0.05) 50%,
        rgba(76, 175, 80, 0.05) 100%
    );
}

button {
    background: linear-gradient(45deg, #ff4747, #4caf50);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 71, 71, 0.2);
}

button:hover {
    background: linear-gradient(45deg, #4caf50, #ff4747);
    box-shadow: 0 0 20px rgba(255, 71, 71, 0.4);
    transform: translateY(-2px);
}

.status-indicator.active {
    background-color: #ff4747;
    box-shadow: 0 0 15px #ff4747;
    animation: christmasPulse 2s infinite;
}

.logs-header h2,
.diagnostic-header h2 {
    background: linear-gradient(45deg, #ff4747, #4caf50, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(255, 71, 71, 0.5),
                 0 0 20px rgba(76, 175, 80, 0.3);
    animation: christmasTextGlow 4s infinite alternate;
}

.progress-bar {
    background: linear-gradient(90deg, #ff4747, #4caf50, #ffd700);
    box-shadow: 0 0 10px rgba(255, 71, 71, 0.3);
    animation: christmasProgress 3s ease infinite;
    background-size: 200% 100%;
}

.particle {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    animation: snowfall 10s linear infinite;
}

.particle:nth-child(3n) {
    animation-duration: 8s;
}

.particle:nth-child(3n + 1) {
    animation-duration: 12s;
}

.particle:nth-child(3n + 2) {
    animation-duration: 15s;
}

.flying-objects-back,
.flying-objects-front {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    visibility: visible;
    transition: visibility 0.1s linear;
}

.flying-objects-back {
    z-index: 0;
}

.flying-objects-front {
    z-index: 1001;
}

.flying-objects-back.hidden,
.flying-objects-front.hidden {
    visibility: hidden;
    transition: visibility 0s linear;
}

.flying-object {
    position: absolute;
    opacity: var(--flying-object-opacity);
    font-size: var(--flying-object-size);
    transition: opacity 0.2s ease;
    will-change: transform;
}

/* Christmas Theme Elements - Only visible in December */
.flying-object {
    display: none;
}

/* Only show Christmas elements when both conditions are met:
   1. It's December (controlled by data-is-december attribute)
   2. The element has the flying-object class */
[data-is-december="true"] .flying-object {
    display: block;
    position: absolute;
    opacity: var(--flying-object-opacity);
    font-size: var(--flying-object-size);
    transition: opacity 0.2s ease;
    will-change: transform;
}

/* Santa's sleigh - front layer */
[data-is-december="true"] .flying-object.sleigh {
    --fly-y: 20vh;
    --rotate-start: -5deg;
    --rotate-end: 5deg;
    animation: flyAcross 20s linear infinite;
    font-size: 3em;
}
[data-is-december="true"] .flying-object.sleigh::after {
    content: '🎅';
}

/* Reindeer - back layer */
[data-is-december="true"] .flying-object.reindeer {
    --fly-y: 15vh;
    --rotate-start: 0deg;
    --rotate-end: 0deg;
    animation: flyAcross 25s linear infinite;
    font-size: 2.5em;
}
[data-is-december="true"] .flying-object.reindeer::after {
    content: '🦌';
}

/* Gifts - both layers */
[data-is-december="true"] .flying-object.gift {
    --fly-y: 40vh;
    --rotate-start: -180deg;
    --rotate-end: 180deg;
    animation: flyAcross 15s linear infinite, bobUpDown 2s ease-in-out infinite;
    font-size: 1.8em;
}
[data-is-december="true"] .flying-object.gift::after {
    content: '🎁';
}

/* Stars - back layer */
[data-is-december="true"] .flying-object.star {
    --fly-y: 30vh;
    --rotate-start: 0deg;
    --rotate-end: 360deg;
    animation: flyAcross 18s linear infinite;
    font-size: 2em;
}
[data-is-december="true"] .flying-object.star::after {
    content: '⭐';
}

/* Delay variants */
.flying-object:nth-child(2) {
    animation-delay: -5s;
}
.flying-object:nth-child(3) {
    animation-delay: -10s;
}
.flying-object:nth-child(4) {
    animation-delay: -15s;
}

/* Position variants */
.flying-object:nth-child(2) {
    --fly-y: 35vh;
}
.flying-object:nth-child(3) {
    --fly-y: 25vh;
}
.flying-object:nth-child(4) {
    --fly-y: 45vh;
}

.main-title {
    color: #ff4747;
    text-shadow: 0 0 15px rgba(255, 71, 71, 0.7),
                 0 0 30px rgba(255, 71, 71, 0.5);
    animation: christmasTextGlow 4s infinite alternate;
}

.main-title span {
    color: #ff4747;
}

/* Theme Particles Container */
.theme-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.theme-particle {
    position: absolute;
    will-change: transform;
    line-height: 1;
    user-select: none;
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--primary-color);
    filter: brightness(1.1);
}

/* Flying Objects Container */
.flying-objects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.flying-object {
    position: absolute;
    opacity: 0;
    will-change: transform;
    animation: fly 8s linear infinite;
}

@keyframes fly {
    0% {
        transform: translate(-50px, var(--fly-y));
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(calc(100vw + 50px), var(--fly-y));
        opacity: 0;
    }
}

/* Theme-specific flying objects */
.flying-object {
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--primary-color),
                 0 0 10px var(--primary-color);
    font-size: 28px;
}

.flying-object {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--primary-color),
                 0 0 16px var(--primary-color);
    font-size: 20px;
    transform: rotate(-15deg);
}

.flying-object {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--secondary-color),
                 0 0 10px var(--accent-color);
    font-size: 26px;
}

/* Theme-specific Glow Effects */
[data-theme='winter'] .status-box,
[data-theme='winter'] .system-info,
[data-theme='winter'] .error-log {
    box-shadow: 0 0 15px rgba(168, 216, 255, 0.1),
                0 0 30px rgba(41, 128, 185, 0.05);
    animation: winterGlow 4s infinite alternate;
}

[data-theme='valentine'] .status-box,
[data-theme='valentine'] .system-info,
[data-theme='valentine'] .error-log {
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.1),
                0 0 30px rgba(255, 20, 147, 0.05);
    animation: valentineGlow 4s infinite alternate;
}

[data-theme='spring'] .status-box,
[data-theme='spring'] .system-info,
[data-theme='spring'] .error-log {
    box-shadow: 0 0 15px rgba(152, 251, 152, 0.1),
                0 0 30px rgba(144, 238, 144, 0.05);
    animation: springGlow 4s infinite alternate;
}

[data-theme='rain'] .status-box,
[data-theme='rain'] .system-info,
[data-theme='rain'] .error-log {
    box-shadow: 0 0 15px rgba(70, 130, 180, 0.1),
                0 0 30px rgba(135, 206, 235, 0.05);
    animation: rainGlow 4s infinite alternate;
}

[data-theme='flower'] .status-box,
[data-theme='flower'] .system-info,
[data-theme='flower'] .error-log {
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.1),
                0 0 30px rgba(152, 251, 152, 0.05);
    animation: flowerGlow 4s infinite alternate;
}

[data-theme='summer'] .status-box,
[data-theme='summer'] .system-info,
[data-theme='summer'] .error-log {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1),
                0 0 30px rgba(255, 140, 0, 0.05);
    animation: summerGlow 4s infinite alternate;
}

[data-theme='beach'] .status-box,
[data-theme='beach'] .system-info,
[data-theme='beach'] .error-log {
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.1),
                0 0 30px rgba(135, 206, 235, 0.05);
    animation: beachGlow 4s infinite alternate;
}

[data-theme='star'] .status-box,
[data-theme='star'] .system-info,
[data-theme='star'] .error-log {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1),
                0 0 30px rgba(65, 105, 225, 0.05);
    animation: starGlow 4s infinite alternate;
}

[data-theme='autumn'] .status-box,
[data-theme='autumn'] .system-info,
[data-theme='autumn'] .error-log {
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.1),
                0 0 30px rgba(139, 69, 19, 0.05);
    animation: autumnGlow 4s infinite alternate;
}

[data-theme='halloween'] .status-box,
[data-theme='halloween'] .system-info,
[data-theme='halloween'] .error-log {
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.1),
                0 0 30px rgba(153, 50, 204, 0.05);
    animation: halloweenGlow 4s infinite alternate;
}

[data-theme='harvest'] .status-box,
[data-theme='harvest'] .system-info,
[data-theme='harvest'] .error-log {
    box-shadow: 0 0 15px rgba(218, 165, 32, 0.1),
                0 0 30px rgba(205, 133, 63, 0.05);
    animation: harvestGlow 4s infinite alternate;
}

/* Theme-specific Glow Animations */
@keyframes winterGlow {
    0% { box-shadow: 0 0 15px rgba(168, 216, 255, 0.1), 0 0 30px rgba(41, 128, 185, 0.05); }
    100% { box-shadow: 0 0 20px rgba(41, 128, 185, 0.15), 0 0 40px rgba(255, 255, 255, 0.1); }
}

@keyframes valentineGlow {
    0% { box-shadow: 0 0 15px rgba(255, 105, 180, 0.1), 0 0 30px rgba(255, 20, 147, 0.05); }
    100% { box-shadow: 0 0 20px rgba(255, 20, 147, 0.15), 0 0 40px rgba(255, 255, 255, 0.1); }
}

@keyframes springGlow {
    0% { box-shadow: 0 0 15px rgba(152, 251, 152, 0.1), 0 0 30px rgba(144, 238, 144, 0.05); }
    100% { box-shadow: 0 0 20px rgba(144, 238, 144, 0.15), 0 0 40px rgba(255, 255, 255, 0.1); }
}

@keyframes rainGlow {
    0% { box-shadow: 0 0 15px rgba(70, 130, 180, 0.1), 0 0 30px rgba(135, 206, 235, 0.05); }
    100% { box-shadow: 0 0 20px rgba(135, 206, 235, 0.15), 0 0 40px rgba(255, 255, 255, 0.1); }
}

@keyframes flowerGlow {
    0% { box-shadow: 0 0 15px rgba(255, 105, 180, 0.1), 0 0 30px rgba(152, 251, 152, 0.05); }
    100% { box-shadow: 0 0 20px rgba(152, 251, 152, 0.15), 0 0 40px rgba(255, 255, 255, 0.1); }
}

@keyframes summerGlow {
    0% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.1), 0 0 30px rgba(255, 140, 0, 0.05); }
    100% { box-shadow: 0 0 20px rgba(255, 140, 0, 0.15), 0 0 40px rgba(255, 255, 255, 0.1); }
}

@keyframes beachGlow {
    0% { box-shadow: 0 0 15px rgba(0, 191, 255, 0.1), 0 0 30px rgba(135, 206, 235, 0.05); }
    100% { box-shadow: 0 0 20px rgba(135, 206, 235, 0.15), 0 0 40px rgba(255, 255, 255, 0.1); }
}

@keyframes starGlow {
    0% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.1), 0 0 30px rgba(65, 105, 225, 0.05); }
    100% { box-shadow: 0 0 20px rgba(65, 105, 225, 0.15), 0 0 40px rgba(255, 255, 255, 0.1); }
}

@keyframes autumnGlow {
    0% { box-shadow: 0 0 15px rgba(255, 140, 0, 0.1), 0 0 30px rgba(139, 69, 19, 0.05); }
    100% { box-shadow: 0 0 20px rgba(139, 69, 19, 0.15), 0 0 40px rgba(255, 255, 255, 0.1); }
}

@keyframes halloweenGlow {
    0% { box-shadow: 0 0 15px rgba(255, 69, 0, 0.1), 0 0 30px rgba(153, 50, 204, 0.05); }
    100% { box-shadow: 0 0 20px rgba(153, 50, 204, 0.15), 0 0 40px rgba(255, 69, 0, 0.1); }
}

@keyframes harvestGlow {
    0% { box-shadow: 0 0 15px rgba(218, 165, 32, 0.1), 0 0 30px rgba(205, 133, 63, 0.05); }
    100% { box-shadow: 0 0 20px rgba(205, 133, 63, 0.15), 0 0 40px rgba(255, 255, 255, 0.1); }
}

/* Theme-specific Text Glow Effects */
[data-theme='winter'] .glitch {
    text-shadow: 0 0 10px rgba(168, 216, 255, 0.5), 0 0 20px rgba(41, 128, 185, 0.3);
}

[data-theme='valentine'] .glitch {
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.5), 0 0 20px rgba(255, 20, 147, 0.3);
}

[data-theme='spring'] .glitch {
    text-shadow: 0 0 10px rgba(152, 251, 152, 0.5), 0 0 20px rgba(144, 238, 144, 0.3);
}

[data-theme='rain'] .glitch {
    text-shadow: 0 0 10px rgba(70, 130, 180, 0.5), 0 0 20px rgba(135, 206, 235, 0.3);
}

[data-theme='flower'] .glitch {
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.5), 0 0 20px rgba(152, 251, 152, 0.3);
}

[data-theme='summer'] .glitch {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 140, 0, 0.3);
}

[data-theme='beach'] .glitch {
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.5), 0 0 20px rgba(135, 206, 235, 0.3);
}

[data-theme='star'] .glitch {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 0 0 20px rgba(65, 105, 225, 0.3);
}

[data-theme='autumn'] .glitch {
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5), 0 0 20px rgba(139, 69, 19, 0.3);
}

[data-theme='halloween'] .glitch {
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.5), 0 0 20px rgba(153, 50, 204, 0.3);
}

[data-theme='harvest'] .glitch {
    text-shadow: 0 0 10px rgba(218, 165, 32, 0.5), 0 0 20px rgba(205, 133, 63, 0.3);
}

/* Theme Transition Effects */
.theme-transition {
    transition: all 0.3s ease-in-out;
}

.theme-transition .flying-object,
.theme-transition .theme-particle {
    transition: color 0.3s ease-in-out, text-shadow 0.3s ease-in-out;
}

/* Container and UI Element Styles */
.container {
    background: var(--container-bg);
    border-color: var(--border-color);
    transition: background 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

.status-box,
.system-info,
.error-log {
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.header {
    color: var(--header-text);
    border-bottom: 1px solid var(--border-color);
    transition: color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

.status-text {
    color: var(--status-text);
    transition: color 0.3s ease-in-out;
}

.value-text {
    color: var(--value-text);
    transition: color 0.3s ease-in-out;
}

.info-text {
    color: var(--info-text);
    transition: color 0.3s ease-in-out;
}

.success-text {
    color: var(--success-text);
    transition: color 0.3s ease-in-out;
}

.warning-text {
    color: var(--warning-text);
    transition: color 0.3s ease-in-out;
}

.error-text {
    color: var(--error-text);
    transition: color 0.3s ease-in-out;
}

/* System Status Box Layout Adjustments */
.status-box.glitch-box {
    min-height: fit-content;
    height: auto;
    padding: 20px;
    margin: 15px 0;
}

.system-status {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.status-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.metric-box {
    padding: 15px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.metric-chart {
    height: 40px;
    margin-top: auto;
}

.system-alerts {
    margin-top: 20px;
    padding: 10px;
    max-height: 150px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.alert-item {
    margin: 8px 0;
    padding: 10px;
}

/* Info label and value spacing */
.info-label {
    min-width: 120px;
    display: inline-block;
    opacity: 0.8;
}

.info-value {
    font-weight: 500;
    margin-left: 10px;
}

/* Ensure content doesn't overflow */
.status-message {
    word-break: break-word;
    margin: 10px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .status-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .metric-box {
        min-height: 80px;
    }

    .info-label {
        min-width: 100px;
    }
}

/* Theme-specific colors */
[data-theme='winter'] .metric-chart::before {
    --chart-color: #e3f2fd;
    --chart-color-bright: #ffffff;
}

/* Status Colors */
.status-ok .metric-chart::before {
    --chart-color: rgba(0, 255, 0, 0.3);
    --chart-color-bright: rgba(0, 255, 0, 0.5);
}

.status-error .metric-chart::before {
    --chart-color: rgba(255, 0, 0, 0.3);
    --chart-color-bright: rgba(255, 0, 0, 0.5);
}

.status-warning .metric-chart::before {
    --chart-color: rgba(255, 255, 0, 0.3);
    --chart-color-bright: rgba(255, 255, 0, 0.5);
}

.status-maintenance .metric-chart::before {
    --chart-color: rgba(255, 165, 0, 0.3);
    --chart-color-bright: rgba(255, 165, 0, 0.5);
}

/* Animated outline for system information box */
.status-box.glitch-box {
    position: relative;
    overflow: hidden;
}

.status-box.glitch-box::before,
.status-box.glitch-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    border: 2px solid transparent;
    pointer-events: none;
    animation: outlineTravel 4s linear infinite;
}

.status-box.glitch-box::before {
    border-image: linear-gradient(90deg, transparent 50%, #00f4ff 50%) 1;
    animation-delay: -2s;
}

.status-box.glitch-box::after {
    border-image: linear-gradient(90deg, transparent 50%, #ff0033 50%) 1;
    animation-delay: 0s;
}

@keyframes outlineTravel {
    0% {
        clip-path: polygon(0 0, 100% 0, 100% 2px, 0 2px);
        opacity: 1;
    }
    25% {
        clip-path: polygon(100% 0, 100% 100%, calc(100% - 2px) 100%, calc(100% - 2px) 0);
        opacity: 0.75;
    }
    50% {
        clip-path: polygon(100% 100%, 0 100%, 0 calc(100% - 2px), 100% calc(100% - 2px));
        opacity: 1;
    }
    75% {
        clip-path: polygon(0 100%, 0 0, 2px 0, 2px 100%);
        opacity: 0.75;
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 2px, 0 2px);
        opacity: 1;
    }
}

/* Add glow effect to the outlines */
.status-box.glitch-box {
    box-shadow: 0 0 10px rgba(0, 244, 255, 0.2),
                0 0 20px rgba(255, 0, 51, 0.2);
}

/* Enhanced status box hover effect */
.status-box.glitch-box:hover::before {
    animation: outlineTravel 2s linear infinite;
    border-image: linear-gradient(90deg, transparent 50%, #00f4ff 80%) 1;
}

.status-box.glitch-box:hover::after {
    animation: outlineTravel 2s linear infinite reverse;
    border-image: linear-gradient(90deg, transparent 50%, #ff0033 80%) 1;
}

/* Make metric boxes inherit the animated outline */
.metric-box {
    position: relative;
    overflow: hidden;
}

.metric-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-image: linear-gradient(90deg, #00f4ff 0%, #ff0033 100%) 1;
    animation: metricPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes metricPulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.8; }
    100% { opacity: 0.3; }
}

/* Status transition effect */
.glitch-effect {
    animation: statusGlitch 0.3s ease;
}

@keyframes statusGlitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(2px, 2px); }
    100% { transform: translate(0); }
}

/* System Status Grid Layout */
.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.status-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.metric-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.metric-label {
    font-size: 0.9em;
    opacity: 0.8;
}

.metric-value {
    font-size: 1.2em;
    font-weight: bold;
}

.metric-chart {
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.metric-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--chart-value, 0%);
    background: linear-gradient(90deg, 
        var(--chart-color, var(--primary-color)) 0%,
        var(--chart-color-bright, var(--accent-color)) 100%
    );
    transition: width 0.3s ease;
}

/* System Alerts */
.system-alerts {
    margin-top: 15px;
    max-height: 100px;
    overflow-y: auto;
    font-size: 0.9em;
}

.alert-item {
    padding: 8px;
    margin: 4px 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--alert-color, var(--primary-color));
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    background-color: var(--status-color, #666);
}

/* Metric Animations */
@keyframes chartPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.metric-chart.active::before {
    animation: chartPulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .status-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* Theme-specific colors */
[data-theme='winter'] .metric-chart::before {
    --chart-color: #e3f2fd;
    --chart-color-bright: #ffffff;
}

/* Status Colors */
.status-ok .metric-chart::before {
    --chart-color: rgba(0, 255, 0, 0.3);
    --chart-color-bright: rgba(0, 255, 0, 0.5);
}

.status-error .metric-chart::before {
    --chart-color: rgba(255, 0, 0, 0.3);
    --chart-color-bright: rgba(255, 0, 0, 0.5);
}

.status-warning .metric-chart::before {
    --chart-color: rgba(255, 255, 0, 0.3);
    --chart-color-bright: rgba(255, 255, 0, 0.5);
}

.status-maintenance .metric-chart::before {
    --chart-color: rgba(255, 165, 0, 0.3);
    --chart-color-bright: rgba(255, 165, 0, 0.5);
}

/* Mobile Layout Adjustments */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .left-side {
        order: 2;
    }

    .right-side {
        order: 3;
    }

    .status-container {
        display: flex;
        flex-direction: column;
    }

    .status-box:first-of-type {
        order: 1;
    }

    .status-box.glitch-box {
        order: 2;
    }

    /* Status Details Grid */
    .status-details {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 15px;
    }

    .status-item {
        background: rgba(0, 0, 0, 0.2);
        padding: 10px;
        border-radius: 4px;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .status-label {
        font-size: 0.9em;
        opacity: 0.8;
    }

    .status-value {
        font-size: 1.2em;
        font-weight: bold;
    }

    /* Mini Graph */
    .mini-graph {
        height: 40px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
        overflow: hidden;
        margin-top: 15px;
    }

    .mini-graph-fill {
        height: 100%;
        width: var(--graph-value, 50%);
        background: linear-gradient(90deg, 
            var(--primary-color) 0%,
            var(--accent-color) 100%
        );
        transition: width 0.3s ease;
    }

    /* System Message */
    .message-content {
        margin-bottom: 15px;
        padding: 10px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }

    .message-progress {
        height: 4px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 2px;
        margin-top: 15px;
        overflow: hidden;
        position: relative;
    }

    .message-progress::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 30%;
        background: var(--primary-color);
        animation: progressMove 2s linear infinite;
    }

    @keyframes progressMove {
        0% { transform: translateX(-100%); }
        100% { transform: translateX(400%); }
    }

    /* Status Grid and Metrics Grid */
    .status-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .metric-box {
        min-height: 80px;
    }

    .info-label {
        min-width: 100px;
    }

    /* System Alerts */
    .system-alerts {
        max-height: 120px;
    }
}

/* Performance optimizations for low-end devices */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    :root, [data-theme] {
        --neon-glow: none;
        --text-shadow: none;
        backdrop-filter: none;
    }

    .container, .status-box, .system-info, .error-log {
        backdrop-filter: none !important;
        box-shadow: none !important;
    }

    @keyframes winterContainerGlow {
        0%, 50%, 100% {
            background: rgba(25, 35, 126, 0.2);
            backdrop-filter: none;
        }
    }
}

/* Low-end device optimizations */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    [data-theme] {
        --particle-characters: '';
        --flying-object: '';
    }

    .flying-object, .particle {
        display: none !important;
    }

    .container, .status-box, .system-info, .error-log {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Base flying object styles for winter theme */
[data-theme='winter'] .flying-object {
    display: block;
    position: absolute;
    opacity: var(--flying-object-opacity);
    font-size: var(--flying-object-size);
    transition: opacity 0.2s ease;
    will-change: transform;
}

/* Snowman - front layer */
[data-theme='winter'] .flying-object.snowman {
    --fly-y: 20vh;
    --rotate-start: -5deg;
    --rotate-end: 5deg;
    animation: flyAcross 20s linear infinite;
    font-size: 3em;
}
[data-theme='winter'] .flying-object.snowman::after {
    content: '❄';
}

/* Snowflake - front layer */
[data-theme='winter'] .flying-object.snowflake {
    --fly-y: 15vh;
    --rotate-start: -180deg;
    --rotate-end: 180deg;
    animation: flyAcross 25s linear infinite;
    font-size: 2.5em;
}
[data-theme='winter'] .flying-object.snowflake::after {
    content: '⛄';
}

/* Second snowflake should show a different character */
[data-theme='winter'] .flying-objects-front .flying-object.snowflake:nth-child(4)::after {
    content: '';
}

/* Crystal - both layers */
[data-theme='winter'] .flying-object.crystal {
    --fly-y: 40vh;
    --rotate-start: -360deg;
    --rotate-end: 360deg;
    animation: flyAcross 15s linear infinite, bobUpDown 2s ease-in-out infinite;
    font-size: 1.8em;
}
[data-theme='winter'] .flying-object.crystal::after {
    content: '❆';
}

/* Winter Stars - back layer */
[data-theme='winter'] .flying-object.winter-star {
    --fly-y: 30vh;
    --rotate-start: 0deg;
    --rotate-end: 360deg;
    animation: flyAcross 18s linear infinite;
    font-size: 2em;
}
[data-theme='winter'] .flying-object.winter-star::after {
    content: '✧';
}

/* Delay variants for winter objects */
[data-theme='winter'] .flying-object:nth-child(2) {
    animation-delay: -5s;
}
[data-theme='winter'] .flying-object:nth-child(3) {
    animation-delay: -10s;
}
[data-theme='winter'] .flying-object:nth-child(4) {
    animation-delay: -15s;
}

/* Winter code styling */
.log-entry.winter-code {
    color: #e3f2fd;
    text-shadow: 0 0 10px rgba(227, 242, 253, 0.7),
                 0 0 20px rgba(227, 242, 253, 0.5);
    animation: winterGlow 2s infinite alternate;
}

@keyframes winterGlow {
    0% {
        text-shadow: 0 0 10px rgba(227, 242, 253, 0.7),
                    0 0 20px rgba(227, 242, 253, 0.5);
    }
    100% {
        text-shadow: 0 0 15px rgba(227, 242, 253, 0.8),
                    0 0 30px rgba(227, 242, 253, 0.6),
                    0 0 45px rgba(227, 242, 253, 0.4);
    }
}

/* System Status Styles */
.system-status {
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.status-message {
    margin-top: 10px;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9em;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
}

/* Status Colors */
.status-ok {
    border-color: rgba(0, 255, 0, 0.3);
}

.status-maintenance {
    border-color: rgba(255, 165, 0, 0.3);
}

.status-warning {
    border-color: rgba(255, 255, 0, 0.3);
}

.status-error {
    border-color: rgba(255, 0, 0, 0.3);
}

.status-critical {
    border-color: rgba(255, 0, 0, 0.5);
    animation: criticalPulse 2s infinite;
}

@keyframes criticalPulse {
    0% { border-color: rgba(255, 0, 0, 0.5); }
    50% { border-color: rgba(255, 0, 0, 0.8); }
    100% { border-color: rgba(255, 0, 0, 0.5); }
}

/* Status transition effect */
.glitch-effect {
    animation: statusGlitch 0.3s ease;
}

@keyframes statusGlitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(2px, 2px); }
    100% { transform: translate(0); }
}

/* System Status Grid Layout */
.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.status-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.metric-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.metric-label {
    font-size: 0.9em;
    opacity: 0.8;
}

.metric-value {
    font-size: 1.2em;
    font-weight: bold;
}

.metric-chart {
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.metric-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--chart-value, 0%);
    background: linear-gradient(90deg, 
        var(--chart-color, var(--primary-color)) 0%,
        var(--chart-color-bright, var(--accent-color)) 100%
    );
    transition: width 0.3s ease;
}

/* System Alerts */
.system-alerts {
    margin-top: 15px;
    max-height: 100px;
    overflow-y: auto;
    font-size: 0.9em;
}

.alert-item {
    padding: 8px;
    margin: 4px 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--alert-color, var(--primary-color));
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    background-color: var(--status-color, #666);
}

/* Metric Animations */
@keyframes chartPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.metric-chart.active::before {
    animation: chartPulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .status-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* Theme-specific colors */
[data-theme='winter'] .metric-chart::before {
    --chart-color: #e3f2fd;
    --chart-color-bright: #ffffff;
}

/* Status Colors */
.status-ok .metric-chart::before {
    --chart-color: rgba(0, 255, 0, 0.3);
    --chart-color-bright: rgba(0, 255, 0, 0.5);
}

.status-error .metric-chart::before {
    --chart-color: rgba(255, 0, 0, 0.3);
    --chart-color-bright: rgba(255, 0, 0, 0.5);
}

.status-warning .metric-chart::before {
    --chart-color: rgba(255, 255, 0, 0.3);
    --chart-color-bright: rgba(255, 255, 0, 0.5);
}

.status-maintenance .metric-chart::before {
    --chart-color: rgba(255, 165, 0, 0.3);
    --chart-color-bright: rgba(255, 165, 0, 0.5);
}

/* Mobile Layout Adjustments */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .left-side {
        order: 2;
    }

    .right-side {
        order: 3;
    }

    .status-container {
        display: flex;
        flex-direction: column;
    }

    .status-box:first-of-type {
        order: 1;
    }

    .status-box.glitch-box {
        order: 2;
    }

    /* Status Details Grid */
    .status-details {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 15px;
    }

    .status-item {
        background: rgba(0, 0, 0, 0.2);
        padding: 10px;
        border-radius: 4px;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .status-label {
        font-size: 0.9em;
        opacity: 0.8;
    }

    .status-value {
        font-size: 1.2em;
        font-weight: bold;
    }

    /* Mini Graph */
    .mini-graph {
        height: 40px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
        overflow: hidden;
        margin-top: 15px;
    }

    .mini-graph-fill {
        height: 100%;
        width: var(--graph-value, 50%);
        background: linear-gradient(90deg, 
            var(--primary-color) 0%,
            var(--accent-color) 100%
        );
        transition: width 0.3s ease;
    }

    /* System Message */
    .message-content {
        margin-bottom: 15px;
        padding: 10px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }

    .message-progress {
        height: 4px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 2px;
        margin-top: 15px;
        overflow: hidden;
        position: relative;
    }

    .message-progress::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 30%;
        background: var(--primary-color);
        animation: progressMove 2s linear infinite;
    }

    @keyframes progressMove {
        0% { transform: translateX(-100%); }
        100% { transform: translateX(400%); }
    }

    /* Status Grid and Metrics Grid */
    .status-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .metric-box {
        min-height: 80px;
    }

    .info-label {
        min-width: 100px;
    }

    /* System Alerts */
    .system-alerts {
        max-height: 120px;
    }
}

/* Developer Control Styles */
#toggleButton,
#toggleParticles,
#toggleObjects,
#testThemes {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 12px;
    margin: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#toggleButton:hover,
#toggleParticles:hover,
#toggleObjects:hover,
#testThemes:hover {
    background: rgba(255, 255, 255, 0.1);
}

#toggleButton.paused,
#toggleParticles.hidden,
#toggleObjects.hidden {
    background: rgba(255, 0, 0, 0.2);
}

#testThemes.active {
    background: rgba(255, 0, 0, 0.3);
    animation: pulseButton 2s infinite;
}

@keyframes pulseButton {
    0% { background: rgba(255, 0, 0, 0.3); }
    50% { background: rgba(255, 0, 0, 0.5); }
    100% { background: rgba(255, 0, 0, 0.3); }
}

/* Animation States */
.theme-particle,
.flying-object {
    animation-play-state: running;
}

.theme-particle.paused,
.flying-object.paused {
    animation-play-state: paused !important;
}

/* Developer Control Styles */
#toggleButton,
#toggleParticles,
#toggleObjects,
#testThemes {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 12px;
    margin: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#toggleButton:hover,
#toggleParticles:hover,
#toggleObjects:hover,
#testThemes:hover {
    background: rgba(255, 255, 255, 0.1);
}

#toggleButton.paused,
#toggleParticles.hidden,
#toggleObjects.hidden {
    background: rgba(255, 0, 0, 0.2);
}

#testThemes.active {
    background: rgba(255, 0, 0, 0.3);
    animation: pulseButton 2s infinite;
}

@keyframes pulseButton {
    0% { background: rgba(255, 0, 0, 0.3); }
    50% { background: rgba(255, 0, 0, 0.5); }
    100% { background: rgba(255, 0, 0, 0.3); }
}

/* Animation States */
.theme-particle,
.flying-object {
    animation-play-state: running;
}

.theme-particle.paused,
.flying-object.paused {
    animation-play-state: paused !important;
}

/* Base flying object styles for winter theme */
[data-theme='winter'] .flying-object {
    display: block;
    position: absolute;
    opacity: var(--flying-object-opacity);
    font-size: var(--flying-object-size);
    transition: opacity 0.2s ease;
    will-change: transform;
}

/* Snowman - front layer */
[data-theme='winter'] .flying-object.snowman {
    --fly-y: 20vh;
    --rotate-start: -5deg;
    --rotate-end: 5deg;
    animation: flyAcross 20s linear infinite;
    font-size: 3em;
}
[data-theme='winter'] .flying-object.snowman::after {
    content: '❄';
}

/* Snowflake - front layer */
[data-theme='winter'] .flying-object.snowflake {
    --fly-y: 15vh;
    --rotate-start: -180deg;
    --rotate-end: 180deg;
    animation: flyAcross 25s linear infinite;
    font-size: 2.5em;
}
[data-theme='winter'] .flying-object.snowflake::after {
    content: '⛄';
}

/* Second snowflake should show a different character */
[data-theme='winter'] .flying-objects-front .flying-object.snowflake:nth-child(4)::after {
    content: '';
}

/* Crystal - both layers */
[data-theme='winter'] .flying-object.crystal {
    --fly-y: 40vh;
    --rotate-start: -360deg;
    --rotate-end: 360deg;
    animation: flyAcross 15s linear infinite, bobUpDown 2s ease-in-out infinite;
    font-size: 1.8em;
}
[data-theme='winter'] .flying-object.crystal::after {
    content: '❆';
}

/* Winter Stars - back layer */
[data-theme='winter'] .flying-object.winter-star {
    --fly-y: 30vh;
    --rotate-start: 0deg;
    --rotate-end: 360deg;
    animation: flyAcross 18s linear infinite;
    font-size: 2em;
}
[data-theme='winter'] .flying-object.winter-star::after {
    content: '✧';
}

/* Delay variants for winter objects */
[data-theme='winter'] .flying-object:nth-child(2) {
    animation-delay: -5s;
}
[data-theme='winter'] .flying-object:nth-child(3) {
    animation-delay: -10s;
}
[data-theme='winter'] .flying-object:nth-child(4) {
    animation-delay: -15s;
}

/* Winter code styling */
.log-entry.winter-code {
    color: #e3f2fd;
    text-shadow: 0 0 10px rgba(227, 242, 253, 0.7),
                 0 0 20px rgba(227, 242, 253, 0.5);
    animation: winterGlow 2s infinite alternate;
}

@keyframes winterGlow {
    0% {
        text-shadow: 0 0 10px rgba(227, 242, 253, 0.7),
                    0 0 20px rgba(227, 242, 253, 0.5);
    }
    100% {
        text-shadow: 0 0 15px rgba(227, 242, 253, 0.8),
                    0 0 30px rgba(227, 242, 253, 0.6),
                    0 0 45px rgba(227, 242, 253, 0.4);
    }
}

/* System Status Styles */
.system-status {
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.status-message {
    margin-top: 10px;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9em;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
}

/* Status Colors */
.status-ok {
    border-color: rgba(0, 255, 0, 0.3);
}

.status-maintenance {
    border-color: rgba(255, 165, 0, 0.3);
}

.status-warning {
    border-color: rgba(255, 255, 0, 0.3);
}

.status-error {
    border-color: rgba(255, 0, 0, 0.3);
}

.status-critical {
    border-color: rgba(255, 0, 0, 0.5);
    animation: criticalPulse 2s infinite;
}

@keyframes criticalPulse {
    0% { border-color: rgba(255, 0, 0, 0.5); }
    50% { border-color: rgba(255, 0, 0, 0.8); }
    100% { border-color: rgba(255, 0, 0, 0.5); }
}

/* Status transition effect */
.glitch-effect {
    animation: statusGlitch 0.3s ease;
}

@keyframes statusGlitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(2px, 2px); }
    100% { transform: translate(0); }
}

/* System Status Grid Layout */
.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.status-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.metric-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.metric-label {
    font-size: 0.9em;
    opacity: 0.8;
}

.metric-value {
    font-size: 1.2em;
    font-weight: bold;
}

.metric-chart {
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.metric-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--chart-value, 0%);
    background: linear-gradient(90deg, 
        var(--chart-color, var(--primary-color)) 0%,
        var(--chart-color-bright, var(--accent-color)) 100%
    );
    transition: width 0.3s ease;
}

/* System Alerts */
.system-alerts {
    margin-top: 15px;
    max-height: 100px;
    overflow-y: auto;
    font-size: 0.9em;
}

.alert-item {
    padding: 8px;
    margin: 4px 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--alert-color, var(--primary-color));
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    background-color: var(--status-color, #666);
}

/* Metric Animations */
@keyframes chartPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.metric-chart.active::before {
    animation: chartPulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .status-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* Theme-specific colors */
[data-theme='winter'] .metric-chart::before {
    --chart-color: #e3f2fd;
    --chart-color-bright: #ffffff;
}

/* Status Colors */
.status-ok .metric-chart::before {
    --chart-color: rgba(0, 255, 0, 0.3);
    --chart-color-bright: rgba(0, 255, 0, 0.5);
}

.status-error .metric-chart::before {
    --chart-color: rgba(255, 0, 0, 0.3);
    --chart-color-bright: rgba(255, 0, 0, 0.5);
}

.status-warning .metric-chart::before {
    --chart-color: rgba(255, 255, 0, 0.3);
    --chart-color-bright: rgba(255, 255, 0, 0.5);
}

.status-maintenance .metric-chart::before {
    --chart-color: rgba(255, 165, 0, 0.3);
    --chart-color-bright: rgba(255, 165, 0, 0.5);
}

/* Mobile Layout Adjustments */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .left-side {
        order: 2;
    }

    .right-side {
        order: 3;
    }

    .status-container {
        display: flex;
        flex-direction: column;
    }

    .status-box:first-of-type {
        order: 1;
    }

    .status-box.glitch-box {
        order: 2;
    }

    /* Status Details Grid */
    .status-details {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 15px;
    }

    .status-item {
        background: rgba(0, 0, 0, 0.2);
        padding: 10px;
        border-radius: 4px;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .status-label {
        font-size: 0.9em;
        opacity: 0.8;
    }

    .status-value {
        font-size: 1.2em;
        font-weight: bold;
    }

    /* Mini Graph */
    .mini-graph {
        height: 40px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
        overflow: hidden;
        margin-top: 15px;
    }

    .mini-graph-fill {
        height: 100%;
        width: var(--graph-value, 50%);
        background: linear-gradient(90deg, 
            var(--primary-color) 0%,
            var(--accent-color) 100%
        );
        transition: width 0.3s ease;
    }

    /* System Message */
    .message-content {
        margin-bottom: 15px;
        padding: 10px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }

    .message-progress {
        height: 4px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 2px;
        margin-top: 15px;
        overflow: hidden;
        position: relative;
    }

    .message-progress::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 30%;
        background: var(--primary-color);
        animation: progressMove 2s linear infinite;
    }

    @keyframes progressMove {
        0% { transform: translateX(-100%); }
        100% { transform: translateX(400%); }
    }

    /* Status Grid and Metrics Grid */
    .status-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .metric-box {
        min-height: 80px;
    }

    .info-label {
        min-width: 100px;
    }

    /* System Alerts */
    .system-alerts {
        max-height: 120px;
    }
}

/* Developer Control Styles */
#toggleButton,
#toggleParticles,
#toggleObjects,
#testThemes {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 12px;
    margin: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#toggleButton:hover,
#toggleParticles:hover,
#toggleObjects:hover,
#testThemes:hover {
    background: rgba(255, 255, 255, 0.1);
}

#toggleButton.paused,
#toggleParticles.hidden,
#toggleObjects.hidden {
    background: rgba(255, 0, 0, 0.2);
}

#testThemes.active {
    background: rgba(255, 0, 0, 0.3);
    animation: pulseButton 2s infinite;
}

@keyframes pulseButton {
    0% { background: rgba(255, 0, 0, 0.3); }
    50% { background: rgba(255, 0, 0, 0.5); }
    100% { background: rgba(255, 0, 0, 0.3); }
}

/* Animation States */
.theme-particle,
.flying-object {
    animation-play-state: running;
}

.theme-particle.paused,
.flying-object.paused {
    animation-play-state: paused !important;
}

/* Short LCD screen optimizations */
@media (max-height: 800px) {
    .container, 
    .status-box, 
    .system-info, 
    .error-log,
    .metric-box,
    .alert-item,
    .status-message {
        border-radius: 8px;
    }

    .metric-chart,
    .mini-graph {
        border-radius: 4px;
    }

    .status-indicator {
        border-radius: 50%;
    }
}

/* Extra small screens */
@media (max-height: 600px) {
    .container, 
    .status-box, 
    .system-info, 
    .error-log,
    .metric-box,
    .alert-item,
    .status-message {
        border-radius: 6px;
    }

    .metric-chart,
    .mini-graph {
        border-radius: 3px;
    }
}
