/* Enhanced Dutch Underground Techno Website Styles - PRODUCTION READY 
   DEPLOY THIS FIRST - Fixes white box issue and optimizes without breaking functionality */
/* Version: 4.0.0 - Complete Backend Integration & Mobile-First Responsive */
/* CRITICAL CSS FIXES for Dutch Underground Portal v6.1.0 
   Add these styles to your existing enhanced-style.css or create a new section */

/* FIXED: Loading Screen - Prevents hanging spinner */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--pure-black), var(--warehouse-gray));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 1s ease-out, visibility 1s ease-out;
    pointer-events: all;
}

.loading-screen.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* FIXED: Ensure loading screen is properly hidden */
body.loaded .loading-screen {
    display: none !important;
}

/* Enhanced JavaScript trigger */
.js-loading-complete .loading-screen {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* FIXED: Admin Modal Styles - Better visibility */
.admin-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.9) !important;
    z-index: 10000 !important;
    backdrop-filter: blur(10px) !important;
}

.admin-modal-content {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a) !important;
    border: 2px solid rgba(255, 149, 0, 0.5) !important;
    border-radius: 15px !important;
    padding: 2rem !important;
    max-width: 400px !important;
    width: 90% !important;
    text-align: center !important;
    color: #fff !important;
    position: relative !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8) !important;
}

/* FIXED: Portal Authentication Visual Feedback */
.login-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.login-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 149, 0, 0.3);
    border-top: 3px solid var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

/* FIXED: Access Request Form Loading State */
.access-request-form.loading {
    position: relative;
    opacity: 0.8;
}

.access-request-form.loading::before {
    content: 'Submitting to Underground...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: var(--primary-orange);
    padding: 1rem 2rem;
    border-radius: 10px;
    border: 1px solid var(--primary-orange);
    font-family: var(--font-title);
    font-weight: 600;
    z-index: 1000;
    animation: pulse 1s infinite;
}

/* ENHANCED: Mobile Optimization - Critical for user experience */
@media (max-width: 768px) {
    /* Ensure full viewport usage on mobile */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Loading screen mobile fix */
    .loading-screen {
        position: fixed;
        width: 100vw;
        height: 100vh;
        height: calc(var(--vh, 1vh) * 100);
    }
    
    /* Container mobile optimization */
    .container {
        padding: clamp(1rem, 4vw, 1.5rem);
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    /* Title mobile scaling */
    .neon-title {
        font-size: clamp(1.5rem, 6vw, 3rem) !important;
        line-height: 1.2;
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
    }
    
    /* Form mobile optimization */
    .login-form,
    .access-request-form {
        padding: clamp(1.5rem, 4vw, 2rem);
        margin: 0 clamp(0.5rem, 2vw, 1rem);
        width: calc(100% - clamp(1rem, 4vw, 2rem));
        max-width: none;
        box-sizing: border-box;
    }
    
    /* Button mobile optimization */
    .void-button,
    .access-submit-btn,
    .mystery-transmission-button {
        padding: clamp(1rem, 3vw, 1.5rem) clamp(1.5rem, 4vw, 2rem);
        font-size: max(16px, clamp(1rem, 2.5vw, 1.2rem));
        width: 100%;
        min-height: 48px; /* iOS touch target */
    }
    
    /* Admin modal mobile fix */
    .admin-modal-content {
        width: calc(100% - 2rem) !important;
        margin: 1rem !important;
        max-width: none !important;
    }
}

/* FIXED: Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        min-height: auto;
        padding: clamp(0.5rem, 2vh, 1rem) clamp(1rem, 3vw, 2rem);
    }
    
    .neon-title {
        font-size: clamp(1.2rem, 4vh, 2rem);
        margin-bottom: clamp(0.5rem, 1vh, 1rem);
    }
    
    .loading-screen {
        height: 100vh;
        height: calc(var(--vh, 1vh) * 100);
    }
}

/* ENHANCED: Portal Authentication Success Animation */
.portal-success {
    animation: successPulse 2s ease-in-out;
}

@keyframes successPulse {
    0% { 
        background: rgba(255, 149, 0, 0.1);
        border-color: rgba(255, 149, 0, 0.3);
    }
    50% { 
        background: rgba(0, 255, 0, 0.2);
        border-color: rgba(0, 255, 0, 0.8);
        box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
    }
    100% { 
        background: rgba(255, 149, 0, 0.1);
        border-color: rgba(255, 149, 0, 0.3);
    }
}

/* ENHANCED: Error State Styling */
.form-error-state {
    border-color: #ff4444 !important;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.4) !important;
    background: rgba(255, 68, 68, 0.1) !important;
}

.error-message {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid #ff4444;
    color: #ff6b6b;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-family: var(--font-body);
    font-weight: 500;
}

.success-message {
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #00ff00;
    color: #00ff44;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-family: var(--font-body);
    font-weight: 500;
}

/* ENHANCED: Skip Link - Better accessibility */
.skip-link:focus {
    top: 6px !important;
    left: 6px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    outline: 3px solid var(--golden-yellow) !important;
    outline-offset: 2px !important;
    z-index: 10002 !important;
}

/* ENHANCED: High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-orange: #FFAA00;
        --electric-blue: #0099FF;
        --pure-white: #FFFFFF;
        --pure-black: #000000;
    }
    
    .login-form,
    .access-request-form {
        border-width: 3px;
        background: rgba(0, 0, 0, 0.95);
    }
    
    input, select, textarea {
        border-width: 2px;
        background: rgba(0, 0, 0, 0.9);
    }
}

/* ENHANCED: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-screen {
        transition: none !important;
    }
    
    .loading-screen.fade-out {
        display: none !important;
    }
}

/* FIXED: Print Styles - Hidden elements */
@media print {
    .loading-screen,
    .admin-modal,
    #background-canvas,
    .floating-elements {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* ENHANCED: Focus Management */
.focus-trap {
    outline: 3px solid var(--golden-yellow);
    outline-offset: 2px;
}

/* CRITICAL: Ensure spinner disappears on all browsers */
.dutch-loader {
    transition: opacity 0.5s ease-out;
}

body.app-ready .loading-screen {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ENHANCED: Newsletter Modal Improvements */
.newsletter-modal {
    backdrop-filter: blur(15px) !important;
}

.newsletter-modal-content {
    animation: modalSlideIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ENHANCED: iOS Safari Fixes */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
    
    .loading-screen {
        height: -webkit-fill-available;
    }
    
    input, select, textarea, button {
        font-size: 16px; /* Prevents zoom on focus */
        -webkit-appearance: none;
        border-radius: 0;
    }
}

:root {
    /* Color Palette - Underground Techno/Industrial */
    --primary-orange: #FF9500;
    --electric-blue: #00BFFF;
    --neon-cyan: #00FFFF;
    --deep-purple: #6B46C1;
    --industrial-red: #FF0000;
    --golden-yellow: #FFD700;
    --pure-black: #000000;
    --pure-white: #FFFFFF;
    --dark-gray: #111111;
    --mid-gray: #333333;
    --warehouse-gray: #1a1a1a;
    --concrete-gray: #2a2a2a;
    
    /* Gradients - Industrial/Electronic */
    --primary-gradient: linear-gradient(135deg, var(--primary-orange), var(--electric-blue));
    --underground-gradient: linear-gradient(45deg, var(--deep-purple), var(--primary-orange), var(--electric-blue));
    --void-gradient: radial-gradient(ellipse at center, transparent 0%, var(--pure-black) 70%);
    --warehouse-gradient: linear-gradient(180deg, var(--warehouse-gray), var(--pure-black));
    
    /* Typography */
    --font-title: 'Orbitron', 'Rajdhani', 'Arial Black', sans-serif;
    --font-subtitle: 'Rajdhani', 'Arial', sans-serif;
    --font-body: 'Inter', 'Arial', sans-serif;
    
    /* Shadows & Effects - Industrial/Electronic */
    --glow-orange: 0 0 20px var(--primary-orange);
    --glow-blue: 0 0 20px var(--electric-blue);
    --glow-cyan: 0 0 15px var(--neon-cyan);
    --shadow-deep: 0 10px 40px rgba(0, 0, 0, 0.8);
    --warehouse-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    
    /* Animations */
    --fast: 0.3s;
    --medium: 0.6s;
    --slow: 1.2s;
    --ultra-slow: 3s;
    
    /* Mobile-specific variables */
    --mobile-padding: clamp(1rem, 4vw, 2rem);
    --mobile-gap: clamp(0.5rem, 2vw, 1rem);
    --touch-target: 44px; /* Minimum touch target size */
    
    /* Custom viewport height for mobile browsers */
    --vh: 1vh;
}

/* CRITICAL FIX: CSS Reset & Base Styles - Mobile First */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
    overflow-x: hidden;
    /* Prevent horizontal scrolling issues */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    background: var(--warehouse-gradient);
    color: var(--pure-white);
    font-family: var(--font-body);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100); /* Mobile viewport fix */
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* CRITICAL FIX: Screen Reader Only - Properly Hidden */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* CRITICAL FIX: Skip Link - FIXED White Box Issue */
.skip-link {
    position: fixed !important;
    top: -50px !important;
    left: 6px !important;
    background: var(--pure-black) !important;
    color: var(--pure-white) !important;
    padding: 8px 12px !important;
    text-decoration: none !important;
    z-index: 10001 !important;
    transition: top 0.3s ease !important;
    border: 2px solid var(--primary-orange) !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: var(--font-body) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.skip-link:focus {
    top: 6px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    outline: 3px solid var(--golden-yellow) !important;
    outline-offset: 2px !important;
}

/* Loading Screen - Underground Theme */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--pure-black), var(--warehouse-gray));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.dutch-loader {
    text-align: center;
    animation: undergroundPulse 2s infinite ease-in-out;
}

.windmill-spinner {
    width: clamp(40px, 8vw, 60px);
    height: clamp(40px, 8vw, 60px);
    border: 3px solid transparent;
    border-top: 3px solid var(--primary-orange);
    border-right: 3px solid var(--electric-blue);
    border-radius: 50%;
    animation: undergroundSpin 1.5s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    color: var(--primary-orange);
    font-family: var(--font-title);
    font-size: clamp(1rem, 3vw, 1.2rem);
    text-shadow: var(--glow-orange);
    animation: textGlow 2s ease-in-out infinite alternate;
}

/* OPTIMIZED: Video Background Styling */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
    pointer-events: none;
    will-change: transform;
}

.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.3;
    z-index: -3;
    will-change: transform;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(26, 26, 26, 0.4) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: -2;
    will-change: transform;
}

.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--warehouse-gradient);
    z-index: -3;
}

/* Enhanced Background Effects */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 30%, rgba(255, 149, 0, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 70%, rgba(0, 191, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 100% 80% at 40% 50%, rgba(107, 70, 193, 0.05) 0%, transparent 70%);
    z-index: -2;
    animation: etherealShift 20s infinite ease-in-out;
    pointer-events: none;
    will-change: transform;
    transform: translateZ(0);
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.2;
    pointer-events: none;
    will-change: transform;
    transform: translateZ(0);
}

.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
}

/* Main Container */
.page-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    flex-direction: column;
}

.container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    padding: var(--mobile-padding);
    text-align: center;
    width: 100%;
    max-width: 100%;
    flex: 1;
}

/* Enhanced Typography - Mobile First */
.neon-title {
    font-family: var(--font-title);
    font-size: clamp(1.5rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--primary-orange);
    text-shadow: 
        0 0 10px var(--primary-orange),
        0 0 20px var(--primary-orange),
        0 0 40px rgba(255, 149, 0, 0.5);
    margin-bottom: clamp(2rem, 6vw, 3rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    animation: titleGlow 4s ease-in-out infinite alternate;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
    word-wrap: break-word;
    hyphens: auto;
}

.title-line-1, .title-line-2 {
    display: block;
    animation: titleFloat 6s ease-in-out infinite;
    word-wrap: break-word;
    hyphens: auto;
}

.title-line-2 {
    animation-delay: 0.5s;
    color: var(--electric-blue);
    text-shadow: 
        0 0 10px var(--electric-blue),
        0 0 20px var(--electric-blue),
        0 0 40px rgba(0, 191, 255, 0.5);
}

.teaser {
    font-size: clamp(0.9rem, 2.5vw, 1.3rem);
    color: rgba(255, 255, 255, 0.85);
    max-width: 800px;
    margin: 0 auto clamp(3rem, 6vw, 4rem);
    line-height: 1.7;
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    animation: textReveal 2s ease-out 0.5s both;
    width: 100%;
    padding: 0 var(--mobile-padding);
    word-wrap: break-word;
    hyphens: auto;
}

.teaser-highlight {
    color: var(--golden-yellow);
    font-weight: 500;
    text-shadow: 0 0 10px var(--golden-yellow);
    animation: highlightPulse 3s ease-in-out infinite;
}

.techno-highlight {
    color: var(--neon-cyan);
    font-weight: 600;
    text-shadow: var(--glow-cyan);
    animation: technoGlow 2s ease-in-out infinite alternate;
}

/* OPTIMIZED: Audio Mystery Section */
.audio-mystery {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 600px;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
    padding: var(--mobile-padding);
}

.audio-control-widget {
    background: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)),
        rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: clamp(15px, 3vw, 20px);
    border: 1px solid rgba(255, 149, 0, 0.3);
    box-shadow: var(--warehouse-shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.audio-widget-title {
    font-family: var(--font-title);
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: var(--electric-blue);
    margin-bottom: 1rem;
    text-shadow: var(--glow-blue);
}

.audio-description {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.mystery-frequencies {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 4px;
    height: 40px;
    margin: 1.5rem 0;
}

.freq-bar {
    width: 4px;
    background: var(--primary-orange);
    border-radius: 2px;
    animation: frequencyPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px var(--primary-orange);
}

.freq-bar:nth-child(1) { height: 10px; animation-delay: 0s; }
.freq-bar:nth-child(2) { height: 25px; animation-delay: 0.1s; }
.freq-bar:nth-child(3) { height: 35px; animation-delay: 0.2s; }
.freq-bar:nth-child(4) { height: 40px; animation-delay: 0.3s; }
.freq-bar:nth-child(5) { height: 30px; animation-delay: 0.4s; }
.freq-bar:nth-child(6) { height: 20px; animation-delay: 0.5s; }
.freq-bar:nth-child(7) { height: 15px; animation-delay: 0.6s; }

.mystery-transmission-button {
    position: relative;
    padding: clamp(1rem, 2.5vw, 1.2rem) clamp(2rem, 5vw, 3rem);
    background: var(--primary-gradient);
    border: none;
    color: var(--pure-black);
    font-family: var(--font-title);
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 700;
    border-radius: clamp(8px, 2vw, 12px);
    cursor: pointer;
    transition: all var(--fast) ease;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 100%;
    box-sizing: border-box;
    min-height: var(--touch-target);
    -webkit-appearance: none;
    touch-action: manipulation;
}

.transmission-icon {
    margin-right: 0.5rem;
    font-size: 1.2em;
}

.signal-waves {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    display: flex;
    gap: 2px;
}

.wave {
    width: 3px;
    height: 8px;
    background: var(--pure-black);
    border-radius: 2px;
    animation: waveSignal 1s ease-in-out infinite;
}

.wave:nth-child(1) { animation-delay: 0s; }
.wave:nth-child(2) { animation-delay: 0.3s; }
.wave:nth-child(3) { animation-delay: 0.6s; }

.audio-player-container {
    margin-top: 1.5rem;
    display: none;
    border-radius: 8px;
    overflow: hidden;
}

/* OPTIMIZED: Access Request Section */
.access-request-section {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 600px;
    margin: 0 auto clamp(3rem, 6vw, 4rem);
    padding: var(--mobile-padding);
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: clamp(15px, 3vw, 20px);
    backdrop-filter: blur(10px);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 149, 0, 0.3);
    border-top: 3px solid var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.access-cta-title {
    font-family: var(--font-title);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: var(--electric-blue);
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: var(--glow-blue);
}

.access-cta-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.access-request-form {
    background: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)),
        rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: clamp(15px, 3vw, 20px);
    border: 1px solid rgba(0, 191, 255, 0.3);
    box-shadow: var(--warehouse-shadow);
    position: relative;
    overflow: hidden;
}

.form-row {
    margin-bottom: 1.5rem;
}

.form-row.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-field {
    position: relative;
}

.form-field label {
    display: block;
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    color: var(--electric-blue);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-field input,
.form-field select {
    width: 100%;
    padding: clamp(0.8rem, 2vw, 1rem);
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 191, 255, 0.3);
    color: var(--pure-white);
    font-family: var(--font-body);
    font-size: max(16px, clamp(0.9rem, 2vw, 1rem));
    border-radius: clamp(6px, 1.5vw, 8px);
    transition: all var(--fast) ease;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    -webkit-appearance: none;
    min-height: var(--touch-target);
}

.form-field input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.form-field select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.field-error {
    color: var(--industrial-red);
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    margin-top: 0.25rem;
    display: none;
    text-align: left;
}

.access-submit-btn {
    width: 100%;
    padding: clamp(1rem, 2.5vw, 1.2rem);
    background: var(--underground-gradient);
    border: none;
    color: var(--pure-white);
    font-family: var(--font-title);
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    font-weight: 700;
    border-radius: clamp(8px, 2vw, 12px);
    cursor: pointer;
    transition: all var(--fast) ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-sizing: border-box;
    min-height: var(--touch-target);
    -webkit-appearance: none;
    touch-action: manipulation;
}

.access-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 70, 193, 0.4);
}

.access-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form-success {
    background: 
        linear-gradient(145deg, rgba(0, 255, 0, 0.1), rgba(0, 255, 0, 0.05)),
        rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: clamp(15px, 3vw, 20px);
    border: 1px solid rgba(0, 255, 0, 0.3);
    box-shadow: var(--warehouse-shadow);
    text-align: center;
    display: none;
}

.form-success h3 {
    font-family: var(--font-title);
    color: #00FF00;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px #00FF00;
}

/* OPTIMIZED: Access Portal (Login Form) */
.access-portal {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 500px;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.login-form {
    position: relative;
    background: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)),
        rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: clamp(15px, 3vw, 25px);
    border: 1px solid rgba(255, 149, 0, 0.3);
    box-shadow: 
        var(--warehouse-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    transition: all var(--medium) ease;
    animation: portalEntry 1s ease-out 1s both;
    margin: 0 auto;
    overflow: hidden;
}

.login-form::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--underground-gradient);
    border-radius: clamp(15px, 3vw, 25px);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--medium) ease;
}

.login-form:hover::before {
    opacity: 0.3;
    animation: borderGlow 2s ease-in-out infinite;
}

.form-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--primary-orange) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--slow) ease;
}

.login-form:hover .form-glow {
    opacity: 0.1;
    animation: glowPulse 3s ease-in-out infinite;
}

/* Enhanced Form Elements - Mobile First */
.input-group {
    position: relative;
    margin: clamp(1.5rem, 3vw, 2rem) 0;
    width: 100%;
}

input {
    width: 100%;
    padding: clamp(1rem, 3vw, 1.5rem) 1.2rem;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 149, 0, 0.3);
    color: var(--pure-white);
    font-family: var(--font-body);
    font-size: max(16px, clamp(1rem, 2.5vw, 1.1rem));
    border-radius: clamp(8px, 2vw, 12px);
    text-align: center;
    transition: all var(--fast) ease;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    -webkit-appearance: none;
    -webkit-border-radius: clamp(8px, 2vw, 12px);
    min-height: var(--touch-target);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

input:focus {
    outline: none;
    border-color: var(--electric-blue);
    box-shadow: 
        0 0 20px rgba(0, 191, 255, 0.4),
        inset 0 0 10px rgba(0, 191, 255, 0.1);
    transform: translateY(-2px);
}

.input-focus-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: clamp(8px, 2vw, 12px);
    pointer-events: none;
    opacity: 0;
    transition: all var(--fast) ease;
}

input:focus + .input-focus-effect {
    opacity: 1;
    border-color: var(--neon-cyan);
    animation: focusRipple 0.6s ease-out;
}

/* Enhanced Button - Mobile First */
.void-button {
    position: relative;
    padding: clamp(1rem, 2.5vw, 1.2rem) clamp(2rem, 5vw, 3rem);
    background: var(--primary-gradient);
    border: none;
    color: var(--pure-black);
    font-family: var(--font-title);
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    font-weight: 700;
    border-radius: clamp(8px, 2vw, 12px);
    cursor: pointer;
    margin-top: clamp(1.5rem, 3vw, 2rem);
    transition: all var(--fast) ease;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 100%;
    box-sizing: border-box;
    min-height: var(--touch-target);
    -webkit-appearance: none;
    touch-action: manipulation;
}

.button-text {
    position: relative;
    z-index: 2;
}

.button-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform var(--medium) ease;
}

.void-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(255, 149, 0, 0.4),
        0 0 20px var(--electric-blue);
}

.void-button:hover .button-glow {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

.void-button:active {
    transform: translateY(-1px) scale(1.02);
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .void-button:hover {
        transform: none;
        box-shadow: none;
    }
    
    .void-button:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
    
    .access-submit-btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    .access-submit-btn:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
    
    .mystery-transmission-button:hover {
        transform: none;
        box-shadow: none;
    }
    
    .mystery-transmission-button:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
}

/* Message Display - Mobile Optimized */
#message {
    margin-top: clamp(1.5rem, 3vw, 2rem);
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 500;
    text-shadow: 0 0 10px currentColor;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--fast) ease;
    width: 100%;
    text-align: center;
    word-wrap: break-word;
    padding: 0 var(--mobile-padding);
}

#message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Features Preview */
.features-preview {
    margin-top: clamp(3rem, 6vw, 4rem);
    animation: featuresReveal 1s ease-out 1.5s both;
    width: 100%;
    padding: 0 var(--mobile-padding);
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    justify-content: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    padding: clamp(1.5rem, 3vw, 2rem) clamp(1rem, 2vw, 1.5rem);
    border-radius: clamp(12px, 2.5vw, 15px);
    border: 1px solid rgba(255, 149, 0, 0.2);
    text-align: center;
    transition: all var(--fast) ease;
    cursor: pointer;
    width: 100%;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.feature-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--electric-blue);
    box-shadow: 0 10px 30px rgba(0, 191, 255, 0.3);
}

.feature-icon {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: clamp(0.8rem, 2vw, 1rem);
    animation: iconFloat 3s ease-in-out infinite;
}

.feature-card h3 {
    font-family: var(--font-subtitle);
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px var(--primary-orange);
    word-wrap: break-word;
}

.feature-card p {
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    word-wrap: break-word;
}

/* Enhanced Smoke Effect */
.smoke {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    will-change: transform;
    transform: translateZ(0);
}

/* Enhanced Lasers */
.lasers {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
}

.laser {
    position: absolute;
    height: clamp(1px, 0.3vw, 2px);
    opacity: 0.4;
    animation: laserSweep 12s infinite linear;
    will-change: transform;
}

.laser1 {
    top: 20%;
    background: linear-gradient(90deg, transparent, var(--primary-orange), transparent);
    box-shadow: 0 0 clamp(8px, 2vw, 15px) var(--primary-orange);
    width: 300%;
    left: -100%;
    transform: rotate(15deg);
}

.laser2 {
    top: 45%;
    background: linear-gradient(90deg, transparent, var(--electric-blue), transparent);
    box-shadow: 0 0 clamp(8px, 2vw, 15px) var(--electric-blue);
    width: 250%;
    left: -100%;
    transform: rotate(-8deg);
    animation-delay: 3s;
}

.laser3 {
    top: 70%;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    box-shadow: 0 0 clamp(8px, 2vw, 15px) var(--neon-cyan);
    width: 280%;
    left: -100%;
    transform: rotate(12deg);
    animation-delay: 6s;
}

.laser4 {
    top: 85%;
    background: linear-gradient(90deg, transparent, var(--deep-purple), transparent);
    box-shadow: 0 0 clamp(8px, 2vw, 15px) var(--deep-purple);
    width: 320%;
    left: -100%;
    transform: rotate(-5deg);
    animation-delay: 9s;
}

/* Enhanced Footer */
.neon-footer {
    position: relative;
    text-align: center;
    padding: clamp(1.5rem, 3vw, 2rem) var(--mobile-padding);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 2;
    backdrop-filter: blur(10px);
    margin-top: clamp(3rem, 6vw, 4rem);
    width: 100%;
    flex-shrink: 0;
}

.neon-footer nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(1rem, 3vw, 2rem);
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.neon-footer a {
    color: var(--primary-orange);
    text-decoration: none;
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    transition: all var(--fast) ease;
    position: relative;
    padding: 0.5rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.neon-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--electric-blue);
    transition: all var(--fast) ease;
    transform: translateX(-50%);
}

.neon-footer a:hover {
    color: var(--electric-blue);
    text-shadow: var(--glow-blue);
}

.neon-footer a:hover::after {
    width: 100%;
}

.neon-footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    margin: clamp(1rem, 2vw, 1.5rem) 0 clamp(0.5rem, 1vw, 1rem);
    word-wrap: break-word;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: clamp(0.8rem, 2vw, 1rem);
}

.social-links a {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    transition: transform var(--fast) ease;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: var(--touch-target);
    min-height: var(--touch-target);
}

.social-links a:hover {
    transform: scale(1.2) rotate(10deg);
}

.admin-access-link {
    opacity: 0.3;
    transition: opacity var(--fast) ease;
}

.admin-access-link:hover {
    opacity: 1;
}

/* Form Field States */
.form-field.valid input,
.form-field.valid select {
    border-color: #00FF00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.form-field.invalid input,
.form-field.invalid select {
    border-color: #FF0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.form-field.invalid .field-error {
    display: block;
}

/* Message States */
#message.success {
    color: #00FF00;
    text-shadow: 0 0 10px #00FF00;
}

#message.error {
    color: #FF0000;
    text-shadow: 0 0 10px #FF0000;
}

#message.warning {
    color: #FFD700;
    text-shadow: 0 0 10px #FFD700;
}

#message.info {
    color: #00BFFF;
    text-shadow: 0 0 10px #00BFFF;
}

/* Animations */
@keyframes undergroundPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.1) rotate(5deg); opacity: 0.8; }
}

@keyframes undergroundSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes textGlow {
    0% { text-shadow: 0 0 20px var(--primary-orange); }
    100% { text-shadow: 0 0 30px var(--primary-orange), 0 0 40px rgba(255, 149, 0, 0.5); }
}

@keyframes etherealShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    33% { opacity: 0.8; transform: scale(1.05) rotate(1deg); }
    66% { opacity: 0.9; transform: scale(0.95) rotate(-1deg); }
}

@keyframes titleGlow {
    0% { 
        text-shadow: 
            0 0 10px var(--primary-orange),
            0 0 20px var(--primary-orange),
            0 0 40px rgba(255, 149, 0, 0.5);
    }
    100% { 
        text-shadow: 
            0 0 15px var(--primary-orange),
            0 0 30px var(--primary-orange),
            0 0 60px rgba(255, 149, 0, 0.8);
    }
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes textReveal {
    0% { opacity: 0; transform: translateY(30px); filter: blur(10px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes highlightPulse {
    0%, 100% { text-shadow: 0 0 10px var(--golden-yellow); }
    50% { text-shadow: 0 0 20px var(--golden-yellow), 0 0 30px rgba(255, 215, 0, 0.5); }
}

@keyframes technoGlow {
    0% { text-shadow: 0 0 15px var(--neon-cyan); }
    100% { text-shadow: 0 0 25px var(--neon-cyan), 0 0 35px rgba(0, 255, 255, 0.6); }
}

@keyframes portalEntry {
    0% { 
        opacity: 0; 
        transform: scale(0.8) translateY(50px);
        filter: blur(20px);
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.2; }
}

@keyframes focusRipple {
    0% { transform: scale(0.8); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scale(1.1); opacity: 0; }
}

@keyframes featuresReveal {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-5px) rotate(5deg); }
    66% { transform: translateY(5px) rotate(-5deg); }
}

@keyframes laserSweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes frequencyPulse {
    0%, 100% { height: 10px; }
    50% { height: 40px; }
}

@keyframes waveSignal {
    0%, 100% { height: 8px; }
    50% { height: 15px; }
}

/* Responsive Design - Mobile First Enhanced */
@media (max-width: 1200px) {
    .container {
        padding: clamp(1.5rem, 4vw, 2rem);
    }
    
    .login-form {
        padding: clamp(2rem, 4vw, 2.5rem);
    }
}

@media (max-width: 1024px) {
    .feature-cards {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: clamp(1rem, 3vw, 1.5rem);
    }
    
    .neon-footer nav ul {
        gap: clamp(1rem, 3vw, 1.5rem);
    }
    
    .form-row.two-column {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 768px) {
    .container {
        min-height: auto;
        padding: clamp(1rem, 4vw, 1.5rem);
    }
    
    .neon-title {
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
    }
    
    .teaser {
        margin-bottom: clamp(2rem, 4vw, 3rem);
        padding: 0 clamp(0.5rem, 2vw, 1rem);
    }
    
    .login-form,
    .access-request-form,
    .audio-control-widget {
        padding: clamp(1.5rem, 4vw, 2rem);
        margin: 0 clamp(0.5rem, 2vw, 1rem);
        border-radius: clamp(12px, 3vw, 20px);
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
        max-width: 350px;
        gap: clamp(1rem, 2vw, 1.5rem);
    }
    
    .feature-card {
        padding: clamp(1.5rem, 3vw, 2rem) clamp(1rem, 2vw, 1.5rem);
        min-height: 120px;
    }
    
    .neon-footer nav ul {
        flex-direction: column;
        gap: clamp(0.8rem, 2vw, 1rem);
    }
    
    .neon-footer {
        padding: clamp(1rem, 3vw, 1.5rem);
        margin-top: clamp(2rem, 4vw, 3rem);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: clamp(0.8rem, 3vw, 1rem);
    }
    
    .login-form,
    .access-request-form,
    .audio-control-widget {
        padding: clamp(1.2rem, 3vw, 1.5rem);
        margin: 0 clamp(0.25rem, 1vw, 0.5rem);
        border-radius: clamp(10px, 2.5vw, 15px);
    }
    
    input {
        padding: clamp(0.8rem, 2.5vw, 1rem);
        border-radius: clamp(6px, 1.5vw, 8px);
        font-size: 16px;
    }
    
    .void-button,
    .access-submit-btn,
    .mystery-transmission-button {
        padding: clamp(0.8rem, 2.5vw, 1rem) clamp(1.5rem, 4vw, 2rem);
        border-radius: clamp(6px, 1.5vw, 8px);
        font-size: 16px;
    }
    
    .neon-footer {
        padding: clamp(0.8rem, 2vw, 1rem);
    }
    
    .social-links a {
        font-size: clamp(1rem, 3vw, 1.2rem);
        min-width: 40px;
        min-height: 40px;
    }
    
    .neon-title {
        letter-spacing: 0.02em;
    }
    
    .teaser {
        line-height: 1.6;
    }
}

@media (max-width: 320px) {
    .container {
        padding: clamp(0.5rem, 2vw, 0.8rem);
    }
    
    .login-form,
    .access-request-form,
    .audio-control-widget {
        padding: clamp(1rem, 2.5vw, 1.2rem);
        margin: 0;
        border-radius: 10px;
    }
    
    .neon-title {
        margin-bottom: clamp(1rem, 3vw, 1.5rem);
    }
    
    .teaser {
        margin-bottom: clamp(1.5rem, 3vw, 2rem);
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        min-height: auto;
        padding: clamp(0.8rem, 2vh, 1rem) clamp(1rem, 3vw, 2rem);
    }
    
    .neon-title {
        margin-bottom: clamp(0.8rem, 2vh, 1rem);
        font-size: clamp(1.2rem, 4vh, 2rem);
    }
    
    .teaser {
        margin-bottom: clamp(1rem, 2vh, 1.5rem);
        font-size: clamp(0.8rem, 2vh, 1rem);
    }
    
    .login-form,
    .access-request-form,
    .audio-control-widget {
        padding: clamp(1rem, 2vh, 1.5rem);
    }
    
    .features-preview {
        margin-top: clamp(1.5rem, 3vh, 2rem);
    }
    
    .feature-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(0.8rem, 2vw, 1rem);
    }
    
    .feature-card {
        padding: clamp(1rem, 2vh, 1.5rem);
        min-height: 100px;
    }
}

/* High Contrast & Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-elements,
    .smoke,
    .lasers {
        display: none !important;
    }
    
    .background-gradient {
        animation: none !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --primary-orange: #FFAA00;
        --electric-blue: #0099FF;
        --pure-white: #FFFFFF;
        --pure-black: #000000;
    }
    
    .login-form,
    .access-request-form,
    .audio-control-widget {
        border-width: 3px;
        background: rgba(0, 0, 0, 0.9);
    }
    
    input {
        border-width: 3px;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .feature-card {
        border-width: 2px;
        background: rgba(0, 0, 0, 0.9);
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
    
    .container {
        min-height: calc(var(--vh, 1vh) * 100);
    }
    
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on focus */
        -webkit-appearance: none;
        -webkit-border-radius: 0;
    }
    
    .void-button,
    .access-submit-btn,
    .mystery-transmission-button {
        font-size: 16px; /* Prevents zoom on focus */
        -webkit-appearance: none;
    }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm) {
    input {
        background-clip: padding-box;
    }
}

/* Print Styles */
@media print {
    .background-gradient,
    .video-background,
    .smoke,
    .lasers,
    #background-canvas,
    .floating-elements,
    .loading-screen {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
        overflow: visible;
    }
    
    .neon-title,
    .teaser {
        color: black;
        text-shadow: none;
    }
    
    .login-form,
    .access-request-form,
    .audio-control-widget {
        background: white;
        border: 2px solid black;
    }
    
    input {
        background: white;
        border: 1px solid black;
        color: black;
    }
    
    .feature-card {
        background: white;
        border: 1px solid black;
    }
}

/* Performance optimizations */
@media (max-width: 768px) {
    .background-video {
        opacity: 0.2;
        filter: brightness(0.5);
    }
    
    .background-gradient {
        animation: none;
    }
    
    .lasers {
        display: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark theme */
}

/* Light mode fallback */
@media (prefers-color-scheme: light) {
    :root {
        --warehouse-gray: #2a2a2a;
        --dark-gray: #1a1a1a;
    }
}
