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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0a0515 0%, #1a0a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow: hidden;
}

.header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(90deg, #ff6b35 0%, #ff8c42 100%);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
    position: relative;
    z-index: 10;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

.main-container {
    position: relative;
    height: calc(100vh - 120px);
    width: 100%;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 107, 53, 0.05) 0%, rgba(10, 5, 20, 0.9) 70%);
}

.control-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(20, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 107, 53, 0.2);
    min-width: 320px;
}

.control-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.mic-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    min-width: 150px;
}

.mic-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.mic-button.active {
    background: linear-gradient(135deg, #ff3030 0%, #ff6b35 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(255, 48, 48, 0.4); }
    50% { box-shadow: 0 6px 25px rgba(255, 48, 48, 0.8); }
}

.mic-icon {
    font-size: 1.3rem;
}

.audio-level {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.level-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff88 0%, #ff6b35 50%, #ff3030 100%);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 4px;
}

.knob-container {
    display: flex;
    gap: 30px;
    justify-content: center;
}

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

.knob-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ff8c42;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.knob {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a1f3d 0%, #1a0a2e 100%);
    border: 3px solid #ff6b35;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 2px 5px rgba(255, 107, 53, 0.1);
    transition: all 0.2s ease;
}

.knob:hover {
    border-color: #ff8c42;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4), inset 0 2px 5px rgba(255, 107, 53, 0.2);
}

.knob-indicator {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 3px;
    height: 20px;
    background: #ff6b35;
    border-radius: 2px;
    transform-origin: center 22px;
    transform: translateX(-50%) rotate(-135deg);
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.6);
}

.knob-value {
    font-size: 0.8rem;
    color: #cccccc;
    font-weight: 500;
}

.mode-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mode-selector label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ff8c42;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-selector select {
    background: rgba(42, 31, 61, 0.8);
    color: white;
    border: 2px solid #ff6b35;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
}

.mode-selector select:focus {
    border-color: #ff8c42;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}

.color-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-selector label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ff8c42;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: rgba(42, 31, 61, 0.6);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: #ff6b35;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.5);
}

.permission-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 5, 20, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.banner-content {
    background: linear-gradient(135deg, #2a1f3d 0%, #1a0a2e 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.banner-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #ff8c42;
}

.banner-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

.enable-btn, .demo-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.enable-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.enable-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.demo-btn {
    background: transparent;
    color: #ff8c42;
    border: 2px solid #ff6b35;
}

.demo-btn:hover {
    background: rgba(255, 107, 53, 0.1);
}

.footer {
    position: fixed;
    bottom: 10px;
    left: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
    z-index: 10;
}

.footer a {
    color: #ff8c42;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .control-panel {
        bottom: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        padding: 20px;
    }
    
    .knob-container {
        gap: 20px;
    }
    
    .knob {
        width: 50px;
        height: 50px;
    }
    
    .knob-indicator {
        height: 15px;
        transform-origin: center 17px;
    }
    
    .banner-content {
        margin: 20px;
        padding: 30px;
    }
    
    .banner-content h3 {
        font-size: 1.5rem;
    }
    
    .banner-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .control-grid {
        gap: 15px;
    }
    
    .knob-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .color-buttons {
        gap: 8px;
    }
    
    .color-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}