@font-face {
    font-family: 'ABC Diatype';
    src: url('../font/abc-diatype-regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 32px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.btn-primary {
    background: white;
    color: #667eea;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    min-width: 400px;
    max-width: 500px;
}

.modal-large {
    max-width: 700px;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.error-message {
    color: #ef4444;
    margin-top: 10px;
    font-size: 14px;
}

/* Drag and Drop Zone */
.drop-zone {
    border: 3px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #f9fafb;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.drop-zone.drag-over {
    border-color: #667eea;
    background: #ede9fe;
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.drop-icon {
    font-size: 48px;
    margin: 0;
}

.drop-text {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.drop-subtext {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* Selected Files List */
.selected-files-list {
    margin: 20px 0;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.selected-files-list h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.file-item {
    padding: 6px 10px;
    background: white;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
}

/* Upload Progress */
.upload-progress {
    margin: 20px 0;
}

.progress-bar-container {
    width: 100%;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

#progressText {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* File Section */
.file-section {
    padding: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    margin: 0;
    color: #333;
    font-size: 28px;
}


/* Folder Explorer */
.folder-explorer {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.explorer-section {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.explorer-header {
    background: #f9fafb;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    transition: background 0.2s;
}

.explorer-header:hover {
    background: #f3f4f6;
}

.toggle-icon {
    transition: transform 0.3s;
    font-size: 12px;
}

.explorer-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.file-count-badge {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
}

.explorer-content {
    padding: 20px;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, background 0.2s;
}

.explorer-content.collapsed {
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Drag and drop styles */
.file-card[draggable="true"] {
    cursor: move;
}

.file-card[draggable="true"]:hover {
    cursor: move;
}

.explorer-content {
    border-radius: 4px;
}

.folder-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.folder-actions .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
}

.folder-actions .btn-secondary {
    background: #ede9fe;
    color: #5b21b6;
}

.folder-actions .btn-secondary:hover {
    background: #ddd6fe;
}

.folder-actions .btn-danger {
    background: #fee2e2;
    color: #991b1b;
}

.folder-actions .btn-danger:hover {
    background: #fecaca;
}

/* File List */
.file-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* File Card - Horizontal Row Layout */
.file-card {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.file-card:hover {
    border-color: #667eea;
    background: #f9fafb;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.file-card.completed {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
}

.file-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.file-card-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.file-card h3 {
    color: #333;
    margin: 0;
    font-size: 14px;
    word-break: break-word;
    line-height: 1.4;
    font-weight: 500;
}

.file-card .completion-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.completion-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.completion-badge.in-progress {
    background: #fef3c7;
    color: #92400e;
}

.file-card .file-info {
    color: #666;
    font-size: 12px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.file-card .file-info span {
    white-space: nowrap;
}

.file-card .file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}



.share-url-info {
    margin-top: 10px;
    padding: 15px;
    background: #f0fdf4;
    border: 2px solid #10b981;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-url-input {
    flex: 1;
    min-width: 300px;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    font-family: monospace;
}

.file-card .file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-move {
    background: #ede9fe;
    color: #5b21b6;
}

.btn-move:hover {
    background: #ddd6fe;
    transform: scale(1.1);
}

.btn-delete {
    background: #fee2e2;
    color: #991b1b;
}

.btn-delete:hover {
    background: #fecaca;
    transform: scale(1.1);
}


.file-card .file-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.loading {
    text-align: center;
    color: #666;
    padding: 40px;
}

/* Editor Section - Modal Style */
.editor-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 999;
    overflow-y: auto;
    padding: 0;
    display: none;
}

.editor-section.editor-modal-active {
    display: block;
    animation: slideInFromBottom 0.3s ease-out;
}

@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.editor-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.editor-header h2 {
    color: white;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.editor-header .btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.editor-header-top {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 16px;
}

.editor-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.header-primary-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-header-action {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-header-action.btn-mode {
    background: #10b981;
    color: white;
}

.btn-header-action.btn-mode:hover {
    background: #059669;
}

.btn-header-action.btn-save {
    background: #10b981;
    color: white;
}

.btn-header-action.btn-save:hover {
    background: #059669;
}

.btn-header-action.btn-close {
    background: #ef4444;
    color: white;
}

.btn-header-action.btn-close:hover {
    background: #dc2626;
}

.editor-meta-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

/* Header controls toggle - only visible on mobile */
.btn-header-toggle {
    display: none; /* Hidden on desktop */
    background: transparent;
    color: white;
    border-radius: 6px;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    font-size: 13px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    margin-top: 8px;
}

.btn-header-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Collapsible editor controls - keeps file name visible, hides all controls */
.editor-controls-collapsed .editor-title-row > *:not(h2),
.editor-controls-collapsed .editor-actions {
    display: none;
}

.editor-controls-collapsed .editor-header {
    padding-bottom: 12px;
}

.editor-controls-collapsed .editor-header h2 {
    text-align: center;
}

.editor-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
    width: 100%;
}

.filter-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
}

.btn-mode {
    background: #10b981 !important;
    color: white !important;
}

.btn-mode:hover {
    background: #059669 !important;
}

.btn-save {
    background: #10b981 !important;
    color: white !important;
}

.btn-save:hover {
    background: #059669 !important;
}

.btn-close {
    background: #ef4444 !important;
    color: white !important;
}

.btn-close:hover {
    background: #dc2626 !important;
}

.stat-duration-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 8px 16px;
    border-radius: 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.filter-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #555;
    cursor: pointer;
}

.stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

.stat-duration-keep {
    background: #d1fae5;
    color: #065f46;
}

.stat-duration-total {
    background: #dbeafe;
    color: #1e40af;
}

.stat-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.stat-keep {
    background: #d1fae5;
    color: #065f46;
}

.stat-cut {
    background: #fee2e2;
    color: #991b1b;
}

/* Table */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f3f4f6;
    position: sticky;
    top: 0;
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.reason-input {
    width: 100%;
    padding: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 13px;
}

.reason-input:focus {
    outline: none;
    border-color: #667eea;
}

tr:hover {
    background: #f9fafb;
}

tr.row-cut {
    background: #fef2f2;
}

tr.row-keep {
    background: #f0fdf4;
}

.action-cell {
    text-align: center;
}

.action-toggle {
    padding: 6px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.action-toggle.keep {
    background: #10b981;
    color: white;
}

.action-toggle.keep:hover {
    background: #059669;
}

.action-toggle.cut {
    background: #ef4444;
    color: white;
}

.action-toggle.cut:hover {
    background: #dc2626;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 2000;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #10b981;
    color: white;
}

.notification.error {
    background: #ef4444;
    color: white;
}

.completion-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
}

.completion-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    margin: 0;
    color: white;
}

.completion-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Column Panel */
.column-panel {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.column-panel h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.column-toggles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.column-toggles label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px;
}

.column-toggles input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Hidden columns */
th.hidden-column,
td.hidden-column {
    display: none;
}

/* Video Upload Section */
.video-upload-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-upload-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.video-status {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.video-status.has-video {
    background: #d1fae5;
    color: #065f46;
}

.video-status.no-video {
    background: #fee2e2;
    color: #991b1b;
}

#videoUploadForm {
    display: flex;
    gap: 10px;
    align-items: center;
}

#videoInput {
    flex: 1;
}

/* Full Video Section */
.full-video-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-controls-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.video-controls-header h3 {
    color: #333;
    font-size: 18px;
    margin: 0;
}

.video-mode-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    position: relative;
}

.video-mode-controls #exportCommentsBtn {
    position: absolute;
    right: 0;
}

.mode-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    padding: 14px 20px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 500px;
}

.mode-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.mode-label.active {
    color: #667eea;
    font-weight: 600;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #667eea;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.video-mode-controls .mode-switch {
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
}

.video-mode-controls .mode-switch:has(input:checked) {
    background: #ede9fe;
    border-color: #667eea;
}

.video-mode-controls .mode-switch input[type="checkbox"] {
    margin-right: 8px;
}

.mode-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #333;
}

.mode-switch input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Side-by-side layout - Always shows video + right panel */
.video-editor-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f9fafb;
}

.right-panel-container {
    display: flex;
    flex-direction: column;
}

.right-panel-container > div {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Left: Video Column */
.video-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.full-video-container {
    background: black;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 650px; /* Match subtitle panel height on desktop */
}

.full-video-container video {
    width: 100%;
    height: 100%;
    max-height: 650px;
    display: block;
    object-fit: contain;
    /* Hide native controls */
    pointer-events: auto;
}

/* Hide native video controls on all browsers */
.full-video-container video::-webkit-media-controls {
    display: none !important;
}

.full-video-container video::-webkit-media-controls-enclosure {
    display: none !important;
}

.full-video-container video::-webkit-media-controls-panel {
    display: none !important;
}

.full-video-container video::-webkit-media-controls-play-button {
    display: none !important;
}

.full-video-container video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.video-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    color: #F7F6F2;
    padding: 0;
    border-radius: 0;
    font-family: 'ABC Diatype', sans-serif;
    font-size: 55px; /* Base size - will be scaled by JavaScript */
    font-weight: normal;
    text-align: center;
    max-width: 80%;
    pointer-events: none;
    opacity: 0;
    line-height: 1.5;
    box-shadow: none;
    z-index: 50; /* Above video but below controls */
    -webkit-text-fill-color: #F7F6F2;
    color: #F7F6F2;
    /* Text shadow will be set dynamically by JavaScript */
}

.video-caption.visible {
    opacity: 1;
}

/* Custom video controls - positioned lower on all screens */
.custom-video-controls {
    position: absolute;
    bottom: 40px; /* Lower position on all screens */
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 0 30px;
    pointer-events: none;
    z-index: 100; /* Higher z-index to ensure it's above video */
}

/* Mobile: position above caption table and center */
@media (max-width: 768px) {
    .custom-video-controls {
        bottom: 220px;
        justify-content: center;
        padding: 0 20px;
    }
}

.video-control-btn {
    pointer-events: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid white;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0.7; /* Default opacity */
    outline: none; /* Remove blue focus outline */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.video-control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.video-control-btn:active {
    transform: scale(0.95);
}

.video-control-btn:focus {
    outline: none;
}

.video-control-btn.play-pause {
    width: 80px;
    height: 80px;
    font-size: 28px;
}

.video-control-btn.skip-back,
.video-control-btn.skip-forward {
    font-size: 11px;
}

/* Mobile caption overlay - editable table overlaid on video */
.mobile-caption-overlay {
    display: none; /* Hidden on desktop */
    position: absolute;
    bottom: 0; /* Pinned at the very bottom */
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.90) 40%, rgba(0, 0, 0, 0.75) 80%, transparent 100%);
    backdrop-filter: blur(8px);
    padding: 30px 8px 10px 8px; /* More top padding for gradient */
    max-height: 200px;
    overflow-y: auto;
    z-index: 90; /* Above video and captions, below controls */
    pointer-events: auto;
}

.mobile-caption-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    color: white;
}

.mobile-caption-table th {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
    position: sticky;
    top: 0;
    font-size: 10px;
}

.mobile-caption-table th:nth-child(1),
.mobile-caption-table th:nth-child(2) {
    width: 45px;
}

.mobile-caption-table td {
    padding: 6px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: top;
}

.mobile-caption-table td:nth-child(1),
.mobile-caption-table td:nth-child(2) {
    width: 45px;
    font-size: 10px;
    opacity: 0.8;
}

.mobile-caption-table td:nth-child(3) {
    font-size: 12px;
}

.mobile-caption-table tr.current-caption-row {
    background: rgba(102, 126, 234, 0.4);
    border-left: 3px solid #667eea;
}

.mobile-caption-table tr:active,
.mobile-caption-table tr:focus {
    background: transparent !important;
}

.mobile-caption-table td:active,
.mobile-caption-table td:focus {
    background: transparent !important;
}

.mobile-caption-table input.mobile-text-edit {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    font-size: 12px;
    padding: 2px;
    font-family: inherit;
}

.mobile-caption-table input.mobile-text-edit:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* Video timeline wrapper - contains time + progress bar */
.video-timeline-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    width: 100%;
}

.video-timeline-time {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    min-width: 55px;
    text-align: right;
    font-family: monospace;
}

/* Mobile: timeline matches video width */
@media (max-width: 768px) {
    .video-timeline-wrapper {
        width: calc(100vw * (9/16)); /* Match 9:16 video width */
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .video-timeline-time {
        color: #1f2937;
        font-size: 12px;
        min-width: 50px;
    }
}

/* Video progress bar */
.video-progress-bar {
    position: relative;
    flex: 1;
    height: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    cursor: pointer;
    transition: height 0.2s ease;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.video-progress-bar:hover,
.video-progress-bar:active,
.video-progress-bar.dragging {
    height: 28px;
}

.video-progress-fill {
    height: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.05s linear;
    pointer-events: none;
    border-radius: 3px;
    position: relative;
}

.video-progress-bar:hover .video-progress-fill,
.video-progress-bar.dragging .video-progress-fill {
    height: 8px;
}

.video-progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: white;
    border: 3px solid #667eea;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-progress-bar:hover .video-progress-fill::after,
.video-progress-bar:active .video-progress-fill::after,
.video-progress-bar.dragging .video-progress-fill::after {
    opacity: 1;
}

/* Mobile comment input overlay - mobile only */
.mobile-comment-input {
    display: none; /* Hidden on desktop */
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.90) 40%, rgba(0, 0, 0, 0.75) 80%, transparent 100%);
    backdrop-filter: blur(8px);
    padding: 30px 12px 12px 12px; /* More top padding for gradient */
    z-index: 90; /* Above video and captions, below controls */
    flex-direction: column;
    gap: 10px;
}

.mobile-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 13px;
    margin-bottom: 4px;
}

.mobile-comment-header strong {
    color: #667eea;
}

.mobile-comment-input textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 13px;
    font-family: inherit;
    resize: none;
}

.mobile-comment-input textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.mobile-comment-input textarea:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

.btn-save-comment {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save-comment:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Comments timeline - markers directly ON the progress bar */
.video-comments-timeline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    z-index: 2; /* Above progress fill, below markers */
    pointer-events: none;
}

.comment-marker {
    position: absolute;
    width: 4px;
    height: 100%;
    background: #ef4444;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
    bottom: 0;
    border-radius: 2px;
}

.comment-marker::after {
    content: '💬';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
}

.comment-marker:hover {
    width: 6px;
    background: #dc2626;
}

.comment-marker:hover::after {
    font-size: 14px;
}

/* Mobile: make progress bar more visible and match video width */
@media (max-width: 768px) {
    .video-column {
        width: 100%;
        padding: 0;
    }

    .video-timeline-wrapper {
        width: 100%; /* Full width of video-column */
        margin: 10px 0 0 0;
        padding: 0;
    }

    .video-progress-bar {
        height: 26px;
    }
    
    .video-progress-bar:active,
    .video-progress-bar.dragging {
        height: 34px;
    }
    
    .video-progress-fill {
        height: 8px;
    }
    
    .video-progress-bar:active .video-progress-fill,
    .video-progress-bar.dragging .video-progress-fill {
        height: 10px;
    }

    .video-timeline-time {
        font-size: 12px;
        color: white;
        min-width: 50px;
    }
}

/* Removed toggle caption table button */

/* Overlay opacity control */
.opacity-control {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    padding: 10px 14px;
    border-radius: 8px;
    z-index: 110; /* Highest z-index for opacity control */
    backdrop-filter: blur(4px);
}

.opacity-control label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: white;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
}

.opacity-control input[type="range"] {
    width: 140px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .opacity-control {
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 85%;
        max-width: 320px;
        background: rgba(36, 40, 72, 0.92);
        padding: 10px 16px;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    }
    
    .opacity-control label {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        font-size: 12px;
        width: 100%;
        gap: 12px;
    }
    
    .opacity-control input[type="range"] {
        flex: 1;
        max-width: none;
    }
}

.video-info {
    background: #f9fafb;
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.current-timestamp {
    color: #333;
    font-size: 13px;
}

.caption-toggle-control {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.caption-toggle-control label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #333;
    margin: 0;
    white-space: nowrap;
}

.caption-toggle-control button {
    margin: 0;
}

/* Right: Comment Column */
.comment-column {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-column h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.current-segment-info {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 2px solid #e5e7eb;
    min-height: 80px;
}

.current-segment-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.current-segment-info .segment-details {
    margin: 0;
    color: #333;
    font-size: 14px;
}

.current-segment-info .segment-number {
    color: #667eea;
    font-weight: 600;
}

.comment-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-input-group label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.comment-textarea {
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.comment-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.comment-actions {
    display: flex;
    gap: 10px;
}

.comment-actions button {
    flex: 1;
}

#scrollToCurrentBtn {
    background: #10b981;
    color: white;
}

#scrollToCurrentBtn:hover {
    background: #059669;
}

/* Caption Check Column */
.caption-check-column {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    max-height: 650px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow: hidden;
}

.caption-check-column h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    flex-shrink: 0;
}

.caption-table-container {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    max-height: 580px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Custom scrollbar for caption table - wider and more visible */
.caption-table-container::-webkit-scrollbar {
    width: 12px;
}

.caption-table-container::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 6px;
    margin: 4px 0;
}

.caption-table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    border: 2px solid #e5e7eb;
}

.caption-table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8d 100%);
}

.caption-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.caption-table thead {
    position: sticky;
    top: 0;
    background: #f3f4f6;
    z-index: 10;
}

.caption-table th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.caption-table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.caption-table tr.current-segment {
    background: #fef3c7 !important;
    border-left: 4px solid #f59e0b;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.caption-table tbody tr:hover {
    background: #f9fafb;
    cursor: pointer;
}

/* Remove caption check mode special layout - keep consistent */

.caption-table .text-cell {
    padding: 8px;
}

.caption-table .reason-input {
    width: 100%;
    min-height: 50px;
    resize: vertical;
}

.caption-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

/* Hover Video Player */
.video-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-height: 300px;
    background: black;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 2000;
    overflow: hidden;
}

.video-player video {
    width: 100%;
    max-height: 300px;
    display: block;
    object-fit: contain;
}

/* Text cell hover effect when video is available */
td.text-cell.has-video {
    position: relative;
}

td.text-cell.has-video:hover {
    background: #ede9fe !important;
    cursor: pointer;
}

td.text-cell.has-video::after {
    content: '🎬';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.5;
}

/* Selected row highlight */
tbody tr.selected-row {
    background: #fef3c7 !important;
    border-left: 4px solid #f59e0b;
}

/* Responsive */
@media (max-width: 1400px) {
    /* Keep video + right panel side‑by‑side on desktop,
       but collapse to single column on smaller laptops */
    .video-editor-layout {
        grid-template-columns: 1.4fr 1fr;
    }
}

/* Removed 1024px breakpoint - desktop layout continues down to 768px */

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .editor-section {
        padding: 0;
    }

    .editor-header {
        padding: 12px;
        gap: 8px;
    }

    .editor-header h2 {
        font-size: 15px;
        text-align: center;
    }

    /* Video container fills full height on mobile, centered */
    .video-editor-layout {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    .video-column {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: min(100%, calc((100vh - 180px) * (9 / 16)));
        margin: 0 auto;
        gap: 0;
    }

    .full-video-container {
        height: calc(100vh - 180px); /* Full viewport height minus header */
        width: 100% !important;
        max-width: calc((100vh - 180px) * (9 / 16));
        position: relative;
        background: black;
        aspect-ratio: 9 / 16;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0;
    }

    .full-video-container video {
        width: 100%;
        height: 100%;
        object-fit: contain;
        /* Ensure video doesn't trigger fullscreen */
        pointer-events: auto;
    }
    
    /* Prevent native controls from appearing on mobile */
    .full-video-container video::-webkit-media-controls {
        display: none !important;
    }
    
    .full-video-container video::-webkit-media-controls-enclosure {
        display: none !important;
    }
    
    .full-video-container video::-webkit-media-controls-panel {
        display: none !important;
    }
    
    .full-video-container video::-webkit-media-controls-play-button {
        display: none !important;
    }
    
    .full-video-container video::-webkit-media-controls-start-playback-button {
        display: none !important;
    }

    /* Timeline matches video width on mobile */
    .video-timeline-wrapper {
        width: 100%;
        max-width: calc((100vh - 180px) * (9 / 16));
        margin: 10px auto 0 auto;
        display: flex;
        gap: 8px;
    }

    .video-timeline-time {
        font-size: 12px;
        color: #1f2937; /* Keep time visible on light background */
        min-width: 48px;
        text-align: right;
        font-weight: 600;
    }

    .video-progress-bar {
        height: 26px;
    }
    
    .video-progress-bar:active,
    .video-progress-bar.dragging {
        height: 34px;
    }
    
    .video-progress-fill {
        height: 8px;
    }
    
    .video-progress-bar:active .video-progress-fill,
    .video-progress-bar.dragging .video-progress-fill {
        height: 10px;
    }

    .editor-title-row {
        flex-direction: column;
        gap: 8px;
    }

    .header-primary-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .btn-header-action {
        width: 100%;
        font-size: 15px;
        padding: 12px 16px;
    }

    .editor-meta-row {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .stat-duration-badge {
        width: 100%;
        font-size: 14px;
        padding: 10px 16px;
        font-weight: 600;
    }

    .completion-toggle {
        width: 100%;
        padding: 12px 16px;
        justify-content: center;
    }

    .completion-toggle label {
        font-size: 14px;
        font-weight: 600;
    }

    .completion-toggle input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }

    .editor-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .filter-controls {
        width: 100%;
    }
    
    .stats {
        width: 100%;
        justify-content: space-between;
    }

    .modal-content {
        min-width: auto;
        width: 90%;
    }

    .btn-header-toggle {
        display: block; /* Show on mobile */
        font-size: 12px;
        padding: 8px 16px;
        margin-top: 4px;
    }

    .mode-toggle-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 14px 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .mode-label {
        font-size: 14px;
    }

    .video-mode-controls {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .video-mode-controls #exportCommentsBtn {
        position: static;
        align-self: center;
    }

    .table-container {
        overflow-x: auto;
    }
    
    .video-player {
        width: 100%;
        max-width: 320px;
    }

    /* On very small screens, reduce caption size overlay
       so text remains readable without covering video */
    .video-caption {
        font-size: 32px;
        max-width: 90%;
    }

    /* Show mobile caption overlay on phones */
    .mobile-caption-overlay {
        display: block;
    }

    /* Hide desktop caption check table on phones (overlay replaces it) */
    .caption-check-column {
        display: none !important;
    }

    /* Opacity control on mobile moves lower */
    .opacity-control {
        top: 50px;
    }
}

/* Upload Mode Toggle */
.upload-mode-toggle {
    margin-bottom: 20px;
    padding: 15px;
    background: #f3f4f6;
    border-radius: 8px;
}

.mode-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.mode-switch input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.mode-label {
    font-size: 14px;
}

/* Upload Info */
.upload-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
}

.upload-info p {
    margin: 5px 0;
}

.upload-info code {
    background: #dbeafe;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

/* File Type Groups in Upload */
.file-type-group {
    margin-bottom: 15px;
}

.file-type-group strong {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
}

.file-item {
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 13px;
    color: #6b7280;
}

/* General Comments Section */
.general-comments-section {
    margin: 20px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.general-comments-section h3 {
    margin-bottom: 15px;
    color: #111827;
    font-size: 18px;
}

.general-comments-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.general-comments-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.no-comments {
    text-align: center;
    color: #9ca3af;
    padding: 20px;
    font-style: italic;
}

.general-comment-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s ease;
}

.general-comment-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #6b7280;
}

.comment-author {
    font-weight: 600;
    color: #374151;
}

.comment-timestamp {
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 4px;
    color: #1e40af;
    font-family: 'Courier New', monospace;
}

.comment-date {
    margin-left: auto;
}

.comment-text {
    padding: 10px 0;
    color: #111827;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sm.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-sm.btn-secondary:hover {
    background: #d1d5db;
}

.btn-sm.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.btn-sm.btn-danger:hover {
    background: #fecaca;
}

.add-general-comment {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.add-general-comment textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
}

.add-general-comment textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.add-general-comment button {
    align-self: flex-start;
}

/* Bulk Actions Bar */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
}

.select-all-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#selectedCountDisplay {
    color: #667eea;
    margin-left: auto;
}

/* File Selection */
.file-select-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 10;
}

.file-card.selected {
    background: #ede9fe !important;
    border: 2px solid #667eea;
}

.file-card {
    position: relative;
}

/* File Card Enhancements */
.file-card {
    display: flex;
    gap: 15px;
    align-items: center;
}

.file-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.file-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* Changed from 'cover' to 'contain' - no stretching! */
    background: #000;     /* Black background behind video */
}

.thumbnail-placeholder {
    font-size: 48px;
    color: #9ca3af;
}

.file-card-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
}

.file-card-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-name-with-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.file-name-with-badges h3 {
    margin: 0;
}

.file-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.video-badge, .comment-badge, .group-badge, .version-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.video-badge {
    background: #dbeafe;
    color: #1e40af;
}

.comment-badge {
    background: #fef3c7;
    color: #92400e;
}

.group-badge {
    background: #e0e7ff;
    color: #4338ca;
    font-family: 'Courier New', monospace;
}

.version-badge {
    background: #f3e8ff;
    color: #7c3aed;
    font-weight: 600;
}

.file-card.stacked {
    border-left: 3px solid #7c3aed;
}

