:root {
    /* Variables para fácil mantenimiento y theming */
    --bg-image-url: url('https://ai.arkostudio.net/login-banner.jpg');
    --primary-color: #767786;
    --primary-hover: #000000;
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.85); /* Blanco suave para textos secundarios */
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --input-bg: rgba(255, 255, 255, 0.15); /* Fondo sutil para inputs */
}

#auth {
    background-image: var(--bg-image-url);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

#auth * {
    position: relative;
    z-index: 2;
}

#auth .card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    color: var(--text-color);
}

#auth .card-header {
    background: transparent;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-color);
    font-weight: 600;
    text-align: center;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

/* === MEJORAS DE LEGIBILIDAD: TEXTO EN BLANCO === */

/* Títulos y encabezados dentro de la tarjeta */
#auth .card h1,
#auth .card h2,
#auth .card h3,
#auth .card h4,
#auth .card h5,
#auth .card h6 {
    color: var(--text-color) !important;
}

/* Párrafos y textos descriptivos */
#auth .card p,
#auth .card span,
#auth .card label {
    color: var(--text-muted);
    font-weight: 400;
}

/* Labels de inputs específicos */
#auth .card label[for],
#auth .card .form-label {
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

/* Inputs y textareas */
#auth .card input[type="text"],
#auth .card input[type="email"],
#auth .card input[type="password"],
#auth .card input[type="tel"],
#auth .card input[type="url"],
#auth .card textarea,
#auth .card select {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color); /* Texto blanco al escribir */
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Placeholder en blanco con transparencia */
#auth .card input::placeholder,
#auth .card textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1; /* Firefox fix */
}

/* Focus state para inputs */
#auth .card input:focus,
#auth .card textarea:focus,
#auth .card select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(118, 119, 134, 0.3);
    background: rgba(255, 255, 255, 0.2);
}

/* Links dentro del formulario (Forgot password, Register, etc.) */
#auth .card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

#auth .card a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

/* Checkbox y radio buttons */
#auth .card input[type="checkbox"],
#auth .card input[type="radio"] {
    accent-color: var(--primary-color); /* Color del check en navegadores modernos */
    cursor: pointer;
}

/* Texto junto a checkboxes */
#auth .card .checkbox-label,
#auth .card input[type="checkbox"] + span,
#auth .card input[type="radio"] + span {
    color: var(--text-muted);
    cursor: pointer;
}

/* Mensajes de error o ayuda (si existen) */
#auth .card .error-message,
#auth .card .help-text,
#auth .card small {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

/* === FIN MEJORAS DE LEGIBILIDAD === */

.btn-primary {
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Accesibilidad: Focus visible para navegación con teclado */
.btn-primary:focus-visible,
#auth .card a:focus-visible,
#auth .card input:focus-visible {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
}

/* Responsive: Ajustes para móviles */
@media (max-width: 480px) {
    #auth .card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    #auth .card input[type="text"],
    #auth .card input[type="email"],
    #auth .card input[type="password"] {
        padding: 0.625rem 0.875rem;
        font-size: 0.95rem;
    }
}

/* Soporte para usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}