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

body {
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    background: #000;
    color: #00ffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(to bottom, #000000, #001119, #001829, #001d32, #092137);
    position: relative;
    padding: 20px;
    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 for layout */
.main-container {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    width: 100%;
    align-items: flex-start;
    padding: 0 20px;
    min-height: min-content;
}

/* Adjust container for new layout */
.container {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 20px;
    flex: 0 0 60%;
    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);
    transition: box-shadow 0.15s ease;
}

.container.pulse {
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
}

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

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: #00ffff;
    box-shadow: 0 0 10px #00ffff;
}

.drum-kit {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.drum-pad {
    aspect-ratio: 1/1;
    border: 2px solid #00ffff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 30, 60, 0.5);
    transition: all 0.1s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3) inset;
}

.drum-pad::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid #00ffff;
    border-radius: 12px;
    opacity: 0;
    transition: all 0.2s ease;
}

.drum-pad:hover::before {
    opacity: 0.5;
}

.playing {
    transform: scale(0.95);
    border-color: #00ffff;
    box-shadow: 0 0 25px #00ffff, 0 0 15px #00ffff inset;
    background: rgba(0, 60, 100, 0.8);
}

.key {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: white;
    text-shadow: 0 0 10px #00ffff;
}

.sound {
    font-size: 0.85rem;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

.instructions {
    font-size: 1.2rem;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
    background: rgba(0, 20, 40, 0.5);
    padding: 10px 20px;
    border-radius: 30px;
    display: inline-block;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

/* 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;
    width: 100px;
    height: 100px;
    margin-left: -50px;
    margin-top: -50px;
}

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

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

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

/* Side Panel Styles */
.side-panel {
    width: 40%;
    min-width: 350px;
    background: rgba(0, 20, 40, 0.5);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}

.side-panel h2 {
    color: #00ffff;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-shadow: 0 0 5px #00ffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Control Section Styles */
.control-section {
    margin-bottom: 30px;
}

.tempo-control, .volume-control {
    margin-bottom: 20px;
}

.tempo-control label, .volume-control label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.tempo-slider, .volume-slider {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="range"] {
    flex: 1;
    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, .volume-value {
    min-width: 50px;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
}

/* Pattern Controls */
.pattern-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.control-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-weight: bold;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.btn-icon {
    font-size: 0.9rem;
}

/* Pattern Grid */
.pattern-grid {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

.grid-labels {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    min-width: 80px;
    position: sticky;
    left: 0;
    z-index: 5;
}

.grid-label {
    font-size: 0.75rem;
    min-width: 80px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Orbitron', sans-serif;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0 5px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(16, minmax(12px, 0.5fr));
    grid-template-rows: repeat(4, 30px);
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.grid-cell {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 12px;
}

.grid-cell:nth-child(4n+1) {
    border-left: 2px solid rgba(0, 255, 255, 0.3);
}

.grid-cell.active {
    background: rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

/* Preset Section */
.preset-section 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;
}

.preset-section select option {
    background: #001829;
    color: #00ffff;
}

/* Responsive Design */
@media (max-width: 1200px) {
    body {
        align-items: flex-start;
        padding: 20px 10px;
        min-height: 100vh;
        height: auto;
    }

    .main-container {
        flex-direction: column;
        align-items: center;
        padding: 0;
        margin-bottom: 20px;
    }

    .container {
        flex: 0 0 100%;
        margin-bottom: 20px;
        width: 100%;
    }

    .side-panel {
        width: 100%;
        min-width: unset;
        max-width: 600px;
    }

    .pattern-grid {
        flex-direction: row;
    }

    .grid-labels {
        flex-direction: column;
        margin-bottom: 0;
        gap: 4px;
    }

    .grid-label {
        flex: 0 0 auto;
        min-width: 80px;
        height: 30px;
        font-size: 0.7rem;
    }

    .grid-container {
        grid-template-columns: repeat(16, minmax(12px, 0.5fr));
        grid-template-rows: repeat(4, 30px);
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .main-container {
        gap: 20px;
    }

    .drum-kit {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .key {
        font-size: 1.8rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .sound {
        font-size: 0.7rem;
    }

    .instructions {
        display: none;
    }

    .pattern-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .control-btn {
        min-width: 100px;
    }

    .grid-container {
        grid-template-rows: repeat(4, 25px);
        grid-template-columns: repeat(16, minmax(10px, 0.5fr));
    }

    .pattern-grid {
        padding: 10px;
        gap: 8px;
    }
    
    .grid-label {
        height: 25px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px 5px;
    }

    .main-container {
        gap: 15px;
    }

    .container, .side-panel {
        padding: 15px 10px;
    }

    .grid-container {
        grid-template-rows: repeat(4, 20px);
        grid-template-columns: repeat(16, minmax(9px, 0.5fr));
        gap: 2px;
    }
    
    .grid-label {
        height: 20px;
        font-size: 0.6rem;
    }
} 
@media (min-width: 1800px) {
    .main-container{
        display: flex;
    gap: 30px;
    max-width: 10000px;
    width: 100%;
    align-items: flex-start;
    padding: 0 20px;
    min-height: min-content;
    }
    .drum-kit {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 2rem;
        max-width: 1000px;
        margin: 0 auto 2rem;
    }
    
}