@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Nosifer&family=Eater&display=swap');

:root {
    --halloween-orange: #ff6b35;
    --halloween-purple: #6a0572;
    --halloween-black: #0a0a0a;
    --halloween-green: #39ff14;
    --blood-red: #8b0000;
    --ghost-white: #f8f8ff;
    --pumpkin-orange: #ff8c00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Eater', cursive;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #0a0a0a 100%);
    color: var(--ghost-white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 107, 53, 0.3), transparent),
        radial-gradient(2px 2px at 60px 70px, rgba(106, 5, 114, 0.3), transparent),
        radial-gradient(1px 1px at 50px 50px, rgba(57, 255, 20, 0.2), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 140, 0, 0.3), transparent);
    background-size: 200px 200px;
    animation: particleFloat 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-200px);
    }
}

/* Loading Screen */
.loading-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #0a0a0a 100%);
}

.loading-content {
    text-align: center;
}

.skull-loader {
    font-size: 5rem;
    animation: skullBounce 1s ease-in-out infinite, skullGlow 2s ease-in-out infinite;
}

@keyframes skullBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

@keyframes skullGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(255, 107, 53, 1));
    }
}

.loading-text {
    font-family: 'Creepster', cursive;
    font-size: 3rem;
    margin-top: 1rem;
    color: var(--halloween-orange);
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.8);
    animation: textFlicker 3s ease-in-out infinite;
}

.loading-subtext {
    font-family: 'Eater', cursive;
    font-size: 1.2rem;
    margin-top: 0.5rem;
    color: var(--halloween-green);
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textFlicker {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes textPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Main App Container */
#app {
    position: relative;
    z-index: 1;
}

/* Error UI */
#blazor-error-ui {
    background: var(--blood-red);
    color: white;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    display: none;
    font-family: Arial, sans-serif;
}

    #blazor-error-ui .dismiss, #blazor-error-ui .reload {
        color: white;
        cursor: pointer;
        text-decoration: underline;
        margin-left: 1rem;
    }

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Glow effect */
.glow-orange {
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5),
                0 0 20px rgba(255, 107, 53, 0.3),
                0 0 30px rgba(255, 107, 53, 0.1);
}

.glow-green {
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.5),
                0 0 20px rgba(57, 255, 20, 0.3),
                0 0 30px rgba(57, 255, 20, 0.1);
}

.glow-red {
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.5),
                0 0 20px rgba(139, 0, 0, 0.3),
                0 0 30px rgba(139, 0, 0, 0.1);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--halloween-black);
}

::-webkit-scrollbar-thumb {
    background: var(--halloween-orange);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pumpkin-orange);
}

/* ================================================
   ✅ MUSIC TOGGLE BUTTON (Top Right Corner)
   ================================================ */

.music-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: rgba(255, 107, 53, 0.9);
    border: 3px solid #FFD700;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.5);
}

.music-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.8);
}

.music-toggle-btn:active {
    transform: scale(0.95);
}

.music-toggle-btn i {
    font-size: 1.8rem;
    color: white;
    transition: all 0.3s ease;
}

/* Playing state - pulse animation */
.music-toggle-btn.playing {
    animation: musicPulse 2s ease-in-out infinite;
}

.music-toggle-btn.playing i {
    animation: musicBounce 1s ease-in-out infinite;
}

/* Muted state */
.music-toggle-btn:not(.playing) {
    background: rgba(139, 0, 0, 0.8);
    border-color: #666;
}

.music-toggle-btn:not(.playing) i {
    color: #ccc;
}

@keyframes musicPulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(255, 107, 53, 0.5);
    }
    50% {
        box-shadow: 0 5px 30px rgba(255, 107, 53, 1), 
            0 0 40px rgba(255, 215, 0, 0.8);
    }
}

@keyframes musicBounce {
 0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .music-toggle-btn {
        width: 50px;
  height: 50px;
  top: 15px;
      right: 15px;
    }
    
    .music-toggle-btn i {
        font-size: 1.4rem;
    }
}
