/* Стили таймлайна */
.timeline-container {
    background: #2a2a2a;
    border-top: 1px solid #404040;
    padding: 15px 20px;
    height: 200px;
    display: flex;
    flex-direction: column;
}

.timeline-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #404040;
}

#timeline-scrubber {
    flex: 1;
    height: 6px;
    background: #404040;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

#timeline-scrubber::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #007acc;
    border-radius: 50%;
    cursor: pointer;
}

#timeline-scrubber::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #007acc;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#current-time, #total-time {
    font-size: 12px;
    color: #ccc;
    min-width: 40px;
}

.timeline {
    flex: 1;
    position: relative;
    background: #1a1a1a;
    border-radius: 6px;
    overflow-y: auto;
    overflow-x: hidden;
}

.timeline-track {
    height: 40px;
    border-bottom: 1px solid #333;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.timeline-track:last-child {
    border-bottom: none;
}

.track-label {
    width: 120px;
    font-size: 12px;
    color: #ccc;
    flex-shrink: 0;
}

.track-content {
    flex: 1;
    height: 100%;
    position: relative;
    background: repeating-linear-gradient(
        to right,
        transparent,
        transparent 49px,
        #333 49px,
        #333 50px
    );
}

.timeline-item {
    position: absolute;
    height: 30px;
    background: #007acc;
    border-radius: 4px;
    top: 5px;
    cursor: move;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 11px;
    color: white;
    min-width: 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.timeline-item:hover {
    background: #0066aa;
}

.timeline-item.selected {
    background: #28a745;
    box-shadow: 0 0 0 2px #28a745;
}

.timeline-item .resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: ew-resize;
    background: rgba(255,255,255,0.2);
    opacity: 0;
    transition: opacity 0.2s;
}

.timeline-item:hover .resize-handle {
    opacity: 1;
}

/* Временные маркеры */
.timeline-ruler {
    height: 20px;
    background: #2a2a2a;
    border-bottom: 1px solid #404040;
    position: relative;
    margin-left: 120px;
}

.time-marker {
    position: absolute;
    top: 0;
    height: 100%;
    border-left: 1px solid #555;
    font-size: 10px;
    color: #888;
    padding-left: 4px;
    line-height: 20px;
}

/* Плейхед (указатель времени) */
.playhead {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: #ff4444;
    z-index: 10;
    pointer-events: none;
}

.playhead::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -4px;
    width: 10px;
    height: 10px;
    background: #ff4444;
    transform: rotate(45deg);
}