/**
 * SpaceOS Global & Landing/Login Stylesheet
 * Diseño Futurista, Oscuro, Premium con Glassmorphism y Micro-animaciones.
 */

:root {
    --bg-dark: #06060c;
    --bg-dark-rgb: 6, 6, 12;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    
    --primary: #8b5cf6; /* Violeta */
    --primary-rgb: 139, 92, 246;
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.35);
    
    --accent: #06b6d4; /* Cian */
    --accent-rgb: 6, 182, 212;
    
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    
    --font-main: 'Outfit', sans-serif;
    --glass-bg: rgba(10, 10, 18, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(16px);
}

/* Reset y Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Fondo de Estrellas y Nebulosa Animado */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        var(--bg-dark);
    overflow: hidden;
}

/* Animaciones del Fondo de Estrellas */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(3px 3px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(3px 3px at 160px 120px, #ddd, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: moveStars 120s linear infinite;
    opacity: 0.3;
}

@keyframes moveStars {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50%, -50%); }
}

/* Botones Premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-family: var(--font-main);
    border: none;
    outline: none;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow), 0 0 10px rgba(var(--primary-rgb), 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow), 0 0 15px rgba(var(--primary-rgb), 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #0891b2);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.5);
    filter: brightness(1.1);
}

/* Tarjetas Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255,255,255,0.05);
}

/* Contenedores de Formulario (Login/Register) */
.form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    z-index: 10;
    position: relative;
}

.auth-card {
    max-width: 450px;
    width: 100%;
    padding: 40px;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-logo {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.auth-logo span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-light);
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* Inputs de Formulario Modernos */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-light);
    font-family: var(--font-main);
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.25);
}

/* Alertas y Mensajes de Feedback */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: #a7f3d0;
}

/* Links y Textos Auxiliares */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Estilos Específicos para Landing Page */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 80px;
    width: 100%;
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
}

@media (max-width: 768px) {
    .landing-nav {
        padding: 20px 30px;
    }
}

.logo-brand {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.logo-brand span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 150px 20px 80px;
    min-height: 100vh;
    z-index: 10;
    position: relative;
}

.badge-tag {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c084fc;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    animation: fadeIn 0.8s ease-out;
}

.hero-title {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-title span {
    background: linear-gradient(135deg, #fff 30%, var(--primary) 70%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    max-width: 600px;
    font-size: clamp(16px, 2vw, 19px);
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Capturas Mockup Premium */
.mockup-container {
    max-width: 950px;
    width: 90%;
    margin: 50px auto 100px;
    position: relative;
    z-index: 10;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 30px 80px rgba(0,0,0,0.8), 0 0 50px rgba(var(--primary-rgb), 0.15);
    background: rgba(10,10,18,0.7);
    padding: 8px;
    overflow: hidden;
}

.mockup-bar {
    display: flex;
    gap: 6px;
    padding: 10px 15px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
}

.mockup-dot:nth-child(1) { background: #ef4444; }
.mockup-dot:nth-child(2) { background: #f59e0b; }
.mockup-dot:nth-child(3) { background: #10b981; }

.mockup-image {
    width: 100%;
    height: auto;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    display: block;
    object-fit: cover;
}

/* ==========================================================================
   SWEETALERT2 CUSTOM SPACEOS GLASSMORPHIC THEME
   ========================================================================== */

/* Contenedor del Popup (Tarjeta de Cristal Semitransparente con Desenfoque) */
.space-swal-popup {
    background: rgba(8, 8, 16, 0.82) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.15) !important;
    color: #f1f5f9 !important;
    font-family: 'Outfit', sans-serif !important;
    padding: 24px !important;
    max-width: 440px !important;
}

/* Título */
.space-swal-title {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    font-size: 19px !important;
    color: #ffffff !important;
    padding-top: 10px !important;
    letter-spacing: 0.5px !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1) !important;
}

/* Cuerpo de Texto */
.space-swal-text {
    font-family: 'Outfit', sans-serif !important;
    color: #94a3b8 !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    margin-top: 8px !important;
}

/* Botón de Confirmación (Degradado Neón Violeta a Cian con Resplandor) */
.space-swal-confirm-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 24px !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35) !important;
    outline: none !important;
    margin: 8px 5px !important;
}

.space-swal-confirm-btn:hover {
    filter: brightness(1.1) !important;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.5), 0 0 10px rgba(139, 92, 246, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* Botón de Cancelar (Translúcido, Neutro, Glassmorphic) */
.space-swal-cancel-btn {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    padding: 10px 24px !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    outline: none !important;
    margin: 8px 5px !important;
}

.space-swal-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-1px) !important;
}

/* Input en Diálogos de Prompt */
.space-swal-input {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 14px !important;
    padding: 8px 12px !important;
    outline: none !important;
    width: 90% !important;
    margin: 15px auto 5px !important;
    transition: all 0.3s ease !important;
}

.space-swal-input:focus {
    border-color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3) !important;
}

/* Personalizar los iconos de SweetAlert2 */
.swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}
.swal2-icon.swal2-error {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}
.swal2-icon.swal2-success {
    border-color: #10b981 !important;
    color: #10b981 !important;
}
.swal2-icon.swal2-info {
    border-color: #06b6d4 !important;
    color: #06b6d4 !important;
}

/* ==========================================================================
   PREMIUM CUSTOM SCROLLBARS (GLASSMORPHIC & INTERACTIVE)
   ========================================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(10, 10, 20, 0.4) !important;
    border-radius: 4px !important;
}
::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3) !important; /* Primary space violet */
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 4px !important;
    transition: background 0.2s ease !important;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.6) !important; /* Glowing cyan hover */
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5) !important;
}
