/* Custom Styles for Subtitle Uploader */

:root {
    --primary-color: #00ff88;
    --success-color: #00ff88;
    --danger-color: #dc3545;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    background: linear-gradient(180deg, #DBF1E7 0%, #FFFFFF 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    max-width: 1200px;
}

/* Header Styles */
.display-4 {
    text-shadow: none;
    color: #000000 !important;
}

.display-4.text-primary {
    color: #000000 !important;
}

.display-4.text-primary i {
    color: #000000 !important;
}

.display-4 .title-green {
    color: #000000 !important;
}

.text-muted {
    color: #00AC91 !important;
    font-weight: 500;
}

/* Drop Zone Styles */
.drop-zone {
    border: 3px dashed #dee2e6;
    border-radius: var(--border-radius);
    padding: 60px 20px;
    text-align: center;
    background: #f8f9fa;
    transition: var(--transition);
    cursor: pointer;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover {
    border-color: var(--primary-color);
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

.drop-zone.drag-over {
    border-color: var(--primary-color);
    background: rgba(0, 255, 136, 0.15);
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.3);
}

.drop-zone-content {
    pointer-events: none;
}

.drop-zone i {
    animation: float 3s ease-in-out infinite;
    color: #00AEE6 !important;
}

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

/* Card Styles */
.card {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    border-radius: 0 !important;
    font-weight: 600;
}

.card-header.bg-primary {
    background: linear-gradient(90deg, #00AEE6 0%, #00AC92 100%) !important;
}

.card-header.bg-primary.text-white {
    color: #ffffff !important;
}

.card-header.bg-primary .badge.bg-light {
    background-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* File List Styles */
.list-group-item {
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
    transition: var(--transition);
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    font-size: 1.5rem;
    color: #00AEE6;
}

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

.drop-zone .text-primary {
    color: #00AEE6 !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
    word-break: break-all;
}

.file-size {
    font-size: 0.875rem;
    color: #6c757d;
}

.file-language {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 16px;
}

.file-language .badge {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 12px;
}

.file-language input {
    font-size: 0.875rem;
    border-radius: 6px;
    transition: var(--transition);
}

.file-language input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 255, 136, 0.25);
}

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

.btn-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

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

/* Button Styles */
.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

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

.btn-primary {
    background: linear-gradient(90deg, #00AEE6 0%, #00AC92 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #0099cc 0%, #009980 100%);
    color: #ffffff;
}

.btn-primary i,
.btn-success i {
    color: #ffffff !important;
}

.btn-success {
    background: linear-gradient(90deg, #00AEE6 0%, #00AC92 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
}

.btn-success:hover {
    background: linear-gradient(90deg, #0099cc 0%, #009980 100%);
    color: #ffffff;
}

/* Progress Bar Styles */
.progress {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Alert Styles */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d1e7dd 0%, #a3cfbb 100%);
    color: #0f5132;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
    color: #842029;
}

/* Badge Styles */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .drop-zone {
        padding: 40px 15px;
        min-height: 250px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Animation for file list items */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.list-group-item {
    animation: slideIn 0.3s ease-out;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Toast Styles */
.toast-container {
    z-index: 9999;
    max-width: 90%;
    width: auto;
}

.toast {
    min-width: 300px;
    max-width: 500px;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: none;
}

.toast.bg-success {
    background: #00AC92 !important;
}

.toast.bg-danger {
    background: #dc3545 !important;
}

.toast-body {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
}

.toast .btn-close {
    filter: brightness(0) invert(1);
}

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

.toast.showing {
    animation: slideUp 0.3s ease-out;
}

/* Responsive Toast */
@media (max-width: 576px) {
    .toast-container {
        max-width: 95%;
    }

    .toast {
        min-width: 250px;
    }
}

/* File Status Styles */
.file-status {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 16px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.status-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.status-pending {
    background-color: #e9ecef;
    color: #6c757d;
}

.status-processing {
    background-color: #fff3cd;
    color: #856404;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-error {
    background-color: #f8d7da;
    color: #842029;
}

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

/* File Logs Styles */
.file-logs-container {
    margin-top: 12px;
    border-top: 2px solid #e9ecef;
    padding-top: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

.file-logs-header {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9rem;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.file-logs-content {
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.log-entry {
    padding: 6px 0;
    line-height: 1.6;
    border-bottom: 1px solid #e9ecef;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: #6c757d;
    margin-right: 8px;
    font-weight: 600;
}

.log-message {
    color: #212529;
}

.log-entry.log-info .log-message {
    color: #0d6efd;
}

.log-entry.log-success .log-message {
    color: #198754;
}

.log-entry.log-error .log-message {
    color: #dc3545;
    font-weight: 600;
}

/* Custom Scrollbar for Logs */
.file-logs-content::-webkit-scrollbar {
    width: 6px;
}

.file-logs-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.file-logs-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.file-logs-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design for Status */
@media (max-width: 768px) {
    .file-status {
        margin-left: 0;
        margin-right: 0;
        margin-top: 8px;
        width: 100%;
    }
    
    .file-logs-container {
        margin-top: 8px;
    }
    
    .file-logs-content {
        max-height: 200px;
    }
}

