/* EXTRACTOR MAIN CONTAINER */
.extractor-main-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

@media (max-width: 768px) {
    .extractor-main-container {
        padding: 10px;
    }
}

.video-extractor-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.tool-info-section {
    max-width: 1200px;
    margin: 0 auto;
}

/* UPLOAD SECTION */
.upload-placeholder {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 80px 20px;
    text-align: center;
    background: var(--bg-color);
    transition: var(--transition);
    cursor: pointer;
}

.upload-placeholder:hover,
.upload-placeholder.dragover {
    border-color: var(--primary-color);
    background: rgba(44, 100, 240, 0.05);
    /* slightly bluish */
}

/* INFO PANEL */
.video-info-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    justify-content: center;
}

.info-item {
    font-size: 0.95rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.info-item span {
    font-weight: 600;
}

/* PLAYER WRAPPER */
.player-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.video-player-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#videoPlayer {
    max-width: 100%;
    max-height: 90vh;
    /* Allow it to be as tall as 90% of viewport height */
    display: block;
    cursor: pointer;
}

.play-pause-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 32px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.player-wrapper:hover .play-pause-overlay.paused {
    opacity: 1;
}

.capture-big-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s, background 0.2s;
    z-index: 10;
}

.capture-big-btn:hover {
    transform: scale(1.05);
    background: var(--primary-blue, #0056b3);
}

.capture-big-btn:active {
    transform: scale(0.95);
}

/* TIMELINE */
.timeline-wrapper {
    background: var(--bg-color);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.timeline-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tool-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.time-display {
    font-family: monospace;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-color);
}

.zoom-control {
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    padding: 8px 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.timeline-scroll-area {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-card);
}

.timeline-scroll-area::-webkit-scrollbar {
    height: 10px;
}

.timeline-scroll-area::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 5px;
}

.custom-timeline {
    position: relative;
    height: 50px;
    width: 100%;
    min-width: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.timeline-track {
    position: relative;
    width: 100%;
    height: 12px;
    background: var(--border-color);
    border-radius: 6px;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary-color);
    border-radius: 6px;
    width: 0%;
    pointer-events: none;
}

.timeline-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: #fff;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: transform 0.1s;
}

.custom-timeline:active .timeline-thumb {
    transform: translate(-50%, -50%) scale(1.3);
}

.frame-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.frame-controls .tool-btn {
    width: auto;
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-size: 1.1rem;
    gap: 8px;
}

.editor-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* CAPTURED IMAGES */
.captured-images-section {
    margin-top: 50px;
    border-top: 2px solid var(--border-color);
    padding-top: 30px;
}

.captured-images-section h3 {
    margin-bottom: 25px;
    color: var(--text-color);
    font-size: 1.8rem;
    text-align: center;
}

.captured-gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.captured-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.4s ease-out forwards;
    flex: 1 1 calc(50% - 30px);
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.captured-card-img-wrapper {
    position: relative;
    width: 100%;
    background: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.dark-mode .captured-card-img-wrapper {
    background: #0f172a;
}

.captured-card img {
    max-width: 100%;
    /* Display really large! Up to 90vh */
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.captured-card-info {
    padding: 20px;
    background: var(--bg-card);
}

.captured-card-details {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-color);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.captured-card-details div {
    background: var(--bg-color);
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
}

.captured-card-actions {
    display: flex;
    gap: 15px;
}

.captured-card-actions button {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
}

.btn-remove-card {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    font-size: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
    z-index: 5;
}

.btn-remove-card:hover {
    transform: scale(1.1);
    background: #dc3545;
}

/* Make it full width and huge if there's only 1 image */
.captured-gallery-container>.captured-card:only-child {
    flex: 1 1 100%;
}

.captured-gallery-container>.captured-card:only-child img {
    max-height: 90vh;
}

@media (max-width: 768px) {
    .captured-card {
        flex: 1 1 100%;
    }

    .video-info-panel {
        flex-direction: column;
    }

    .capture-big-btn {
        padding: 10px 20px;
        font-size: 1.1rem;
        bottom: 15px;
        right: 15px;
    }

    #videoPlayer {
        max-height: 60vh;
    }

    .time-display {
        width: 100%;
        text-align: center;
    }

    .zoom-control {
        width: 100%;
        justify-content: center;
    }
}