* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    transition: opacity 1s ease-out;
}

#loadingScreen.fade-out {
    opacity: 0;
    pointer-events: none;
}

body {
    height: 100vh;
    background: #000;
    overflow: hidden;
    font-family: 'Arial Black', sans-serif;
    position: relative;
}

.protoss-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.2) translateY(-50px);
    transition: opacity 2s ease-in, transform 2s ease-out;
    z-index: 2;
}

.protoss-background.slide-in {
    opacity: 1;
    transform: scale(1) translateY(0);
}

@keyframes rainbowGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#celebration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 1s ease-in;
    background: linear-gradient(135deg, 
        rgba(0, 100, 150, 0.9) 0%, 
        rgba(0, 150, 200, 0.8) 25%, 
        rgba(50, 200, 255, 0.7) 50%, 
        rgba(0, 150, 200, 0.8) 75%, 
        rgba(0, 100, 150, 0.9) 100%);
    border: 3px solid #00ccff;
    border-radius: 15px;
    padding: 40px 60px;
    box-shadow: 
        0 0 30px rgba(0, 204, 255, 0.8),
        inset 0 0 30px rgba(0, 204, 255, 0.3),
        0 0 60px rgba(0, 204, 255, 0.5);
    backdrop-filter: blur(5px);
    position: relative;
}

#celebration::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, 
        #00ccff, #0088cc, #0066aa, #004488, #0066aa, #0088cc, #00ccff);
    border-radius: 20px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

#celebration::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(0, 204, 255, 0.5);
    border-radius: 10px;
    pointer-events: none;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

#celebration.visible {
    opacity: 1;
}

#topText {
    transform: translateY(-100vh);
    transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-bottom: 20px;
}

#topText.slide-in {
    transform: translateY(0);
}

#bottomText {
    transform: translateY(100vh);
    transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-top: 20px;
}

#bottomText.slide-in {
    transform: translateY(0);
}

h1 {
    font-size: 4rem;
    color: #ffffff;
    text-shadow: 
        0 0 10px #00ccff,
        0 0 20px #00ccff,
        0 0 30px #00aadd,
        0 0 40px #0088bb,
        2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: 
        scGlow 3s ease-in-out infinite,
        scPulse 2s ease-in-out infinite;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 900;
    font-family: 'Arial Black', 'Impact', sans-serif;
}

@keyframes scGlow {
    0%, 100% { 
        text-shadow: 
            0 0 10px #00ccff,
            0 0 20px #00ccff,
            0 0 30px #00aadd,
            0 0 40px #0088bb,
            2px 2px 4px rgba(0, 0, 0, 0.8);
    }
    50% { 
        text-shadow: 
            0 0 15px #00ffff,
            0 0 30px #00ddff,
            0 0 45px #00bbdd,
            0 0 60px #0099bb,
            2px 2px 4px rgba(0, 0, 0, 0.8);
    }
}

@keyframes scPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

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.8) 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.6) 1px, transparent 1px),
        radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.9) 1.5px, transparent 1.5px),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.7) 1px, transparent 1px),
        radial-gradient(circle at 90% 60%, rgba(255, 255, 255, 0.8) 2px, transparent 2px);
    background-size: 200px 200px, 150px 150px, 300px 300px, 100px 100px, 250px 250px;
    animation: sparkle 3s ease-in-out infinite;
    z-index: 5;
    opacity: 0;
    transition: opacity 1s ease-in 2s;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
}

.play-message-btn {
    margin: 30px auto 0;
    padding: 15px 30px;
    background: linear-gradient(135deg, 
        rgba(0, 200, 255, 0.9) 0%, 
        rgba(0, 150, 255, 0.8) 50%, 
        rgba(0, 100, 255, 0.9) 100%);
    border: 2px solid #00ccff;
    border-radius: 25px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: 'Arial Black', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 20px rgba(0, 204, 255, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.play-message-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, 
        rgba(0, 220, 255, 1) 0%, 
        rgba(0, 170, 255, 0.9) 50%, 
        rgba(0, 120, 255, 1) 100%);
    box-shadow: 
        0 0 30px rgba(0, 204, 255, 0.8),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
}

.play-message-btn:active {
    transform: scale(0.98);
}

.play-icon {
    font-size: 1.3rem;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

.sound-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .play-message-btn {
        font-size: 1rem;
        padding: 12px 25px;
        margin-top: 25px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
        letter-spacing: 0.1em;
    }
    
    .play-message-btn {
        font-size: 0.9rem;
        padding: 10px 20px;
        margin-top: 20px;
        gap: 8px;
    }
}
