/* ===== SORA-INSPIRED DESIGN ===== */
/* Minimalista, elegante, espacioso */

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

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-hover: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #666666;
    --border-color: #252525;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glow-purple: rgba(120, 119, 198, 0.4);
    --glow-pink: rgba(255, 128, 191, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fondo animado sutil estilo Sora */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 128, 191, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    animation: float 25s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 32px 40px;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .container {
        padding: 40px 16px 20px;
    }
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.header h1 {
    font-size: 64px;
    font-weight: 600;
    letter-spacing: -2px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    line-height: 1.1;
}

.header p {
    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.3px;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .header {
        margin-bottom: 40px;
    }
    
    .header h1 {
        font-size: 40px;
        letter-spacing: -1.5px;
        margin-bottom: 12px;
    }
    
    .header p {
        font-size: 16px;
    }
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-logout {
    margin-left: 24px;
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
}

@media (max-width: 640px) {
    .logo {
        gap: 12px;
    }
    
    .logo h1 {
        font-size: 20px !important;
    }
    
    .logo svg {
        width: 24px;
        height: 24px;
    }
    
    .btn-logout {
        margin-left: 0;
        width: 100%;
        margin-top: 8px;
        padding: 10px 16px;
    }
}

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

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

/* ===== STATS CARDS ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .stat-card {
        padding: 20px;
    }
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: #333;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card h3 {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -1px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

@media (max-width: 768px) {
    .stat-card h3 {
        font-size: 32px;
    }
    
    .stat-card p {
        font-size: 12px;
    }
}

/* ===== QUOTA CARD ===== */
.stat-card-quota {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
}

.stat-card-quota::before {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
}

.quota-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 12px;
    margin-bottom: 8px;
}

.quota-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s ease, background 0.3s ease;
}

.quota-fill.warning {
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
}

.quota-fill.danger {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.stat-sublabel {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
}

/* ===== CARD ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: #2a2a2a;
}

.card h2, .card h3 {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

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

.card-header h2,
.card-header h3 {
    margin-bottom: 0;
}

.badge {
    background: var(--accent-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .badge {
        font-size: 10px;
        padding: 3px 10px;
    }
}

@media (max-width: 768px) {
    .card {
        padding: 20px;
        border-radius: 16px;
        margin-bottom: 16px;
    }
    
    .card h2, .card h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    padding: 4px;
    background: var(--bg-dark);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.tab-button {
    flex: 1;
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.tab-button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-button.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .tabs {
        margin-bottom: 16px;
    }
    
    .tab-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ===== UPLOAD SECTION ===== */
.upload-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.upload-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.file-input-wrapper {
    position: relative;
    background: var(--bg-hover);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.file-input-wrapper:hover {
    border-color: #667eea;
    background: #1a1a1a;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .upload-section {
        gap: 16px;
    }
    
    .file-input-wrapper {
        padding: 20px 16px;
    }
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-input-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

.file-input-content svg {
    color: var(--text-muted);
    transition: color 0.3s;
}

.file-input-wrapper:hover .file-input-content svg {
    color: #667eea;
}

.file-input-content span {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.file-name {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ===== CONFIG SECTION ===== */
.config-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Grid responsivo para settings */
.config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-full {
    grid-column: 1 / -1;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 640px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group-full {
        grid-column: 1;
    }
}

.input-field, .select-input {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    outline: none;
}

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

.input-hint {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .input-field, .select-input {
        padding: 10px 12px;
        font-size: 14px;
    }
}

.section-divider {
    height: 1px;
    background: var(--border-color);
    margin: 24px 0;
}

@media (max-width: 768px) {
    .section-divider {
        margin: 16px 0;
    }
}

/* ===== BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 20px;
}

@media (max-width: 640px) {
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
    letter-spacing: -0.2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn svg {
    flex-shrink: 0;
}

.btn span {
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #222;
    color: var(--text-primary);
}

/* ===== JOBS LIST ===== */
.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.job-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.job-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-gradient);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.job-item:hover {
    border-color: #2a2a2a;
    transform: translateX(4px);
}

.job-item:hover::before {
    transform: scaleY(1);
}

.job-item strong {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
}

.job-item small {
    color: var(--text-muted);
    font-size: 13px;
}

.job-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-uploaded { 
    background: rgba(251, 191, 36, 0.15); 
    color: #fbbf24; 
}

.status-processing { 
    background: rgba(59, 130, 246, 0.15); 
    color: #3b82f6; 
}

.status-completed { 
    background: rgba(16, 185, 129, 0.15); 
    color: #10b981; 
}

.status-failed { 
    background: rgba(239, 68, 68, 0.15); 
    color: #ef4444; 
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-hover);
    border-radius: 3px;
    overflow: hidden;
    margin: 12px 0;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-fill.active {
    animation: shimmer 2s infinite;
    background: linear-gradient(90deg, 
        #667eea 0%, 
        #764ba2 50%, 
        #667eea 100%
    );
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.progress-fill.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* ===== PRESET INFO ===== */
.preset-info {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 13px;
}

.preset-info svg {
    color: #667eea;
}

.preset-info strong {
    color: var(--text-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 60px 24px 40px;
    }
    
    .header h1 {
        font-size: 48px;
        letter-spacing: -2px;
    }
    
    .header p {
        font-size: 18px;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 32px 24px;
    }
    
    .upload-section,
    .config-section {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ===== SMOOTH SCROLLING ===== */
html {
    scroll-behavior: smooth;
}

/* ===== SELECTION ===== */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}
