* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #4A90E2;
    --primary-green: #25D366;
    --dark-bg: #0a0e27;
    --darker-bg: #050810;
    --card-bg: rgba(15, 23, 42, 0.8);
    --card-border: rgba(74, 144, 226, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-glow: rgba(74, 144, 226, 0.5);
    --success-glow: rgba(37, 211, 102, 0.5);
    --error-color: #ef4444;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 50%, #1a1f3a 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* Efecto de estrellas animadas */
.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="white" opacity="0.8"/><circle cx="80" cy="40" r="0.5" fill="white" opacity="0.6"/><circle cx="40" cy="60" r="1" fill="white" opacity="0.7"/><circle cx="90" cy="80" r="0.5" fill="white" opacity="0.5"/><circle cx="10" cy="90" r="1" fill="white" opacity="0.6"/></svg>') repeat;
    animation: animateStars 50s linear infinite;
}

.stars2 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="30" cy="10" r="0.5" fill="white" opacity="0.5"/><circle cx="70" cy="30" r="1" fill="white" opacity="0.7"/><circle cx="50" cy="70" r="0.5" fill="white" opacity="0.6"/><circle cx="15" cy="50" r="1" fill="white" opacity="0.8"/></svg>') repeat;
    animation: animateStars 100s linear infinite;
    opacity: 0.5;
}

.stars3 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="60" cy="20" r="0.5" fill="white" opacity="0.4"/><circle cx="25" cy="70" r="1" fill="white" opacity="0.6"/><circle cx="85" cy="60" r="0.5" fill="white" opacity="0.5"/></svg>') repeat;
    animation: animateStars 150s linear infinite;
    opacity: 0.3;
}

@keyframes animateStars {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-2000px);
    }
}

.login-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    display: inline-block;
    margin-bottom: 20px;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.logo-img {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 0 20px var(--accent-glow));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.brand-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 10px 0;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px var(--accent-glow);
}

.brand-krats {
    color: var(--primary-blue);
}

.brand-chat {
    color: var(--primary-green);
}

.brand-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 5px;
}

/* Login Box */
.login-box {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px var(--card-border),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(37, 211, 102, 0.15);
    border: 1px solid rgba(37, 211, 102, 0.3);
    color: #86efac;
}

.alert-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
    flex-shrink: 0;
}

/* Form */
.login-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.form-group.focused .form-label {
    color: var(--primary-blue);
}

.input-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    opacity: 0.7;
}

.futuristic-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(74, 144, 226, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.futuristic-input::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

.futuristic-input:focus {
    border-color: var(--primary-blue);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 
        0 0 0 4px rgba(74, 144, 226, 0.1),
        0 0 20px rgba(74, 144, 226, 0.2);
    transform: translateY(-2px);
}

.form-group.focused .futuristic-input {
    border-color: var(--primary-blue);
    box-shadow: 
        0 0 0 4px rgba(74, 144, 226, 0.1),
        0 0 20px rgba(74, 144, 226, 0.2);
}

/* Buttons */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #357ABD 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(74, 144, 226, 0.4);
    background: linear-gradient(135deg, #5ba0f2 0%, var(--primary-blue) 100%);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.btn-register {
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    border: 2px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(74, 144, 226, 0.1);
    transition: width 0.3s ease;
}

.btn-register:hover::before {
    width: 100%;
}

.btn-register:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.2);
}

.btn-register:active {
    transform: translateY(0);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(74, 144, 226, 0.2);
}

.divider span {
    padding: 0 15px;
    background: var(--card-bg);
    position: relative;
}

.privacy-note {
    text-align: center;
    margin: 18px 0 0;
    font-size: 0.85rem;
}

.privacy-note a {
    color: var(--text-secondary);
    text-decoration: underline;
}

.privacy-note a:hover {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        max-width: 100%;
    }

    .login-box {
        padding: 30px 24px;
    }

    .brand-title {
        font-size: 2.5rem;
    }

    .logo-img {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .brand-title {
        font-size: 2rem;
    }

    .login-title {
        font-size: 1.5rem;
    }
}
