:root {
    --bg-color: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #10b981;
    --secondary-hover: #059669;
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --danger: #ef4444;       
    --danger-hover: #dc2626; 
}

body.dual-mode {
    --primary: #d97706;       /* Amber */
    --primary-hover: #b45309;
    --secondary: #ea580c;     /* Orange */
    --secondary-hover: #c2410c;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(217, 119, 6, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(234, 88, 12, 0.15) 0%, transparent 50%) !important;
}

/* Transiciones suaves generales para el cambio de paleta */
body, .btn, .card, .drag-area, .header h1 {
    transition: all 0.4s ease;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    z-index: 10;
    flex: 1; 
    display: flex;
    flex-direction: column;
}

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

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a5b4fc, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap; 
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: none;
    animation: fadeIn 0.5s ease;
}

.card.active {
    display: block;
}

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

.drag-area {
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.drag-area:hover, .drag-area.dragover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.drag-area i {
    display: block;
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.drag-area span {
    font-size: 1.1rem;
    color: var(--text-main);
    display: block;
    margin-bottom: 0.5rem;
}

.drag-area small {
    color: var(--text-muted);
}

input[type="file"] {
    display: none;
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.5);
}

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

.btn-secondary:hover {
    background: var(--secondary-hover);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

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

.btn-danger:hover {
    background: var(--danger-hover);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Selected Files List */
.file-list {
    margin-bottom: 1.5rem;
    max-height: 150px;
    overflow-y: auto;
    text-align: left;
}
.file-item {
    background: rgba(255,255,255,0.05);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

/* Loader */
.loader {
    display: none;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
footer {
    width: 100%;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

/* Formularios */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
    color: white;
    font-family: 'Outfit', sans-serif;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Elegante Toggle Switch */
.toggle-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    background: rgba(255,255,255,0.03);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.toggle-label {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.toggle-label.active {
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #374151;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "⚡";
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
    box-shadow: 0 0 15px var(--primary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

/* Estilos para Modal y Autenticación */
.auth-bar {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.auth-bar span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.auth-btn:hover {
    background: rgba(255,255,255,0.1);
}

.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-color);
    margin: 10% auto; 
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    animation: modalSlide 0.3s ease-out;
}

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

.close-btn {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover,
.close-btn:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.modal-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
}

.modal-tab.active {
    color: var(--primary);
    font-weight: bold;
}
