.video-editor {
    background: #242424;
    min-height: calc(100dvh);
    padding: 3rem 0;

    video {
        width: 100%;
        display: block;
        will-change: transform;
    }

    .toolbar {
        display: flex;
        gap: 10px;
        width: 100%;
        justify-content: center;
        align-items: center;
    }

    .upload-controls {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-bottom: 20px;

        button { 
            background-color: rgba(255, 255, 255, 0.1);
        }

        button:hover{
            background-color: rgba(255, 255, 255, 0.5);
        }
    }

    .export-controls {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #photo-counter {
        font-size: 14px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.6);
        min-width: 60px;
        text-align: center;
    }

    button {
        border-radius: 50%;
        /* Circular touch target */
        border: none;
        width: 48px;
        height: 48px;
        font-size: 24px;
        /* Icon size */
        background-color: transparent;
        color: rgba(255, 255, 255, 0.87);
        cursor: pointer;
        transition:
            color 0.25s,
            transform 0.1s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    button:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

    button:hover {
        color: #2735d4;
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff;
        /* Subtle hover background */
    }

    button:active:not(:disabled) {
        transform: scale(0.95);
    }

    button:focus,
    button:focus-visible {
        outline: none;
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Timeline Styles */
    .timeline-container {
        position: relative;
        width: 100%;
        height: 60px;
        /* Adjust based on ruler height */
        margin-top: 10px;
        margin-bottom: 20px;
    }

    canvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: auto;
        touch-action: none;
        /* Prevent scrolling while scrubbing */
        z-index: 10; /* Ensure canvas is above track for scrubbing */
    }

    #timeline-track {
        position: absolute;
        top: 40px; /* Below the ruler part of canvas */
        left: 0;
        width: 100%;
        height: 40px;
        pointer-events: none; /* Let clicks pass through to canvas if needed, or handle separately */
    }

    .timeline-thumbnail {
        position: absolute;
        top: 5px;
        height: 30px;
        width: auto;
        border-radius: 4px;
        border: 2px solid #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        transform: translateX(-50%); /* Center on timestamp */
        object-fit: cover;
        pointer-events: auto; /* Allow interaction if we want to click them later */
    }

    .btn-primary {
        background-color: #2735d4;
        color: white;
        border-radius: 8px;
        padding: 0 20px;
        width: auto; /* Override circular button width */
        font-size: 16px;
        font-weight: 600;
        margin: 0 auto; /* Center in flex container */
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .btn-primary:hover {
        background-color: #535bf2;
    }

    .btn-primary:disabled {
        background-color: transparent;
        color: rgba(255, 255, 255, 0.3);
        cursor: not-allowed;
    }
}

.video-editor-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.5;
    font-weight: 400;
    color-scheme: light dark;
    color: rgba(255, 255, 255, 0.87);
    background-color: #242424;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.video-container {
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Spinner animation for loading state */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
