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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.controls {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    min-width: 280px;
    max-width: 320px;
    transition: all 0.3s ease;
}

.controls-toggle {
    display: none;
    position: fixed;
    top: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    color: #00ff88;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 101;
    backdrop-filter: blur(10px);
}

.controls-toggle:hover {
    background: rgba(0, 255, 136, 0.2);
}

.controls.collapsed {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.control-sections {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    font-size: 14px;
    font-weight: bold;
    color: #00ff88;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.controls-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.controls-row:last-child {
    margin-bottom: 0;
}

.color-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.color-control {
    text-align: center;
}

.color-control label {
    font-size: 10px;
    margin-bottom: 5px;
}

.control-group {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slider-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.slider-value {
    font-size: 11px;
    color: #00ff88;
    text-align: center;
    font-weight: bold;
}

.slider {
    width: 100%;
    height: 6px;
    background: #333;
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #00ff88;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 255, 136, 0.3);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #00ff88;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 255, 136, 0.3);
}

.color-input {
    width: 100%;
    height: 35px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.mic-button {
    width: 100%;
    padding: 12px;
    background: #00ff88;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.mic-button:hover {
    background: #00dd77;
}

.mic-button.active {
    background: #ff4444;
    color: #fff;
}

.info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #888;
    font-size: 12px;
    max-width: 300px;
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.back-button:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: scale(1.05);
    color: #00ff88;
}

.mobile-mic-btn {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #00ff88;
    color: #000;
    border: none;
    border-radius: 30px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.4);
    transition: all 0.3s ease;
}

.mobile-mic-btn:hover {
    background: #00dd77;
    transform: translateX(-50%) scale(1.05);
}

@media (max-width: 768px) {
    .mobile-mic-btn {
        display: block;
    }

    .controls {
        position: fixed;
        top: 20px;
        left: 20px;
        right: 20px;
        bottom: auto;
        max-width: none;
        min-width: auto;
        width: calc(100% - 40px);
        max-height: 70vh;
        overflow-y: auto;
        padding: 15px;
    }

    .controls-toggle {
        display: flex;
        top: 20px;
        right: 20px;
    }

    .control-sections {
        gap: 10px;
    }

    .control-section {
        padding: 12px;
    }

    .controls-row {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 10px;
    }

    .color-controls {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .color-control {
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
    }

    .color-control label {
        margin-bottom: 0;
        min-width: 80px;
    }

    .color-input {
        height: 40px;
        min-width: 60px;
    }

    .slider {
        height: 8px;
    }

    .slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }

    .slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }

    .mic-button {
        width: 100%;
        height: 50px;
        font-size: 1.1rem;
        margin-top: 10px;
    }

    .info {
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        max-width: none;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        padding: 15px;
        font-size: 11px;
    }

    .back-button {
        top: 20px;
        left: auto;
        right: 80px;
    }
}
