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

body {
    font-family: 'Bricolage Grotesque', sans-serif;
    background: linear-gradient(180deg, #000002 0%, #020206 30%, #010103 100%);
    overflow: hidden;
    color: white;
}

#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 15px 20px;
    background: linear-gradient(180deg, rgba(10,10,26,0.9) 0%, transparent 100%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.header h1 {
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255,107,107,0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: brightness(1); }
    to { filter: brightness(1.2); }
}

.header .emoji {
    -webkit-text-fill-color: initial;
}

.tagline {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.6rem, 2vw, 0.85rem);
    color: #888;
    margin-top: 4px;
}

.fog-meter {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.meter-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: #6bcb77;
    letter-spacing: 1px;
}

.meter-bar {
    width: 80px;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.meter-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #6bcb77, #4ecdc4);
    border-radius: 4px;
}

.meter-value {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: #6bcb77;
    font-weight: 700;
}

.karl-container {
    position: relative;
}

.karl {
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    filter: grayscale(0.5);
    animation: karlSad 3s ease-in-out infinite;
}

@keyframes karlSad {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(2px) rotate(-5deg); }
}

.karl:hover {
    transform: scale(1.2) !important;
}

.karl-tear {
    position: absolute;
    right: -5px;
    top: 50%;
    font-size: 0.6rem;
    animation: tearDrop 2s ease-in-out infinite;
}

@keyframes tearDrop {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(10px); }
}

.countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,107,107,0.1);
    padding: 8px 20px;
    border-radius: 15px;
    border: 1px solid rgba(255,107,107,0.3);
}

.countdown-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    color: #ff6b6b;
    letter-spacing: 2px;
}

.countdown-time {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 700;
    color: #ffd93d;
}

#controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 15px 20px;
    background: linear-gradient(0deg, rgba(10,10,26,0.95) 0%, transparent 100%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.launch-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 30px rgba(255,107,107,0.5), inset 0 -3px 0 rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.launch-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(255,107,107,0.7), inset 0 -3px 0 rgba(0,0,0,0.2);
}

.launch-btn:active {
    transform: scale(0.95);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: #888;
    letter-spacing: 1px;
}

.control-group select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 8px;
    color: white;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.control-group select:focus {
    outline: none;
    border-color: #ff6b6b;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
}

.toggle-label input {
    display: none;
}

.toggle-slider {
    width: 40px;
    height: 22px;
    background: rgba(255,255,255,0.2);
    border-radius: 11px;
    position: relative;
    transition: background 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.toggle-label input:checked + .toggle-slider {
    background: #6bcb77;
}

.toggle-label input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

.slider-group input[type="range"] {
    width: 100px;
    height: 6px;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #ffd93d, #ff6b6b);
    border-radius: 50%;
    cursor: pointer;
}

.sound-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sound-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.fog-creep {
    position: fixed;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 40%;
    background: linear-gradient(90deg, rgba(200,200,220,0.4) 0%, transparent 100%);
    z-index: 5;
    pointer-events: none;
    transition: left 2s ease-in-out;
    filter: blur(20px);
}

.fog-creep.active {
    left: -20%;
}

.fog-creep.shoo {
    left: -150%;
    transition: left 0.5s ease-out;
}

#footer {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    display: flex;
    gap: 20px;
    align-items: center;
}

#footer a {
    color: #ff6b6b;
    text-decoration: none;
    transition: color 0.2s ease;
}

#footer a:hover {
    color: #ffd93d;
}

@media (max-width: 768px) {
    #overlay {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .fog-meter {
        display: none;
    }
    
    #controls {
        padding: 10px;
        gap: 10px;
    }
    
    .launch-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .slider-group {
        display: none;
    }
    
    #footer {
        bottom: 70px;
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}