/* Sequence Stack (Right Edge) */
#sequencer-panel {
    position: relative;
    display: flex;
    flex-direction: row;
    /* Change to row to accommodate stack */
    flex-wrap: wrap;
    /* Allow wrapping for header */
    align-content: flex-start;
}

#sequencer-panel h2 {
    width: 100%;
    /* Header takes full width */
}

#sequencer-grid {
    flex: 1;
    /* Grid takes remaining space */
    min-width: 0;
    /* Prevent overflow */
}

.sequence-stack {
    width: 60px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0 10px 10px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    margin-left: 10px;
}

.sequence-card {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: #777;
    transition: all 0.2s;
    position: relative;
    border: 2px solid transparent;
}

.sequence-card:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: translateX(-2px);
}

.sequence-card.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 8px rgba(211, 84, 0, 0.3);
}

.sequence-card.playing {
    border-color: var(--secondary-color);
}

.sequence-card.add-btn {
    background-color: transparent;
    border: 2px dashed #ccc;
    color: #ccc;
    font-size: 1.5rem;
}

.sequence-card.add-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background-color: transparent;
}

.seq-delete-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.sequence-card:hover .seq-delete-btn {
    opacity: 1;
}

/* Timeline (Bottom) */
.timeline-container {
    width: 100%;
    height: 60px;
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 5px;
    gap: 5px;
    overflow-x: auto;
}

.timeline-block {
    height: 100%;
    min-width: 40px;
    background: #ddd;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    flex: 1;
    border: 2px solid transparent;
}

.timeline-block.active {
    background: var(--primary-color);
    opacity: 0.5;
}

.timeline-block.playing {
    border-color: var(--secondary-color);
}