@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --bg-page: #1a1714;
    --bg-overlay: rgba(12, 10, 9, 0.68);
    --panel: rgba(34, 28, 24, 0.78);
    --panel-strong: rgba(24, 20, 17, 0.9);
    --line: rgba(255, 245, 235, 0.16);
    --line-strong: rgba(255, 245, 235, 0.26);

    --text-main: #f5eee7;
    --text-soft: #d8cabd;
    --text-muted: #b5a79a;

    --accent: #7a6654;
    --accent-hover: #665443;
    --accent-soft: #9a8773;

    --danger: #ffb4b4;
    --success: #d8ead0;

    --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.35);
    --radius-lg: 24px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

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

body,
#pagina-registro {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    background:
        linear-gradient(var(--bg-overlay), var(--bg-overlay)),
        url('../assets/PavosTruchasRia.jpeg') center center / cover no-repeat fixed;
    min-height: 100vh;
    padding-top: 65px;
}

/* CONTENEDOR PRINCIPAL */
.login-container,
main .login-section {
    min-height: calc(100vh - 65px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px 72px;
}

/* TARJETA */
.login-card,
.login-section {
    width: 100%;
    max-width: 520px;
    background: var(--panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 42px 34px;
    position: relative;
    overflow: hidden;
}

.login-card::before,
.login-section::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
}

/* CABECERA */
.login-header,
.login-section h2 {
    text-align: center;
}

.login-header {
    margin-bottom: 28px;
}

.login-header h2,
.login-section h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.2rem, 4vw, 3.1rem);
    font-weight: 600;
    line-height: 1;
    color: var(--text-main);
    letter-spacing: 0.4px;
    margin-bottom: 10px;
}

.login-header p,
.login-section p {
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* LINEA DECORATIVA */
.login-section hr {
    border: 0;
    height: 1px;
    background: var(--line);
    margin: 22px 0 26px;
}

/* FORMULARIO */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

.input-group label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-weight: 600;
    color: var(--text-soft);
}

.input-group input {
    width: 100%;
    min-height: 50px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group input:focus {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(122, 102, 84, 0.18);
}

/* PASSWORD */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--text-main);
}

/* ALERTAS */
.alert,
.alert-danger {
    background: rgba(120, 34, 34, 0.18);
    border: 1px solid rgba(255, 180, 180, 0.26);
    color: #ffe2e2;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 18px;
}

.alert p,
.alert-danger p,
.input-error-text {
    color: #ffe2e2;
    font-size: 0.88rem;
    line-height: 1.5;
}

.input-group ul {
    margin: 0;
    padding-left: 18px;
}

/* TEXTO AUXILIAR */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    margin-bottom: 10px;
    font-size: 0.84rem;
    color: var(--text-soft);
}

.login-options a,
.login-footer-text a,
.privacy-modal-link,
.terms-label a {
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid rgba(245, 238, 231, 0.38);
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.login-options a:hover,
.login-footer-text a:hover,
.privacy-modal-link:hover,
.terms-label a:hover {
    opacity: 0.82;
    border-color: rgba(245, 238, 231, 0.7);
}

/* BOTONES */
.btn-main,
.w-100,
#btn-google {
    width: 100%;
    min-height: 52px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.btn-main,
button[type="submit"].w-100,
.w-100:not(.btn-google) {
    background: var(--accent);
    color: var(--text-main);
    border: 1px solid transparent;
}

.btn-main:hover,
button[type="submit"].w-100:hover,
.w-100:not(.btn-google):hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-google,
#btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid var(--line);
}

.btn-google:hover,
#btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

.btn-google img {
    width: 18px;
    height: 18px;
}

/* SEPARADOR */
.separator {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 6px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.separator::before,
.separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* FOOTER CARD */
.login-footer-text {
    text-align: center;
    margin-top: 24px;
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* CHECKBOX TÉRMINOS */
.terms-label,
#pagina-registro label:has(input[name="terminos"]) {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 0.84rem;
    line-height: 1.6;
}

.terms-label input[type="checkbox"],
#pagina-registro input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* LOGIN SIMPLE */
.login-section {
    text-align: center;
}

.login-section #btn-google {
    margin-top: 8px;
}

/* MODAL PRIVACIDAD */
.privacy-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 8, 8, 0.72);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 6000;
}

.privacy-modal-overlay.active {
    display: flex;
}

.privacy-modal {
    width: 100%;
    max-width: 980px;
    max-height: 88vh;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.privacy-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--text-main);
}

.privacy-modal-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 600;
}

.privacy-modal-close {
    background: transparent;
    border: 0;
    color: var(--text-main);
    font-size: 1.8rem;
    cursor: pointer;
}

.privacy-modal-frame {
    width: 100%;
    height: calc(88vh - 72px);
    border: 0;
    background: #fff;
}

/* AJUSTES ESPECÍFICOS REGISTRO */
#pagina-registro .login-card {
    max-width: 560px;
    padding: 34px 30px;
}

#pagina-registro .login-form {
    gap: 14px;
}

#pagina-registro .login-header {
    margin-bottom: 22px;
}

#pagina-registro .login-header p {
    max-width: 420px;
    margin: 0 auto;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .login-card,
    .login-section {
        padding: 30px 22px;
        border-radius: 20px;
    }

    .login-header h2,
    .login-section h2 {
        font-size: 2.4rem;
    }

    .btn-main,
    .w-100,
    #btn-google {
        min-height: 48px;
    }

    .login-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    body,
    #pagina-registro {
        background:
            linear-gradient(rgba(12, 10, 9, 0.76), rgba(12, 10, 9, 0.76)),
            url('/assets/PavosTruchasRia.jpeg') center center / cover no-repeat;
        background-attachment: scroll;
    }

    .login-container,
    main .login-section {
        padding: 28px 16px 52px;
    }

    .login-card,
    .login-section {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .login-header h2,
    .login-section h2 {
        font-size: 2rem;
    }

    .input-group label {
        font-size: 0.72rem;
    }

    .input-group input {
        min-height: 46px;
        padding: 12px 14px;
    }

    .login-footer-text {
        font-size: 0.84rem;
    }
}
