/* Movie Maker Timeline Styles */

.movie-timeline {
    display: none;
    position: fixed;
    bottom: 0;
    left: 320px;
    right: 0;
    height: 180px;
    background: #111;
    border-top: 1px solid #333;
    flex-direction: column;
    z-index: 50;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}
.movie-timeline.visible { display: flex; }

.timeline-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #1a1a1a;
    border-bottom: 1px solid #000;
}
.timeline-title {
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
}
.timeline-time {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: #fff;
    background: #222;
    padding: 4px 10px;
    border-radius: 2px;
    border: 1px solid #333;
}
.timeline-controls {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.timeline-smoothing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-left: 1px solid #333;
}
.timeline-smoothing-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}
.timeline-smoothing input[type="range"] {
    width: 80px;
    height: 4px;
}
.timeline-smoothing-value {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: #666;
    min-width: 28px;
}

.timeline-btn {
    font-family: 'Syne', sans-serif;
    padding: 8px 14px;
    border: none;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}
.timeline-btn-play {
    background: #fff;
    color: #0a0a0a;
}
.timeline-btn-play:hover { background: #e5e5e5; }
.timeline-btn-play.playing { background: #e74c3c; color: #fff; }
.timeline-btn-add {
    background: #222;
    color: #e5e5e5;
    border: 1px solid #333;
}
.timeline-btn-add:hover { background: #2a2a2a; border-color: #444; }
.timeline-btn-close {
    background: transparent;
    color: #666;
    padding: 8px 10px;
}
.timeline-btn-close:hover { color: #fff; }

.timeline-ruler {
    height: 24px;
    background: #1a1a1a;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #333;
}
.ruler-mark {
    position: absolute;
    top: 0;
    height: 100%;
    border-left: 1px solid #333;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    color: #555;
    padding-left: 4px;
    padding-top: 4px;
}
.ruler-mark.major { border-color: #444; color: #888; }

.timeline-track-container {
    flex: 1;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
}
.timeline-track {
    height: 100%;
    min-height: 100px;
    position: relative;
    background: repeating-linear-gradient(90deg, #111 0px, #111 99px, #1a1a1a 100px);
    background-size: 100px 100%;
}
.timeline-track.dragover {
    background-color: rgba(255, 255, 255, 0.03);
}

.timeline-clip {
    position: absolute;
    top: 10px;
    height: calc(100% - 20px);
    background: #333;
    border-radius: 4px;
    cursor: move;
    overflow: hidden;
    border: 2px solid #444;
    transition: all 0.15s;
    min-width: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.timeline-clip:hover { border-color: #666; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.timeline-clip.selected { border-color: #e74c3c; }
.timeline-clip-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    pointer-events: none;
}
.timeline-clip-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.85);
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.timeline-clip-resize {
    position: absolute;
    top: 0;
    width: 10px;
    height: 100%;
    cursor: ew-resize;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.15s;
}
.timeline-clip:hover .timeline-clip-resize { opacity: 1; }
.timeline-clip-resize.left { left: 0; border-radius: 4px 0 0 4px; }
.timeline-clip-resize.right { right: 0; border-radius: 0 4px 4px 0; }
.timeline-clip-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: #222;
    border: none;
    border-radius: 2px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.timeline-clip:hover .timeline-clip-delete { opacity: 1; }
.timeline-clip-delete:hover { background: #e74c3c; color: #fff; }

.timeline-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #000;
    z-index: 10;
    pointer-events: none;
}
.timeline-playhead::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -5px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #e74c3c;
}

.timeline-drop-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: #555;
    pointer-events: none;
}
