/* Custom Styles for AI Video Summarizer */

:root {
    --primary-pink: #FF4081;
    --primary-pink-dark: #F50057;
    --primary-pink-light: #FFE0EB;
    --primary-pink-lighter: #FFF0F5;
}

/* Drop Zone Styling */
#dropZone {
    border: 3px dashed var(--primary-pink);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    color: var(--primary-pink);
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #fef8fa 100%);
    position: relative;
    overflow: hidden;
}

#dropZone:hover {
    border-color: var(--primary-pink-dark);
    background: linear-gradient(135deg, var(--primary-pink-lighter) 0%, var(--primary-pink-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 64, 129, 0.25);
}

#dropZone.drag-over {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #28a745;
}

.drop-content {
    position: relative;
    z-index: 2;
}

#dropZone::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

#dropZone:hover::before {
    opacity: 1;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Video Container */
.video-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#videoElement {
    border-radius: 8px;
    max-height: 30vh;
    object-fit: contain;
}

/* Frame Preview */
.frame-preview {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 15px 0;
    border-radius: 8px;
    background: #f8f9fa;
}

.frame-preview::-webkit-scrollbar {
    height: 8px;
}

.frame-preview::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.frame-preview::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 4px;
}

.frame-preview::-webkit-scrollbar-thumb:hover {
    background: #495057;
}

.frame-preview img {
    min-width: 120px;
    height: 90px;
    object-fit: cover;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.frame-preview img:hover {
    border-color: var(--primary-pink);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 64, 129, 0.3);
}

.frame-preview img.grid-image {
    min-width: 300px;
    height: auto;
    border: 3px solid #28a745;
}

/* Card Styling */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    border-bottom: none;
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

/* Form Controls */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    padding: 12px 15px;
}

.form-control:focus {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 0.2rem rgba(255, 64, 129, 0.15);
}

.custom-control-label::before {
    border-radius: 50px;
    border: 2px solid #dee2e6;
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn:disabled {
    transform: none;
    box-shadow: none;
}

.btn:disabled::before {
    display: none;
}

/* Bootstrap Color Overrides */
.bg-primary {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
    border-color: var(--primary-pink);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-pink-dark) 0%, #D5006D 100%);
    border-color: var(--primary-pink-dark);
}

.text-primary {
    color: var(--primary-pink) !important;
}

.border-primary {
    border-color: var(--primary-pink) !important;
}

/* Loading Indicator */
#loadingIndicator .spinner-border {
    width: 3rem;
    height: 3rem;
}

.spinner-border.text-primary {
    color: var(--primary-pink) !important;
}

.progress {
    height: 8px;
    border-radius: 50px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 50px;
}

/* Summary Output */
#summaryOutput {
    resize: vertical;
    min-height: 120px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

#summaryOutput:focus {
    background: #fff;
    border-color: var(--primary-pink);
    border-style: solid;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    #dropZone {
        padding: 30px 15px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 8px !important;
        margin-bottom: 5px;
    }
    
    .frame-preview {
        gap: 10px;
    }
    
    .frame-preview img {
        min-width: 100px;
        height: 75px;
    }
    
    /* Hide overlapping header buttons on mobile */
    .btn-outline-secondary.btn-sm[style*="position: absolute"],
    button#logoutButton[style*="position: absolute"] {
        display: none !important;
    }
    
    /* Hide filename on mobile */
    .video-filename {
        display: none !important;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Notifications Container */
#notificationsContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    pointer-events: none;
}

#notificationsContainer .alert {
    pointer-events: all;
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Success/Error States */
.alert {
    border: none;
    border-radius: 8px;
    padding: 15px 45px 15px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* Debug Panel */
#debugOutput {
    max-height: 300px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Tooltip Styling */
.tooltip-inner {
    background-color: #212529;
    border-radius: 6px;
    padding: 8px 12px;
}

/* Bulk Results Styling */
#bulkResults {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

#bulkResults::-webkit-scrollbar {
    width: 8px;
}

#bulkResults::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

#bulkResults::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 4px;
}

#bulkResults::-webkit-scrollbar-thumb:hover {
    background: #495057;
}

.bulk-result-item {
    background: #f8f9fa;
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease;
}

.bulk-result-item:hover {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bulk-result-item h6 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    word-break: break-word;
}

.bulk-result-item .result-text {
    background: #fff;
    border: 1px solid #dee2e6;
    font-size: 1.1rem;
    resize: none;
    line-height: 1.6;
}

.bulk-result-item .result-text:focus {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 0.2rem rgba(255, 64, 129, 0.15);
}

.copy-single {
    min-width: 40px;
    padding: 5px 10px;
}

.copy-single:hover {
    transform: scale(1.1);
}

/* Video count badge */
#videoCount {
    font-weight: 900;
    color: #ffffff;
    font-size: 1.15em;
}

/* Download All Button */
#downloadAllButton {
    white-space: nowrap;
}

#downloadAllButton:hover {
    background-color: #23272b;
    transform: translateY(-2px);
}

/* Videos List Styling */
.videos-list {
    margin-top: 15px;
}

.videos-list h6 {
    color: #495057;
    margin-bottom: 10px;
}

.videos-list-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fa;
}

.videos-list-container::-webkit-scrollbar {
    width: 8px;
}

.videos-list-container::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.videos-list-container::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 4px;
}

.videos-list-container::-webkit-scrollbar-thumb:hover {
    background: #495057;
}

.video-list-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    animation: slideInLeft 0.3s ease;
}

.video-list-item:last-child {
    margin-bottom: 0;
}

.video-list-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.video-filename {
    font-size: 0.9rem;
    color: #212529;
    margin-bottom: 4px;
    word-break: break-word;
}

.video-filename {
    display: flex;
    align-items: center;
}

.video-filename i.fa-file-video {
    color: var(--primary-pink);
}

.copy-filename-btn {
    color: #6c757d;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.copy-filename-btn:hover {
    color: var(--primary-pink);
    opacity: 1;
    text-decoration: none;
}

.copy-filename-btn:active {
    transform: scale(0.95);
}

.video-list-item:hover .copy-filename-btn {
    opacity: 1;
}

.video-status .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    font-weight: 500;
}

.video-message {
    padding-left: 28px;
}

.video-message small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Status badge animations */
.badge-primary {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Full-page Drop Overlay */
.full-page-drop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 64, 129, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.full-page-drop-overlay.active {
    display: flex;
}

.drop-overlay-content {
    text-align: center;
    color: white;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.full-page-drop-overlay.active .drop-overlay-content {
    transform: scale(1);
}

.drop-overlay-content i {
    color: white;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Clips Desktop Area */
.clips-desktop {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    transition: transform 0.3s ease;
}

.clips-desktop.collapsed {
    transform: translateY(calc(100% - 50px));
}

.clips-desktop-header {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.clips-desktop-header h6 {
    margin: 0;
}

.clips-desktop-header .badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
}

.clips-desktop-header button {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.clips-desktop-header button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
}

.clips-desktop-content {
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
    background: #f8f9fa;
}

.clips-desktop-content::-webkit-scrollbar {
    width: 8px;
}

.clips-desktop-content::-webkit-scrollbar-track {
    background: #e9ecef;
}

.clips-desktop-content::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 4px;
}

.clips-desktop-content::-webkit-scrollbar-thumb:hover {
    background: #495057;
}

.empty-desktop-message {
    text-align: center;
    padding: 40px 20px;
}

.desktop-clip-item {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: pointer;
}

.desktop-clip-item:hover {
    border-color: var(--primary-pink);
    box-shadow: 0 4px 15px rgba(255, 64, 129, 0.2);
    transform: translateY(-2px);
}

.desktop-clip-item.processing {
    border-color: #ffc107;
    background: #fff9e6;
}

.desktop-clip-item.completed {
    border-color: #28a745;
    background: #e8f5e9;
}

.desktop-clip-item.error {
    border-color: #dc3545;
    background: #ffe6e6;
}

.clip-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.clip-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-pink-dark) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.clip-details {
    flex: 1;
}

.clip-name {
    font-weight: 600;
    color: #212529;
    margin: 0;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clip-size {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}

.clip-actions {
    display: flex;
    gap: 5px;
}

.clip-actions button {
    padding: 5px 10px;
    font-size: 0.85rem;
}

/* Drag and drop feedback */
body.dragging-over {
    background: #fff0f5;
}

body.dragging-over #fullPageDropOverlay {
    display: flex;
}

/* Motion animations helper classes */
.motion-fade-in {
    opacity: 0;
}

.motion-slide-up {
    transform: translateY(20px);
    opacity: 0;
}

.motion-scale-in {
    transform: scale(0.9);
    opacity: 0;
}

/* Remove Project Workspace Styles - keeping minimal for legacy references */
.project-status-badge {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.empty-state {
    color: #adb5bd;
}

.empty-state i {
    opacity: 0.5;
}

.empty-state p {
    font-size: 13px;
}

/* Clean, minimalist body background */
body {
    background-color: #ffffff;
}
