* {
    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;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
    color: #667eea;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

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

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

.login-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

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

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h2 {
    color: #667eea;
    font-size: 24px;
}

.nav-menu {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #667eea;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.page-header h1 {
    font-size: 36px;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 18px;
    opacity: 0.9;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 40px;
}

.stat-content h3 {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 4px;
}

.stat-content p {
    color: #666;
    font-size: 14px;
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.action-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-card h2 {
    color: #667eea;
    margin-bottom: 12px;
}

.action-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Generate Form */
.generate-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.generate-form .form-group {
    margin-bottom: 24px;
}

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

.generate-form input,
.generate-form select,
.generate-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.generate-form input:focus,
.generate-form select:focus,
.generate-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.generate-form small {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.status-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

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

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

.result-container {
    background: #f8f9ff;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.result-container h3 {
    color: #667eea;
    margin-bottom: 16px;
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* History */
.history-container {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.history-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

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

.history-list {
    display: grid;
    gap: 16px;
}

.job-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

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

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

.job-id {
    font-weight: 600;
    color: #667eea;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge.pending {
    background: #fff3cd;
    color: #856404;
}

.badge.processing {
    background: #cce5ff;
    color: #004085;
}

.badge.completed {
    background: #d4edda;
    color: #155724;
}

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

.job-prompt {
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}

.job-meta {
    font-size: 12px;
    color: #999;
}

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

/* Docs */
.docs-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.docs-section {
    margin-bottom: 40px;
}

.docs-section h2 {
    color: #667eea;
    margin-bottom: 16px;
}

.docs-section h3 {
    color: #333;
    margin-top: 24px;
    margin-bottom: 12px;
}

.docs-section h4 {
    color: #666;
    margin-top: 16px;
    margin-bottom: 8px;
}

.docs-section p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

.code-block {
    margin: 16px 0;
}

.code-block pre {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #333;
}

.endpoint {
    background: #f8f9ff;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.params-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.params-table th,
.params-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.params-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.params-table td {
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Paginação */
.pagination {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.pagination-info {
    color: #666;
    font-size: 14px;
    text-align: center;
}

.pagination-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.btn-page {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-page:hover:not(:disabled) {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

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

.btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: #999;
    padding: 0 8px;
    font-weight: bold;
}

/* Botão de deletar */
.btn-delete {
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

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

/* Botão Kill */
.btn-kill {
    padding: 6px 12px;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-kill:hover {
    background: #ea580c;
    transform: scale(1.1);
}

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

/* Mensagem de erro no job */
.job-error {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 14px;
    border-left: 4px solid #ef4444;
}

/* Melhorias no job-header */
.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

/* Responsividade da paginação */
@media (max-width: 768px) {
    .pagination-controls {
        gap: 4px;
    }
    
    .btn-page {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .pagination-info {
        font-size: 13px;
    }
}

/* Upload de Imagem */
.image-upload-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-upload {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-upload:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.file-name {
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.btn-remove-image {
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-remove-image:hover {
    background: #dc2626;
}

.image-preview {
    margin-top: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    background: #f9f9f9;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 6px;
    display: block;
}

.info-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Melhorias no formulário de geração */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .image-upload-container {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Campo de duração readonly */
input[readonly] {
    background-color: #f0f0f0;
    cursor: not-allowed;
    color: #666;
}

/* Estilos para página de extensão de vídeo */
.video-info-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-info-card h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #1f2937;
}

.video-preview {
    margin-bottom: 16px;
}

.video-details p {
    margin: 8px 0;
    color: #4b5563;
}

.video-details strong {
    color: #1f2937;
}

.info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 16px;
    margin: 16px 0;
    border-radius: 4px;
}

.info-box p {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #1e40af;
}

.info-box ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.info-box li {
    margin: 4px 0;
    color: #1e3a8a;
}

.result-container {
    background: white;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-container h3 {
    margin-top: 0;
    color: #10b981;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    margin: 24px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

#progressText {
    color: #4b5563;
    margin: 16px 0;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #4b5563;
}
\n/* Otimização para Mobile */\n@media (max-width: 768px) {\n    .container {\n        padding: 10px;\n    }\n    \n    .nav-tabs a {\n        padding: 10px 12px;\n        font-size: 14px;\n    }\n    \n    .tab-content h2 {\n        font-size: 20px;\n    }\n    \n    .stats-grid {\n        grid-template-columns: 1fr;\n    }\n    \n    .stats-card {\n        padding: 15px;\n    }\n    \n    .stats-card h3 {\n        font-size: 16px;\n    }\n    \n    .stats-card p {\n        font-size: 24px;\n    }\n    \n    .btn-group button {\n        width: 100%;\n        margin-bottom: 10px;\n    }\n    \n    .table-responsive table {\n        font-size: 12px;\n    }\n    \n    .table-responsive th, .table-responsive td {\n        padding: 8px;\n    }\n    \n    .btn-secondary {\n        padding: 8px 12px;\n        font-size: 12px;\n    }\n}
