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

body, html {
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    overflow: hidden;
    line-height: 1.6;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #000000, #0a0a0a);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader {
    width: 300px;
    text-align: center;
    position: relative;
}

.loader::before, .loader::after {
    content: '';
    position: absolute;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.loader::before {
    top: -20px;
    animation: scanline 2s linear infinite;
}

.loader::after {
    bottom: -20px;
    animation: scanline 2s linear infinite reverse;
}

.loader-bar {
    width: 100%;
    height: 1px;
    background: #111;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: loading 2s ease-in-out forwards;
}

.loader-text {
    font-family: 'Syncopate', sans-serif;
    font-size: 12px;
    letter-spacing: 18px;
    animation: pulse 1.5s infinite;
    font-weight: 400;
    text-transform: uppercase;
    margin-right: -18px;
    color: rgba(255,255,255,0.9);
}

.loader-progress {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    margin-top: 10px;
    opacity: 0.7;
    letter-spacing: 4px;
    font-weight: 300;
}

/* Intro Animation */
#intro-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #000000, #0a0a0a);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 900;
    perspective: 1000px;
}

.intro-text {
    text-align: center;
    transform-style: preserve-3d;
    position: relative;
}

.intro-text::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255,0,0,0.03) 0%, transparent 70%);
    animation: pulse 3s infinite;
    pointer-events: none;
}

.text-line {
    font-family: 'Syncopate', sans-serif;
    font-size: 28px;
    opacity: 0;
    transform: translateZ(-100px);
    margin: 15px 0;
    letter-spacing: 12px;
    font-weight: 400;
    position: relative;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
}

.text-line.emphasis {
    font-size: 92px;
    font-weight: 700;
    color: #ff0000;
    letter-spacing: 15px;
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5),
                 0 0 40px rgba(255, 0, 0, 0.3),
                 0 0 60px rgba(255, 0, 0, 0.1);
    animation: glowPulse 2s infinite;
    margin: 30px 0;
}

/* Main Content */
#main-content {
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease;
    background: linear-gradient(to bottom, #000000, #0a0a0a);
}

#main-content.visible {
    opacity: 1;
}

canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

h1 {
    font-family: 'Syncopate', sans-serif;
    font-size: 52px;
    letter-spacing: 15px;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    margin-bottom: 30px;
    transform: translateZ(0);
    backface-visibility: hidden;
}

#audio-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    letter-spacing: 6px;
    font-weight: 300;
    margin: 20px 0;
    opacity: 0.9;
    transform: translateZ(0);
}

.contact-info {
    margin-top: 60px;
    text-align: center;
    transform: translateZ(0);
}

h4 {
    font-family: 'Syncopate', sans-serif;
    font-size: 14px;
    letter-spacing: 8px;
    margin-bottom: 15px;
    font-weight: 400;
}

.contact-info p {
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    letter-spacing: 3px;
    opacity: 0.8;
    font-weight: 300;
}

#toggle-sound {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#toggle-sound i {
    font-size: 20px;
    transition: all 0.3s ease;
}

#toggle-sound:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

#toggle-sound:hover i {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes loading {
    0% { width: 0; }
    100% { width: 100%; }
}

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

@keyframes glowPulse {
    0% { 
        text-shadow: 0 0 20px rgba(255, 0, 0, 0.5),
                     0 0 40px rgba(255, 0, 0, 0.3);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 30px rgba(255, 0, 0, 0.8),
                     0 0 60px rgba(255, 0, 0, 0.5),
                     0 0 80px rgba(255, 0, 0, 0.3);
        transform: scale(1.02);
    }
    100% { 
        text-shadow: 0 0 20px rgba(255, 0, 0, 0.5),
                     0 0 40px rgba(255, 0, 0, 0.3);
        transform: scale(1);
    }
}

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

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateZ(-100px) rotateX(20deg);
    }
    to { 
        opacity: 1; 
        transform: translateZ(0) rotateX(0);
    }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Intro Text Animation Classes */
.animate-text {
    animation: fadeIn 1.2s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .text-line {
        font-size: 20px;
        letter-spacing: 8px;
    }
    
    .text-line.emphasis {
        font-size: 48px;
        letter-spacing: 10px;
    }
    
    .loader {
        width: 80%;
    }
    
    .loader-text {
        font-size: 10px;
        letter-spacing: 12px;
    }
    
    h1 {
        font-size: 32px;
        letter-spacing: 10px;
    }
    
    #audio-title {
        font-size: 14px;
        letter-spacing: 4px;
    }
}

/* High-DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .text-line.emphasis {
        text-shadow: 0 0 30px rgba(255, 0, 0, 0.5),
                     0 0 60px rgba(255, 0, 0, 0.3),
                     0 0 90px rgba(255, 0, 0, 0.1);
    }
}
