/* --- UMISEQUENCER STYLES (RESTORED) --- */

.umisequencer-wrapper {
    background: #1A1412;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 25px;
    margin: 2rem 0;
    font-family: 'Space Grotesk', sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    user-select: none;
    color: #e0e0e0;
}

.seq-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 20px;
}

.seq-title {
    font-weight: 700;
    color: #fff;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 1.1rem;
}

.seq-controls-row {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.seq-btn {
    background: #C75B39;
    color: white;
    border: none;
    padding: 0 20px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    font-family: 'Inter';
    font-size: 0.9rem;
    white-space: nowrap;
}
.seq-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.seq-btn.stop { background: #444; }

.seq-btn.clear-btn { background: #333; padding: 0 15px; }

.bpm-slider-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0,0,0,0.3);
    padding: 5px 15px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.05);
}

.bpm-label {
    font-size: 0.75rem;
    color: #888;
    font-weight: 700;
    text-transform: uppercase;
}

.bpm-value {
    font-size: 1rem;
    color: #fff;
    font-weight: 700;
    width: 40px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ts-selector {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 2px 5px;
    font-family: 'Space Grotesk';
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    transition: 0.2s;
}
.ts-selector:hover { border-color: #C75B39; }

input[type=range].umi-slider {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    cursor: pointer;
    height: 30px;
    margin: 0;
}
input[type=range].umi-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: #444;
    border-radius: 3px;
    border: none;
}
input[type=range].umi-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #C75B39;
    border: 2px solid #fff;
    margin-top: -6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: transform 0.1s;
}
input[type=range].umi-slider:hover::-webkit-slider-thumb { transform: scale(1.1); }

/* GRID PRINCIPAL */
.seq-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 15px;
    align-items: center;
    margin-bottom: 5px;
}

.track-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 10px;
}

.track-label {
    color: #aaa;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.timbre-selector { display: flex; gap: 6px; }

.timbre-btn {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #555;
    background: transparent;
    cursor: pointer;
    transition: 0.2s;
}
.timbre-btn:hover { border-color: #888; }
.timbre-btn.active.kit-a { background: #C75B39; border-color: #C75B39; box-shadow: 0 0 8px rgba(199, 91, 57, 0.5); }
.timbre-btn.active.kit-b { background: #e0e0e0; border-color: #e0e0e0; box-shadow: 0 0 8px rgba(255, 255, 255, 0.3); }

/* STEPS GRID */
.track-steps {
    display: grid;
    /* grid-template-columns é definido inline no JS para suportar variação de compasso */
    gap: 4px;
}

.step {
    aspect-ratio: 1;
    background: #2a2a2a;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.1s;
}

.step:nth-child(4n+1) { background: #333; }
.step:hover { border-color: #666; }
.step.active { background: #C75B39; box-shadow: 0 0 10px rgba(199, 91, 57, 0.4); }

/* Destaques visuais do tempo */
.step.measure-start { border-left: 3px solid #C75B39 !important; }
.step.beat-start { border-left: 2px solid #666 !important; }
.step.playing { border-color: #fff !important; filter: brightness(1.5); transform: scale(1.1); }

/* SLOTS CONTAINER */
.slots-container {
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

.slots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.slots-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slot-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.slot-item {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: 0.2s;
}

.slot-item.active { border-color: #C75B39; background: rgba(199, 91, 57, 0.1); }

.slot-info { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9rem; color: #ccc; flex: 1; cursor: pointer; }

.slot-name { color: #e0e0e0; }

.slot-actions { display: flex; gap: 5px; }

.btn-icon {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 6px;
    transition: 0.2s;
    border-radius: 4px;
}
.btn-icon:hover { color: #fff; background: rgba(255,255,255,0.1); }
.btn-icon.delete:hover { color: #ff5555; background: rgba(255, 85, 85, 0.1); }

.save-slot-area {
    margin-top: 15px;
    border: 1px dashed #444;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    color: #666;
    cursor: pointer;
    transition: 0.2s;
}
.save-slot-area:hover {
    border-color: #C75B39;
    color: #C75B39;
    background: rgba(199, 91, 57, 0.05);
}

@media (max-width: 768px) {
    .umisequencer-wrapper { padding: 15px; margin: 1rem 0; }
    .seq-header { gap: 15px; margin-bottom: 15px; }
    .seq-controls-row { flex-wrap: wrap; gap: 10px; }
    .seq-btn { padding: 0 12px; height: 36px; font-size: 0.8rem; }
    .bpm-slider-group { width: 100%; order: 3; }
    
    .seq-grid { grid-template-columns: 80px 1fr; gap: 10px; }
    .track-label { font-size: 0.65rem; }
    .track-steps { gap: 2px; }
    .step { border-radius: 2px; }
    
    .slot-item { padding: 8px 10px; }
}