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

body {
    background: #0a0012;
    overflow: hidden;
    font-family: 'Fredoka', sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

#canvas {
    display: block;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

#controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(10, 0, 18, 0.85);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 225, 53, 0.2);
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 100;
}

#controls.hidden {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

#mic-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #FFE135 0%, #FFB800 100%);
    border: none;
    border-radius: 30px;
    color: #1a0a2e;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 225, 53, 0.3), inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all 0.2s ease;
}

#mic-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 225, 53, 0.5);
}

#mic-btn.active {
    background: linear-gradient(135deg, #FF1493 0%, #FF6B35 100%);
    color: #fff;
    box-shadow: 0 0 25px rgba(255, 20, 147, 0.4);
}

.mic-icon {
    font-size: 18px;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.control-group label {
    color: rgba(255, 225, 53, 0.6);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#mode-btn {
    padding: 8px 16px;
    background: rgba(255, 225, 53, 0.1);
    border: 1px solid rgba(255, 225, 53, 0.3);
    border-radius: 20px;
    color: #FFE135;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#mode-btn:hover {
    background: rgba(255, 225, 53, 0.2);
    border-color: rgba(255, 225, 53, 0.5);
}

#sensitivity {
    width: 100px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 225, 53, 0.15);
    border-radius: 3px;
    outline: none;
}

#sensitivity::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFE135;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 225, 53, 0.4);
}

#sensitivity::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFE135;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(255, 225, 53, 0.4);
}

#screenshot-btn, #fullscreen-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 225, 53, 0.3);
    background: rgba(255, 225, 53, 0.1);
    color: #FFE135;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#screenshot-btn:hover, #fullscreen-btn:hover {
    background: rgba(255, 225, 53, 0.25);
    transform: scale(1.1);
}

#permission-msg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 0, 18, 0.9);
    z-index: 200;
}

#permission-msg.hidden {
    display: none;
}

.perm-content {
    text-align: center;
    padding: 40px;
}

.perm-banana {
    font-size: 80px;
    display: block;
    margin-bottom: 20px;
    animation: sadBounce 2s ease-in-out infinite;
}

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

.perm-content p {
    color: #FFE135;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
}

#retry-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #FFE135, #FFB800);
    border: none;
    border-radius: 25px;
    color: #1a0a2e;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 225, 53, 0.3);
}

#footer-link {
    position: fixed;
    bottom: 70px;
    right: 12px;
    z-index: 50;
    opacity: 0.4;
    transition: opacity 0.3s;
}

#footer-link:hover {
    opacity: 0.8;
}

#footer-link a {
    color: #FFE135;
    font-size: 11px;
    text-decoration: none;
    font-family: 'Fredoka', sans-serif;
}

@media (max-width: 600px) {
    #controls {
        gap: 10px;
        padding: 10px 12px;
    }
    #mic-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    .mic-label {
        display: none;
    }
    #mode-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    #sensitivity {
        width: 70px;
    }
    .control-group label {
        font-size: 9px;
    }
}