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

body {
    font-family: 'Orbitron', 'Rajdhani', 'Roboto', sans-serif;
    background: #000;
    color: #00ffff;
    min-height: 100vh;
    padding: 20px;
    background-image: linear-gradient(to bottom, #000000, #001119, #001829, #001d32, #092137);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 50, 80, 0.15),
        rgba(0, 50, 80, 0.15) 2px,
        transparent 2px,
        transparent 4px
    );
    pointer-events: none;
    z-index: 1;
}

.main-container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(0, 20, 40, 0.5);
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    padding: 30px;
    position: relative;
    z-index: 2;
    transition: box-shadow 0.3s ease;
}

.main-container.pulse {
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
    animation: pulse 1.5s infinite alternate;
}

.init-animation {
    animation: init-glow 0.3s ease-in-out;
}

@keyframes init-glow {
    0% {
        transform: scale(0.98);
        box-shadow: 0 0 0 rgba(0, 255, 255, 0);
    }
    50% {
        transform: scale(1.01);
        box-shadow: 0 0 50px rgba(0, 255, 255, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    }
}

@keyframes pulse {
    from {
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    }
    to {
        box-shadow: 0 0 50px rgba(0, 255, 255, 0.7);
    }
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
}

h1 {
    color: #00ffff;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
    letter-spacing: 3px;
    text-transform: uppercase;
}

h2 {
    color: #00ffff;
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-shadow: 0 0 5px #00ffff;
    letter-spacing: 1px;
}

.app-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    letter-spacing: 1px;
}

/* Controls Panel */
.controls-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: rgba(0, 30, 60, 0.5);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1) inset;
}

.tempo-control, .style-control, .instrument-controls {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #00ffff;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

input[type="range"] {
    width: 100%;
    margin-bottom: 10px;
    height: 4px;
    background: rgba(0, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

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

#tempo-value {
    color: #00ffff;
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    text-shadow: 0 0 5px #00ffff;
}

select {
    width: 100%;
    padding: 8px;
    background: rgba(0, 20, 40, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    border-radius: 5px;
    font-family: 'Rajdhani', sans-serif;
    cursor: pointer;
    outline: none;
}

select option {
    background: #001829;
    color: #00ffff;
}

/* Instrument Toggles */
.instrument-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.toggle {
    display: flex;
    align-items: center;
    background: rgba(0, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.toggle:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.toggle input {
    margin-right: 8px;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #00ffff;
    outline: none;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.toggle input:checked {
    background: #00ffff;
    box-shadow: 0 0 10px #00ffff;
}

.toggle input:checked + .toggle-label {
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
}

.toggle-label {
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
    font-weight: 500;
}

/* Chord Progression */
.chord-progression-container {
    margin-bottom: 30px;
    background: rgba(0, 30, 60, 0.5);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1) inset;
}

.chord-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    min-height: 100px;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    box-shadow: inset 0 0 5px rgba(0, 255, 255, 0.1);
}

.chord-box {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 30, 60, 0.5);
    border: 2px solid #00ffff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.chord-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.chord-box .chord-root {
    font-size: 2.5rem;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 2px;
    text-shadow: 0 0 5px #00ffff;
    font-family: 'Orbitron', monospace;
    line-height: 1;
}

.chord-box .chord-type {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    display: block;
    text-align: center;
    min-height: 25px;
    line-height: 1;
    margin-top: 5px;
    text-shadow: 0 0 3px #00ffff;
}

.chord-box.playing {
    background: rgba(0, 60, 100, 0.8);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
    z-index: 10;
    border-color: #00ffff;
}

.chord-box.playing .chord-root {
    color: #fff;
    text-shadow: 0 0 10px #fff, 0 0 15px #00ffff;
    transform: scale(1.1);
}

.chord-box.playing .chord-type {
    color: #fff;
    text-shadow: 0 0 10px #fff, 0 0 15px #00ffff;
}

.add-chord-btn {
    width: 90px;
    height: 90px;
    border: 3px dashed rgba(0, 255, 255, 0.5);
    background: rgba(0, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 2.5rem;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 0 5px #00ffff;
}

.add-chord-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.delete-chord {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255, 50, 50, 0.9);
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s, transform 0.2s;
    box-shadow: 0 0 10px rgba(255, 50, 50, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    z-index: 20;
}

.chord-box:hover .delete-chord {
    opacity: 1;
    transform: scale(1.1);
}

/* Number indicators for chord sequence */
.chord-box::before {
    content: attr(data-index);
    position: absolute;
    top: -10px;
    left: -10px;
    width: 24px;
    height: 24px;
    background-color: #092137;
    color: #00ffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 2px solid #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    font-family: 'Orbitron', monospace;
}

/* Playback Controls */
.playback-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.control-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Rajdhani', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.play-btn {
    background: rgba(0, 200, 100, 0.2);
    color: #00ff99;
    text-shadow: 0 0 5px #00ff99;
    border-color: rgba(0, 255, 150, 0.3);
}

.stop-btn {
    background: rgba(200, 0, 0, 0.2);
    color: #ff6666;
    text-shadow: 0 0 5px #ff6666;
    border-color: rgba(255, 100, 100, 0.3);
}

.clear-btn {
    background: rgba(100, 100, 100, 0.2);
    color: #cccccc;
    text-shadow: 0 0 5px #cccccc;
    border-color: rgba(200, 200, 200, 0.3);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.play-btn:hover {
    box-shadow: 0 0 15px rgba(0, 255, 150, 0.4);
}

.stop-btn:hover {
    box-shadow: 0 0 15px rgba(255, 100, 100, 0.4);
}

.icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* Preset Section */
.preset-section {
    margin-bottom: 20px;
    background: rgba(0, 30, 60, 0.5);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1) inset;
}

.preset-section select {
    color: #00ffff;
    border-color: rgba(0, 255, 255, 0.3);
    font-size: 1rem;
}

/* Chord Dialog */
.chord-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(5px);
}

.chord-dialog.open {
    opacity: 1;
    visibility: visible;
}

.dialog-content {
    background: rgba(0, 20, 40, 0.8);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.chord-dialog.open .dialog-content {
    transform: scale(1);
}

.dialog-content h3 {
    margin-bottom: 25px;
    color: #00ffff;
    text-align: center;
    font-size: 1.8rem;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    padding-bottom: 15px;
    text-shadow: 0 0 10px #00ffff;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.chord-dialog .chord-root, 
.chord-dialog .chord-type {
    margin-bottom: 25px;
}

.chord-dialog label {
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: block;
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
}

.root-buttons, .type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.root-buttons button, .type-buttons button {
    padding: 12px 15px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    background: rgba(0, 30, 60, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.1rem;
    min-width: 60px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Rajdhani', sans-serif;
}

.root-buttons button:hover, .type-buttons button:hover {
    border-color: #00ffff;
    background: rgba(0, 60, 100, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    color: #fff;
}

.root-buttons button.selected, .type-buttons button.selected {
    background: rgba(0, 255, 255, 0.3);
    color: #fff;
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    transform: scale(1.05);
    text-shadow: 0 0 5px #fff;
}

.dialog-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 20px;
}

.dialog-buttons button {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#cancel-chord {
    background: rgba(100, 100, 100, 0.2);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#confirm-chord {
    background: rgba(0, 100, 200, 0.2);
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.dialog-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        padding: 15px;
    }
    
    .controls-panel {
        flex-direction: column;
    }
    
    .tempo-control, .style-control, .instrument-controls {
        width: 100%;
    }
    
    .chord-box, .add-chord-btn {
        width: 80px;
        height: 80px;
    }
    
    .chord-box .chord-root {
        font-size: 1.6rem;
    }
    
    .chord-box .chord-type {
        font-size: 0.8rem;
    }
    
    .playback-controls {
        flex-wrap: wrap;
    }
    
    .control-btn {
        flex: 1;
        min-width: 120px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 2rem;
    }
}

/* Chord display styling */
.chord-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
} 
@media (min-width: 1800px) {
    .main-container {
        max-width: 2000px;
        margin: 0 auto;
        background: rgba(0, 20, 40, 0.5);
        border-radius: 15px;
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
        border: 1px solid rgba(0, 255, 255, 0.3);
        backdrop-filter: blur(5px);
        padding: 30px;
        position: relative;
        z-index: 2;
        transition: box-shadow 0.3s ease;
        height: 1000px;
    }
}