/* Video Trimmer Styles */
.video-trimmer-section {
    background: var(--bg-secondary);
    margin-top: 2rem;
}

.trimmer-container {
    padding: 2rem;
}

.video-player-container {
    margin-bottom: 2rem;
}

.trim-video-player {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin: 0 auto;
    display: block;
}

/* Timeline Container */
.timeline-container {
    margin: 2rem 0;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

/* Timeline Track */
.timeline-track {
    position: relative;
    height: 60px;
    background: #e2e8f0;
    border-radius: 8px;
    margin: 1rem 0;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-track:hover {
    background: #cbd5e0;
}

/* Timeline Thumbnails */
.timeline-thumbnails {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    border-radius: 8px;
}

.timeline-thumbnail {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
}

/* Timeline Progress */
.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary-alpha-20);
    border-radius: 8px 0 0 8px;
    transition: width 0.1s ease;
}

/* Timeline Selection */
.timeline-selection {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--primary-alpha-30);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    transition: all 0.1s ease;
    pointer-events: none;
}

/* Timeline Handles */
.timeline-handle {
    position: absolute;
    top: -5px;
    width: 16px;
    height: 70px;
    border-radius: 4px;
    cursor: ew-resize;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    z-index: 10;
    border: 2px solid white;
    transform: translateX(-50%);
}

.timeline-handle:hover {
    box-shadow: var(--shadow-lg);
}

.timeline-handle.dragging {
    transform: translateX(-50%) scale(1.1);
}

/* Start Handle - Green T Shape with top bar */
.timeline-handle.start-handle {
    background: var(--success-color);
}

.timeline-handle.start-handle:hover {
    background: #38a169;
}

.timeline-handle.start-handle.dragging {
    background: #38a169;
    box-shadow: 0 8px 25px var(--success-alpha-40);
}

/* Top horizontal bar for start handle */
.timeline-handle.start-handle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    width: 40px;
    height: 12px;
    background: var(--success-color);
    border-radius: 6px;
    transform: translateX(-50%);
    border: 2px solid white;
    box-shadow: var(--shadow-md);
    cursor: ew-resize;
}

.timeline-handle.start-handle:hover::before {
    background: #38a169;
}

.timeline-handle.start-handle.dragging::before {
    background: #38a169;
}

/* End Handle - Red T Shape with bottom bar */
.timeline-handle.end-handle {
    background: var(--error-color);
}

.timeline-handle.end-handle:hover {
    background: #e53e3e;
}

.timeline-handle.end-handle.dragging {
    background: #e53e3e;
    box-shadow: 0 8px 25px var(--error-alpha-40);
}

/* Bottom horizontal bar for end handle */
.timeline-handle.end-handle::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 40px;
    height: 12px;
    background: var(--error-color);
    border-radius: 6px;
    transform: translateX(-50%);
    border: 2px solid white;
    box-shadow: var(--shadow-md);
    cursor: ew-resize;
}

.timeline-handle.end-handle:hover::before {
    background: #e53e3e;
}

.timeline-handle.end-handle.dragging::before {
    background: #e53e3e;
}

/* Timeline Playhead */
.timeline-playhead {
    position: absolute;
    top: -10px;
    width: 2px;
    height: 80px;
    background: #e53e3e;
    border-radius: 1px;
    pointer-events: none;
    z-index: 5;
    transform: translateX(-50%);
}

.timeline-playhead::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -4px;
    width: 10px;
    height: 10px;
    background: #e53e3e;
    border-radius: 50%;
    border: 2px solid white;
}

/* Time Displays */
.time-displays {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface-primary);
    border-radius: var(--border-radius);
}

.time-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.time-display label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.time-display span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'SF Mono', Monaco, monospace;
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    min-width: 80px;
}

.time-display span {
    background: var(--surface-secondary);
    color: var(--primary-color);
}

/* Playback Controls */
.playback-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.control-btn {
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    box-shadow: var(--shadow-sm);
}

.control-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.control-btn.play-pause {
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}


.control-btn {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.control-btn.play-pause:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.control-btn.preview-btn {
    width: auto;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    gap: 0.5rem;
    font-weight: 500;
    background: var(--surface-secondary);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.control-btn.preview-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Trim Actions */
.trim-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.trim-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--success-color), #38a169);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-md);
}

.trim-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #38a169, #2f855a);
}

.cancel-trim-btn {
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cancel-trim-btn:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
    transform: translateY(-1px);
}

/* Time inputs for trim tool */
.time-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.time-input-group {
    display: flex;
    flex-direction: column;
}

.time-input-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.time-input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    text-align: center;
    transition: var(--transition);
}

.time-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--box-shadow-primary-light);
}

.time-input:hover {
    border-color: var(--primary-color);
}

.time-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.time-input-group small {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}