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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    background: white;
    border-radius: 12px;
    padding: 40px 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1em;
    color: #666;
}

/* Sections */
.section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.section-description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

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

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

/* Forms */
.upload-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.file-label {
    font-weight: 600;
    color: #333;
    font-size: 1em;
}

.file-input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-input:hover {
    border-color: #667eea;
}

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

.helper-text {
    font-size: 0.9em;
    color: #999;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

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

.btn-danger:hover {
    background: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(211, 47, 47, 0.3);
}

.btn-accent {
    background: #ff6b6b;
    color: white;
}

.btn-accent:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.3);
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

/* Upload Status */
.upload-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f0f8ff;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-top: 20px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #667eea;
    animation: pulse 1.5s infinite;
}

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

/* Projects List */
.projects-list {
    display: grid;
    gap: 15px;
}

.project-card {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.project-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.project-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.project-card-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    color: #999;
    font-weight: 500;
}

.info-value {
    color: #333;
}

.project-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-container input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 1.1em;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-small {
    max-width: 500px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.modal-body {
    padding: 30px;
}

.detail-info {
    display: grid;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.detail-info p {
    display: flex;
    justify-content: space-between;
    color: #666;
}

/* Voiceover Content */
.voiceover-content {
    margin: 25px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.voiceover-content h3 {
    color: #333;
    margin-bottom: 15px;
}

#voiceoverText {
    background: white;
    padding: 15px;
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

/* Processing Progress */
.processing-progress {
    padding: 30px;
    background: linear-gradient(135deg, #f5f5f5 0%, #fff 100%);
    border-top: 2px solid #667eea;
    text-align: center;
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

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

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.4);
}

#processingText {
    color: #333;
    font-size: 1.05em;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.3px;
}

/* Batch Modal */
.batch-projects-list {
    display: grid;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.batch-project-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
}

.batch-project-item input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.batch-project-item label {
    flex: 1;
    cursor: pointer;
    color: #333;
}

.batch-results {
    display: grid;
    gap: 10px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.batch-result-item {
    padding: 12px;
    background: white;
    border-radius: 4px;
    border-left: 4px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.batch-result-item.completed {
    border-left-color: #4caf50;
}

.batch-result-item.failed {
    border-left-color: #f44336;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .section {
        padding: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-actions {
        width: 100%;
        gap: 8px;
    }

    .btn {
        width: 100%;
    }

    .modal-content {
        max-width: 95%;
    }

    .project-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .status-badge {
        margin-top: 10px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }
}
/* Metadata Modal Styles */
.modal-large {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.metadata-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.metadata-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
}

.metadata-section h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #1976d2;
    font-size: 1.1em;
}

.metadata-field {
    position: relative;
}

.metadata-value {
    background: white;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.5;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.tag {
    background: #2196f3;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.metadata-field .btn {
    padding: 6px 12px;
    font-size: 0.85em;
    margin-top: 8px;
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 20px;
    background: #333;
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 0.95em;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-width: 400px;
    word-wrap: break-word;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: #4caf50;
}

.toast-error {
    background: #d32f2f;
}

.toast-info {
    background: #2196f3;
}

.toast-warning {
    background: #ff9800;
}
