/* Reset and Base Styles */
* {
    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;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.05rem;
    opacity: 0.9;
}

/* File Selection Area */
.file-selection {
    margin-bottom: 30px;
}

.upload-area {
    background: white;
    border-radius: 13px;
    padding: 50px 35px;
    text-align: center;
    box-shadow: 0 9px 28px rgba(0,0,0,0.2);
    border: 3px dashed #ddd;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.upload-area.dragover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-content i {
    font-size: 3.5rem;
    color: #667eea;
    margin-bottom: 18px;
}

.upload-content h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #333;
}

.upload-content p {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 10px;
}

.upload-content .subtitle {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 25px;
}

.browse-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 22px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.browse-btn.secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.browse-btn.secondary:hover {
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.6);
}

/* Video Container */
.video-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 40px;
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 18px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 7px;
    padding: 9px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.control-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.control-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.speed-label {
    font-weight: 600;
    color: #666;
}

.speed-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 7px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.speed-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.speed-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.event-info {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
    margin-right: 10px;
}

.event-select {
    padding: 9px 14px;
    border: 2px solid #e9ecef;
    border-radius: 7px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

/* Timeline */
.timeline-container {
    margin-bottom: 25px;
}

.timeline {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 10px;
}

.timeline::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.timeline::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.time-display {
    text-align: center;
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.timeline-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.timeline-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.timeline-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

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

.timeline-btn.primary:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
}

.timeline-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

/* Responsive grid for different camera counts */
@media (min-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.video-item {
    position: relative;
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 9px 22px rgba(0,0,0,0.2);
}

.video-item.enlarged {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    z-index: 1000;
    position: relative;
}

/* Download Overlay */
.download-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.download-panel {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.download-panel h3 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}

.download-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.download-info span {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.download-info span:last-child {
    color: #667eea;
    margin-bottom: 0;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-btn, .share-btn, .close-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}



.close-btn {
    background: #6c757d;
    color: white;
}

.close-btn:hover {
    background: #5a6268;
}

/* Progress Overlay */
.progress-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.9) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 99999 !important;
    backdrop-filter: blur(5px) !important;
}

.progress-panel {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: slideInUp 0.3s ease-out;
    /* Ensure panel is properly contained within parent */
    position: relative;
    z-index: inherit;
}

/* Ensure progress panel is hidden when overlay is hidden */
.progress-overlay[style*="display: none"] .progress-panel {
    display: none !important;
}

/* Ensure entire progress overlay is hidden when display is none */
.progress-overlay[style*="display: none"] {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.progress-header {
    margin-bottom: 30px;
}

.progress-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.progress-header h3 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.progress-content {
    text-align: left;
}

.progress-bar-container {
    margin-bottom: 20px;
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

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

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.progress-details {
    text-align: center;
}

.progress-details span {
    color: #666;
    font-size: 1rem;
}

/* Download button on enlarged video */
.video-item.enlarged .download-trigger {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    z-index: 1001;
}

.video-item.enlarged .download-trigger:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

/* Custom Clips Section */
.custom-clips {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.custom-clips h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.clips-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.clip-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.clip-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.clip-item.selected {
    border-color: #667eea;
    background: #f0f4ff;
}

.clip-item input[type="checkbox"] {
    position: absolute;
    top: 10px;
    right: 10px;
    transform: scale(1.2);
}

.clip-info {
    margin-bottom: 10px;
}

.clip-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.clip-duration {
    font-size: 0.9rem;
    color: #666;
}

.clip-time {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

.clip-downloads {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.clip-download-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 3px;
}

.clip-download-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.combine-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.combine-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.combine-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.combine-btn.primary {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.combine-btn.primary:hover {
    background: #218838;
    border-color: #218838;
}

/* Event Combination Section */
.event-combination {
    background: white;
    border-radius: 13px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 9px 28px rgba(0,0,0,0.2);
}

.event-combination h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.event-selection-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.combine-btn.secondary {
    background: #6c757d;
    border-color: #6c757d;
}

.combine-btn.secondary:hover {
    background: #5a6268;
    border-color: #5a6268;
}

.selected-events-container,
.combined-events-container {
    margin-top: 20px;
}

.selected-events-container h4,
.combined-events-container h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.selected-events-list,
.combined-events-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.event-item:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.event-item.selected {
    border-color: #667eea;
    background: #e8f0ff;
}

.event-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.event-info {
    flex: 1;
}

.event-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.event-details {
    font-size: 0.9rem;
    color: #666;
}

.event-downloads {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.event-download-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-download-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.combined-event-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.combined-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.combined-event-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.combined-event-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.combined-event-downloads {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.combined-event-download-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.combined-event-download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Footer */
.footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 18px 0;
    margin-top: 30px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content p {
    margin: 4px 0;
    color: #666;
    font-size: 0.9rem;
}

.footer-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.footer-content a:hover {
    text-decoration: underline;
}

.footer-content .disclaimer {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
    margin-top: 10px;
}

.footer-links {
    margin-top: 10px;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #333;
    color: white;
    padding: 7px 14px;
    border-radius: 18px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.github-link:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.github-link i {
    font-size: 1.1rem;
}

/* PWA Update Notification */
.update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #667eea;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

.update-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.update-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

/* Status Messages */
.status-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    animation: slideInDown 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-message.success {
    background: #28a745;
}

.status-message.warning {
    background: #ffc107;
    color: #333;
}

.status-message.error {
    background: #dc3545;
}

/* Offline Mode Styles */
body.offline .upload-area {
    opacity: 0.8;
}

body.offline .upload-area::before {
    content: "OFFLINE MODE";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffc107;
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* PWA Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #667eea;
    color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: none;
}

.install-prompt.show {
    display: block;
    animation: slideInUp 0.3s ease-out;
}

.install-prompt-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.install-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

.dismiss-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dismiss-btn:hover {
    color: white;
}

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

/* Manual Install Button */
.manual-install {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

.manual-install-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.manual-install-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.video-item video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.video-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Video Info */
.video-info {
    display: flex;
    justify-content: space-around;
    padding: 18px;
    background: #f8f9fa;
    border-radius: 9px;
    margin-bottom: 20px;
}

.info-item {
    text-align: center;
}

.info-item .label {
    font-weight: 600;
    color: #666;
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.info-item span:last-child {
    font-size: 1.15rem;
    color: #667eea;
    font-weight: 700;
}

/* Instructions */
.instructions {
    background: white;
    border-radius: 13px;
    padding: 25px;
    box-shadow: 0 9px 28px rgba(0,0,0,0.2);
}

.instructions h3 {
    color: #667eea;
    margin-bottom: 18px;
    font-size: 1.25rem;
}

.instructions ol {
    margin-left: 20px;
    margin-bottom: 18px;
}

.instructions li {
    margin-bottom: 10px;
    color: #555;
    font-size: 1rem;
}

.browser-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 7px;
    padding: 15px;
    color: #856404;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: center;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-info {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .upload-content h3 {
        font-size: 1.4rem;
    }
    
    .browse-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

/* Event Dropdown Styles */
.event-dropdown-container {
    position: relative;
    margin-bottom: 20px;
}

.event-dropdown-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.event-dropdown-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.event-dropdown-btn i {
    transition: transform 0.3s ease;
}

.event-dropdown-content.show .event-dropdown-btn i {
    transform: rotate(180deg);
}

.event-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 5px;
}

.event-dropdown-content.show {
    display: block;
}

.select-all-container {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.select-all-btn, .select-none-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-all-btn:hover, .select-none-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.event-checkbox-item {
    padding: 8px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.event-checkbox-item:hover {
    background-color: #f8f9fa;
}

.event-checkbox-item:last-child {
    border-bottom: none;
}

.event-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    width: 100%;
}

.event-checkbox {
    margin-right: 12px;
    margin-top: 2px;
    transform: scale(1.1);
}

.event-checkbox-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-checkbox-text strong {
    color: #333;
    font-size: 1rem;
}

.event-checkbox-text .event-details {
    color: #666;
    font-size: 0.9rem;
}

.event-checkbox-text .event-timestamp {
    color: #888;
    font-size: 0.8rem;
} 