:root {
    --bg-dark: #030614;
    --bg-darker: #01020a;
    --gold-primary: #dcb35f;
    --gold-light: #f5d78d;
    --gold-dark: #a87e2b;
    --blue-primary: #00479e;
    --blue-glow: #0066ff;
    --border-color: #1a2c5b;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

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

/* Background Effects */
.bg-glow {
    position: absolute;
    bottom: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 50vh;
    background: radial-gradient(ellipse at center, rgba(0, 102, 255, 0.15) 0%, rgba(3, 6, 20, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

.bg-grid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    background-image: 
        linear-gradient(rgba(26, 44, 91, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 44, 91, 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: perspective(500px) rotateX(60deg);
    transform-origin: bottom;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

.bg-grid::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    border: 1px solid rgba(0, 102, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.2), inset 0 0 20px rgba(0, 102, 255, 0.2);
    z-index: -1;
}
.bg-grid::before {
    content: '';
    position: absolute;
    bottom: -10vw;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 80vw;
    border-radius: 50%;
    border: 1px solid rgba(0, 102, 255, 0.15);
    z-index: -1;
}

/* Main Container */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo Section */
.logo-wrapper {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    mix-blend-mode: screen;
}

.brand-logo {
    max-width: 320px;
    height: auto;
    /* Oscurecemos el fondo del logo para que al usar screen, el negro se vuelva 100% transparente sin cortar el texto */
    filter: contrast(1.4) brightness(0.85);
}

/* Header Text */
.header-text {
    text-align: center;
    margin-bottom: 2.5rem;
}

.header-text h1 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    color: var(--text-primary);
}

.header-text p {
    font-size: 0.9rem;
    color: var(--gold-primary);
    font-weight: 400;
}

/* Form Styles */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group .icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.input-group .icon svg {
    width: 18px;
    height: 18px;
}

.input-group .icon-right {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s ease;
}
.input-group .icon-right:hover {
    color: var(--text-primary);
}

.input-group .icon-right svg {
    width: 18px;
    height: 18px;
}

.input-group input {
    width: 100%;
    background-color: rgba(4, 9, 28, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.85rem 2.5rem 0.85rem 3rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.input-group input::placeholder {
    color: var(--text-secondary);
    font-weight: 300;
}

.input-group input:focus {
    border-color: var(--blue-primary);
    box-shadow: 0 0 10px rgba(0, 71, 158, 0.4);
    background-color: rgba(4, 9, 28, 0.8);
}

.input-group input:focus + .icon {
    color: var(--blue-glow);
}

/* Button */
.login-btn {
    width: 100%;
    padding: 0.85rem;
    margin-top: 0.5rem;
    border: none;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
    background-size: 200% auto;
    color: var(--bg-darker);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(220, 179, 95, 0.2);
}

.login-btn:hover {
    background-position: right center;
    box-shadow: 0 6px 20px rgba(220, 179, 95, 0.4);
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(1px);
}

/* Forgot Password Link */
.forgot-password {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--gold-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.forgot-password:hover {
    color: var(--gold-light);
    text-shadow: 0 0 8px rgba(245, 215, 141, 0.5);
}

/* Responsive adjustments */
@media (max-width: 500px) {
    .login-container {
        padding: 1.5rem;
    }
    .brand-logo {
        max-width: 220px;
    }
    .header-text h1 {
        font-size: 1.5rem;
    }
}
