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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #f0f0f0;
    min-height: 100vh;
    overflow-x: hidden;
}

.header {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.header h1 {
    font-size: 2.5em;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: #00FFFF;
    margin-bottom: 20px;
    font-style: italic;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.controls select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.5);
    color: #f0f0f0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    backdrop-filter: blur(5px);
}

.controls select:focus {
    outline: none;
    border-color: #00FFFF;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.main-container {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.left-panel, .right-panel {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.panel h3 {
    color: #FFD700;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.1em;
}

#canvas {
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}

button {
    background: linear-gradient(45deg, rgba(0, 255, 255, 0.2), rgba(255, 215, 0, 0.2));
    border: 1px solid rgba(0, 255, 255, 0.5);
    color: #f0f0f0;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

button:hover {
    background: linear-gradient(45deg, rgba(0, 255, 255, 0.4), rgba(255, 215, 0, 0.4));
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.slider-group {
    margin: 15px 0;
}

.slider-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #f0f0f0;
}

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

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00FFFF, #FFD700);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00FFFF, #FFD700);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.shape-selector select {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.5);
    color: #f0f0f0;
    padding: 8px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.virtual-piano {
    position: relative;
    height: 120px;
    margin: 10px 0;
}

.piano-key {
    position: absolute;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 5px;
    font-size: 10px;
    font-weight: bold;
    user-select: none;
    transition: all 0.1s ease;
}

.white-key {
    width: 28px;
    height: 80px;
    background: linear-gradient(to bottom, #fff 0%, #f0f0f0 100%);
    border: 1px solid #ccc;
    color: #333;
    border-radius: 0 0 4px 4px;
}

.white-key:nth-child(1) { left: 0; }
.white-key:nth-child(2) { left: 30px; }
.white-key:nth-child(3) { left: 60px; }
.white-key:nth-child(4) { left: 90px; }
.white-key:nth-child(5) { left: 120px; }
.white-key:nth-child(6) { left: 150px; }
.white-key:nth-child(7) { left: 180px; }

.black-key {
    width: 20px;
    height: 50px;
    background: linear-gradient(to bottom, #333 0%, #000 100%);
    border: 1px solid #000;
    color: #fff;
    z-index: 2;
    border-radius: 0 0 2px 2px;
}

.piano-key:active, .piano-key.active {
    transform: scale(0.95);
}

.white-key:active, .white-key.active {
    background: linear-gradient(to bottom, #e0e0e0 0%, #d0d0d0 100%);
}

.black-key:active, .black-key.active {
    background: linear-gradient(to bottom, #555 0%, #222 100%);
}

.chord-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.chord-btn {
    padding: 8px 12px;
    font-size: 12px;
}

#theoryInfo {
    font-size: 13px;
    line-height: 1.6;
}

#theoryInfo p {
    margin-bottom: 8px;
}

#theoryInfo strong {
    color: #00FFFF;
}

@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
        align-items: center;
    }
    
    .left-panel, .right-panel {
        width: 100%;
        max-width: 800px;
        flex-direction: row;
        overflow-x: auto;
    }
    
    .panel {
        min-width: 250px;
        flex-shrink: 0;
    }
    
    #canvas {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .controls select {
        width: 200px;
    }
    
    .left-panel, .right-panel {
        flex-direction: column;
    }
    
    #canvas {
        width: 100%;
        max-width: 600px;
    }
}