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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    color: black;
    line-height: 1.4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 40px;
}

.left-side, .right-side {
    flex: 1;
}

.right-side {
    text-align: right;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.right-side header {
    text-align: center;
}

header h1 {
    font-size: 3rem;
    color: black;
    margin-bottom: 10px;
}

header h1.mirror {
    transform: scaleX(-1);
}

header p {
    color: black;
    font-size: 1.1rem;
}

.controls {
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
}

.transport {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.right-side .transport {
    flex-direction: row-reverse;
}

.btn {
    padding: 12px 24px;
    border: 1px solid #333;
    border-radius: 3px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: white;
    color: black;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background: #f0f0f0;
}

.btn-primary {
    background: black;
    color: white;
}

.btn-primary:hover {
    background: #333;
}

.btn-secondary {
    background: white;
    color: black;
}

.btn-secondary:hover {
    background: #f0f0f0;
}

.btn.mirror {
    transform: scaleX(-1);
}

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

.tempo-control.mirror {
    transform: scaleX(-1);
}

.tempo-control label {
    color: black;
    font-weight: 600;
}

.tempo-control label.mirror {
    transform: scaleX(-1);
}

.tempo-control input[type="range"] {
    width: 150px;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.tempo-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: black;
    cursor: pointer;
    border: 1px solid #333;
}

.tempo-control input[type="range"].mirror {
    transform: scaleX(-1);
}

.sequencer {
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.sequencer-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.track-label-header {
    width: 80px;
    height: 40px;
}

.step-indicators-container {
    display: flex;
    flex: 1;
    gap: 4px;
}

.step-indicator {
    flex: 1;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: black;
    border-radius: 3px;
    background: #f5f5f5;
    border: 1px solid #ccc;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    min-width: 0;
}

.step-indicator.active {
    background: black;
    color: white;
}

.step-indicator.palindrome {
    background: #f5f5f5;
    color: black;
    border: 1px solid #ccc;
}

.step-indicator.mirror {
    transform: scaleX(-1);
}

.tracks {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.track {
    display: flex;
    align-items: center;
    height: 50px;
    gap: 10px;
}

.track-label {
    width: 80px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: black;
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.9rem;
}

.track-label.mirror {
    transform: scaleX(-1);
}

.track-steps {
    display: flex;
    flex: 1;
    gap: 4px;
}

.step {
    flex: 1;
    height: 40px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 0;
}

.step:hover {
    background: #f0f0f0;
}

.step.active {
    background: black;
    border-color: black;
    color: white;
}



.step.palindrome {
    background: white;
    border-color: #ccc;
}

.step.palindrome:hover {
    background: #f0f0f0;
}

.step.palindrome.active {
    background: black;
    border-color: black;
    color: white;
}

/* Column highlighting */
.step.current-column {
    background: #e0e0e0;
    border-color: #666;
}

.step.current-column.active {
    background: #444;
    border-color: #444;
    color: white;
}

.step.palindrome.current-column {
    background: #e0e0e0;
    border-color: #666;
}

.step.palindrome.current-column.active {
    background: #444;
    border-color: #444;
    color: white;
}

.step-indicator.current-column {
    background: #e0e0e0;
    border-color: #666;
}

.step-indicator.current-column.active {
    background: #444;
    color: white;
}

.step-indicator.palindrome.current-column {
    background: #e0e0e0;
    border-color: #666;
}

.step-indicator.palindrome.current-column.active {
    background: #444;
    color: white;
}

.info {
    text-align: center;
    color: black;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header-section {
        flex-direction: row;
        gap: 10px;
    }
    
    .left-side, .right-side {
        flex: 1;
    }
    
    .right-side {
        text-align: center;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .transport {
        flex-direction: column;
        gap: 10px;
    }
    
    .right-side .transport {
        flex-direction: column;
    }
    
    .sequencer {
        padding: 15px;
    }
    
    .track-label {
        width: 60px;
        font-size: 0.8rem;
    }
    
    .track-label-header {
        width: 60px;
    }
    
    .step-indicator {
        height: 30px;
        font-size: 0.7rem;
    }
    
    .track {
        height: 40px;
    }
    
    .step {
        height: 30px;
    }
}

/* Animation for playing state */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.playing .step.active {
    animation: pulse 0.5s ease-in-out;
} 