:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e1b4b;
    --accent-primary: #6d28d9;
    --accent-secondary: #4f46e5;
    --accent-success: #059669;
    --accent-warning: #d97706;
    --accent-danger: #dc2626;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(109, 40, 217, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(79, 70, 229, 0.15) 0%, transparent 40%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
}

.app-header {
    text-align: center;
    margin-bottom: 3rem;
}

.app-header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a78bfa 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.app-header h1 span {
    font-weight: 300;
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
}

.app-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px var(--glass-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease-out;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.card-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #a78bfa;
}

.dual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .dual-grid {
        grid-template-columns: 1fr;
    }
}

.form-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.form-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group {
    margin-bottom: 1.2rem;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1rem;
}

label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

input:focus, select:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(109, 40, 217, 0.3);
}

.help-text {
    display: block;
    font-size: 0.8rem;
    color: var(--accent-warning);
    margin-top: 0.3rem;
}

.actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.actions-center {
    justify-content: center;
}

/* Botones */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-glow:hover {
    box-shadow: 0 0 20px rgba(109, 40, 217, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Selección de carpetas */
.folder-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.folder-header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1rem;
}

.check-all {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.folder-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.folder-item {
    display: grid;
    grid-template-columns: 1fr 1.2fr 100px;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    gap: 1.5rem;
}

.folder-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent-primary);
}

.folder-dest-select {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
}

.folder-dest-select i {
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.folder-dest-select select {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    background: #1e293b; /* Color sólido para asegurar legibilidad */
    color: white;
    cursor: pointer;
    width: 100%;
}

.folder-dest-select select option {
    background: #1e293b;
    color: white;
    padding: 10px;
}

.folder-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    overflow: hidden;
    min-width: 0;
}

.folder-left span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-item i.folder-icon {
    color: #a78bfa;
}

.badge {
    background: rgba(109, 40, 217, 0.2);
    color: #a78bfa;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(109, 40, 217, 0.3);
    text-align: center;
}

/* Estadísticas de progreso */
.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #38bdf8;
}

/* Barra de progreso */
.progress-bar-container {
    margin-bottom: 2rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6d28d9, #38bdf8);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* Logs */
.logs-container {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1rem;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-bottom: 0.8rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logs-content {
    height: 150px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.85rem;
    padding-right: 0.5rem;
}

.log-item {
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.log-item.info { color: #94a3b8; }
.log-item.success { color: #10b981; }
.log-item.warning { color: #f59e0b; }
.log-item.error { color: #ef4444; }

/* Overlay de carga */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid #38bdf8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

.hidden {
    display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
