/* Variables globales */
:root {
    --primary-orange: #ff7b00;
    --sunset-pink: #ffffff;
    --deep-purple: #f38d08;
    --grass-green: #2d5a27;
    --background-overlay: rgba(0, 0, 0, 0.7);
    --text-color: #fff;
    --border-color: #555;
    --orange-shadow: rgba(238, 145, 6, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    line-height: 1.6;
}

/* Contenedor principal - ahora más compacto y centrado */
.container {
    width: 90%;
    max-width: 700px; /* Ancho ideal para PC: no tan grande, muy elegante */
    background: rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
    margin: 20px auto;
    display: flex;
    flex-direction: row;
    gap: 0;
}

/* Logo flotante encima del contenedor - Ajuste fino */
.logo {
   width: 64px;
    height: 64px;
    border-radius: 50%;
    position: absolute;
    top: 0px;
    left: 70%;
    transform: translateX(-50%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 2;
    border: 3px solid rgb(0 0 0 / 39%);
    background: rgb(0 0 0 / 10%);
    object-fit: cover;
}

/* Sección de bienvenida (izquierda) - reducida a 40% */
.welcome-section {
    flex: 0 0 40%; /* Ocupa exactamente el 40% del ancho */
   background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.welcome-section h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-shadow: 
        0 0 10px rgba(238, 145, 6, 0.8),
        0 0 20px rgba(238, 145, 6, 0.8),
        0 0 30px rgba(238, 145, 6, 0.8);
}

.welcome-section p {
    font-size: 0.95rem;
    opacity: 0.9;
    padding: 0 15px;
}

/* Sección de login (derecha) - aumentada a 60% */
.login-section {
    flex: 0 0 60%; /* Ocupa exactamente el 60% del ancho */
    padding: 80px 30px 20px; /* Espacio extra arriba por el logo */
    background: transparent;
}

.header {
    text-align: center;
    margin-bottom: 25px;
}

.header h1 {
    font-size: 1.6rem;
    color: var(--text-color);
    font-weight: bold;
    text-shadow: 
        0 0 10px rgba(238, 145, 6, 0.8),
        0 0 20px rgba(238, 145, 6, 0.8),
        0 0 30px rgba(238, 145, 6, 0.8);
}

.header p {
    font-size: 0.9rem;
    color: #fff;
    margin-top: 5px;
}

/* Formulario */
form input[type="text"],
form input[type="password"] {
    width: 100%;
    padding: 0.6rem;
    border: none;
    border-bottom: 2px solid var(--border-color);
    background: transparent;
    outline: none;
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

form input:focus {
    border-bottom-color: var(--primary-orange);
}

form button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(162deg, rgba(0, 0, 0, 0.26), rgba(238, 145, 6, 0.23));
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

form button:hover {
    background: linear-gradient(145deg, #e67a00, #000);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 20px var(--orange-shadow),
        0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Links de autenticación */
.auth-links-container {
    margin-top: 25px;
    text-align: center;
    padding: 10px;
    max-width: 350px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.auth-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 8px 0;
    display: block;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.auth-link:hover {
    color: #e67a00;
    text-decoration: underline;
}

.auth-link:active {
    color: #004085;
}

/* Mensaje de error */
.error {
    background: rgba(238, 145, 6, 0.1);
    backdrop-filter: blur(15px);
    color: #d60000;
    padding: 10px;
    border-left: 4px solid #d60000;
    margin-bottom: 20px;
    font-size: 0.9em;
    border-radius: 4px;
    text-align: center;
}

/* Recaptcha */
.recaptcha-container {
    margin: 15px 0;
    display: flex;
    justify-content: center;
}

/* Responsive Design */

/* Tablet (hasta 768px) */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        width: 95%;
        max-width: 500px;
        border-radius: 10px;
    }

    .logo {
        top: -4px;
        width: 50px;
        height: 50px;
        left: 50%;
    }

    .welcome-section,
    .login-section {
        padding: 30px 20px;
        flex: 0 0 100%; /* Ocupa todo el ancho */
    }

    .welcome-section h2 {
        font-size: 1.9rem;
    }

    .header h1 {
        font-size: 1.4rem;
    }
}

/* Móvil pequeño (hasta 480px) */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        width: 98%;
        max-width: 420px;
        margin: 15px auto;
    }

    .logo {
       top: -4px;
        width: 50px;
        height: 50px;
        left: 50%;
    }

    .welcome-section,
    .login-section {
        padding: 25px 15px;
    }

    .welcome-section h2 {
        font-size: 1.9rem;
    }

    .header h1 {
        font-size: 1.3rem;
    }

    form input,
    form button {
        font-size: 0.95rem;
    }

    .auth-link {
        font-size: 0.9rem;
    }
}