#timelineContainer {
    overflow: auto;
    position: relative;
}

#tracksContainer {
    position: relative;
    min-height: 100%;
}

.timeline-position-indicator {
    position: absolute;
    top: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.5);
    height: 100%;
    pointer-events: none;
    z-index: 9;
    display: none;
}

.tool-button.active {
    background-color: #4c51bf !important;
    color: white;
}

.clip-edge-handle {
    position: absolute;
    width: 6px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: col-resize;
    top: 0;
    z-index: 5;
}

.clip-edge-handle.left {
    left: 0;
}

.clip-edge-handle.right {
    right: 0;
}

.clip-edge-handle:hover,
.clip-edge-handle.active {
    background-color: rgba(255, 255, 255, 0.5);
}

.clip-caching-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: #4c51bf;
    width: 0%;
    transition: width 0.2s ease;
    opacity: 0.7;
}

.clip-caching-label {
    position: absolute;
    font-size: 8px;
    color: #fff;
    right: 4px;
    bottom: 16px;
    background: rgba(0, 0, 0, 0.7);
    padding: 1px 4px;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.timeline-clip:hover .clip-caching-label {
    opacity: 1;
}

.caching-progress-container {
    height: 4px;
    background: #1a1a1a;
    position: relative;
    width: 100%;
}

.caching-progress-bar {
    height: 100%;
    background: #4c51bf;
    width: 0%;
    transition: width 0.2s ease;
    position: absolute;
    opacity: 0.7;
}

.caching-progress-label {
    position: absolute;
    font-size: 8px;
    color: #fff;
    right: 4px;
    top: -12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 1px 4px;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.caching-progress-container:hover .caching-progress-label {
    opacity: 1;
}

.timeline-track.drag-over {
    background-color: rgba(74, 85, 104, 0.3);
}

/* Custom scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Timeline track styling */
.timeline-track {
    height: 60px;
    width: 100%;
    position: relative;
    border-bottom: 1px solid #4a5568;
}

/* Timeline clip styling */
.timeline-clip {
    position: absolute;
    height: 50px;
    top: 5px;
    background: #4c51bf;
    cursor: pointer;
    overflow: hidden;
}

/* Timeline clip thumbnail */
.clip-thumbnail {
    height: 100%;
    width: 100%;
    object-fit: cover;
    opacity: 0.7;
}

/* Timeline clip label */
.clip-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 10px;
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Timeline ruler */
.timeline-ruler {
    height: 20px;
    position: relative;
    background: #2d3748;
    border-bottom: 1px solid #4a5568;
}

/* Playhead styling */
.playhead {
    position: absolute;
    top: 0;
    width: 2px;
    background: #e53e3e;
    height: 100%;
    z-index: 10;
}

/* Timeline ruler markings */
.ruler-marking {
    position: absolute;
    top: 0;
    width: 1px;
    height: 8px;
    background: #a0aec0;
}

.ruler-marking.major {
    height: 12px;
}

.ruler-text {
    position: absolute;
    font-size: 10px;
    color: #cbd5e0;
    top: 14px;
}

/* Progress bar for loading/processing */
.progress-bar {
    height: 4px;
    width: 100%;
    background: #2d3748;
}

.progress-value {
    height: 100%;
    width: 0%;
    background: #4c51bf;
    transition: width 0.3s ease;
}

/* Resizable panels */
.resize-handle {
    width: 4px;
    background: #4a5568;
    cursor: col-resize;
}

.resize-handle:hover {
    background: #718096;
}

/* Tooltip styles */
.tooltip {
    position: absolute;
    background: #1a202c;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

/* Effect controls */
.effect-control {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.effect-label {
    width: 100px;
    font-size: 12px;
    color: #e2e8f0;
}

.effect-value {
    width: 40px;
    text-align: right;
    font-size: 12px;
    color: #e2e8f0;
}

.effect-slider {
    flex: 1;
    margin: 0 8px;
}

.clip-handle-overlay {
    box-sizing: border-box;
    background: rgba(76, 81, 191, 0.1);
    border: 2px solid #4c51bf;
    z-index: 100;
}

.clip-handle-overlay .resize-handle {
    transition: transform 0.1s ease;
}

.clip-handle-overlay .resize-handle:hover {
    transform: scale(1.2);
    background: #6366f1;
}

.context-menu {
    position: absolute;
    background: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(55, 65, 81, 1);
    border-radius: 0.25rem;
    padding: 0.5rem 0;
    min-width: 150px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.context-menu-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: white;
    font-size: 0.875rem;
}

.context-menu-item:hover {
    background: rgba(55, 65, 81, 1);
}