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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
}

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

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.ui-overlay > * {
    pointer-events: auto;
}

.top-panel {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-panel h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #4a90e2, #ff3366);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.player-leds {
    display: flex;
    gap: 8px;
}

.led {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #333;
    border: 1px solid #555;
    cursor: pointer;
    transition: all 0.3s ease;
}

.led.active {
    background: #4a90e2;
    box-shadow: 0 0 10px #4a90e2;
}

.left-panel, .right-panel {
    position: absolute;
    top: 100px;
    width: 250px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.left-panel {
    left: 20px;
}

.right-panel {
    right: 20px;
}

.control-section {
    margin-bottom: 25px;
}

.control-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #4a90e2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.theme-btn {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.theme-btn.active {
    background: #4a90e2;
    border-color: #4a90e2;
}

#haptic-slider {
    width: 100%;
    margin-bottom: 5px;
    accent-color: #4a90e2;
}

#haptic-value {
    font-size: 0.9rem;
    color: #aaa;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.test-button {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
    font-size: 0.9rem;
}

.test-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.test-button.pressed {
    background: #4a90e2;
    transform: scale(0.95);
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.battery-indicator {
    width: 60px;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.battery-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff3366, #ffeb3b, #4caf50);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.status.connected {
    color: #4caf50;
}

.input-display {
    font-size: 0.9rem;
}

.stick-display, .trigger-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.setting-item {
    margin-bottom: 10px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.setting-item input[type="checkbox"] {
    accent-color: #4a90e2;
}

.setting-item button {
    width: 100%;
    padding: 8px;
    background: #4a90e2;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.setting-item button:hover {
    background: #357abd;
    transform: translateY(-2px);
}

.bottom-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px 25px;
    text-align: center;
    max-width: 600px;
}

.easter-egg-hint {
    font-size: 0.8rem;
    color: #ff3366;
    margin-bottom: 5px;
}

.info-text {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 8px;
}

.footer-link a {
    color: #4a90e2;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.footer-link a:hover {
    color: #ff3366;
}

/* Animations */
@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .left-panel, .right-panel {
        width: 200px;
        font-size: 0.8rem;
    }
    
    .top-panel h1 {
        font-size: 1.2rem;
    }
    
    .bottom-panel {
        max-width: 90%;
        padding: 10px 15px;
    }
    
    .button-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .left-panel {
        left: 10px;
        width: 180px;
    }
    
    .right-panel {
        right: 10px;
        width: 180px;
    }
    
    .top-panel {
        flex-direction: column;
        gap: 10px;
    }
}

/* Custom scrollbar */
.left-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar {
    width: 6px;
}

.left-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.left-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 3px;
}