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

:root {
    /* Colores principales */
    --color-primary-blue: #1C314D;
    --color-primary-orange: #EF683F;

    /* Colores del tema dark (por defecto) */
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #252d3d;
    --text-primary: #ffffff;
    --text-secondary: #b0b8c1;
    --text-tertiary: #808b98;
    --border-color: #2f3844;
    --input-bg: #161b26;
    --input-border: #2f3844;
    --shadow-color: rgba(0, 0, 0, 0.3);

    /* Transición */
    --transition: all 0.3s ease;
}

/* Tema Light */
body.light-theme {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f2f5;
    --text-primary: #1a1f2e;
    --text-secondary: #4a5568;
    --text-tertiary: #718096;
    --border-color: #e2e8f0;
    --input-bg: #f7fafc;
    --input-border: #cbd5e0;
    --shadow-color: rgba(0, 0, 0, 0.08);
}

html {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

/* Fondo con gradiente */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-primary-blue) 0%, rgba(31, 49, 77, 0.6) 100%);
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

/* Botón de cambio de tema */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.theme-btn:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

.theme-btn svg {
    width: 24px;
    height: 24px;
    transition: opacity 0.3s ease;
}

.sun-icon {
    position: absolute;
    opacity: 1;
}

.moon-icon {
    position: absolute;
    opacity: 0;
}

body.light-theme .sun-icon {
    opacity: 0;
}

body.light-theme .moon-icon {
    opacity: 1;
}

/* Contenedor principal */
.container {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
    align-items: center;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: slideDown 0.6s ease;
}

.logo {
    height: 80px;
    width: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px var(--shadow-color));
}

.logo-dark {
    display: block;
}

.logo-light {
    display: none;
}

body.light-theme .logo-dark {
    display: none;
}

body.light-theme .logo-light {
    display: block;
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--color-primary-blue), var(--color-primary-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Wrapper de formularios */
.forms-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
    animation: fadeIn 0.8s ease;
}

/* Panel de formulario */
.form-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px var(--shadow-color);
    transition: var(--transition);
}

.form-panel:hover {
    border-color: var(--color-primary-orange);
    box-shadow: 0 30px 80px var(--shadow-color);
}

.form-panel h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 700;
}

.register-subtitle {
    color: var(--color-primary-orange);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.register-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Botón Google */
.btn-google {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    margin-bottom: 20px;
}

.btn-google:hover {
    background: var(--color-primary-orange);
    border-color: var(--color-primary-orange);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

/* Botón Email Divider */
.btn-email-divider {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin: 20px 0 20px 0;
}

.btn-email-divider:hover {
    background: var(--color-primary-orange);
    border-color: var(--color-primary-orange);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

/* Divisor */
.divider {
    position: relative;
    margin: 25px 0;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    background: var(--bg-secondary);
    color: var(--text-tertiary);
    padding: 0 12px;
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
}

/* Formulario */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Grupo de formulario */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Wrapper de input */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    pointer-events: none;
}

.form-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary-orange);
    box-shadow: 0 0 0 3px rgba(239, 104, 63, 0.1);
}

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

/* Toggle de contraseña */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--color-primary-orange);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

/* Opciones del formulario */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary-orange);
}

.checkbox:hover {
    color: var(--text-primary);
}

.forgot-password {
    color: var(--color-primary-orange);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Grupo de checkbox */
.checkbox-group {
    margin-top: 10px;
}

.checkbox-group .checkbox {
    color: var(--text-secondary);
}

/* reCAPTCHA */
.recaptcha-notice {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.recaptcha {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.recaptcha input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-primary-orange);
}

.recaptcha label {
    cursor: pointer;
    color: var(--text-secondary);
}

.recaptcha-logo {
    margin-left: auto;
    text-align: right;
}

.recaptcha-logo small {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    display: block;
}

/* Botón de envío */
.btn-submit {
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--color-primary-blue), var(--color-primary-orange));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(239, 104, 63, 0.3);
}

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

.btn-register {
    background: linear-gradient(135deg, var(--color-primary-orange), #ff7d5c);
}

/* ==================== FOOTER ==================== */

.footer {
    width: 100%;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
    margin-top: auto;
    transition: var(--transition);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-left {
    display: flex;
    align-items: center;
}

.footer-logo {
    height: 40px;
    width: auto;
}

.footer-logo-dark {
    display: block;
}

.footer-logo-light {
    display: none;
}

body.light-theme .footer-logo-dark {
    display: none;
}

body.light-theme .footer-logo-light {
    display: block;
}

.footer-right {
    flex: 1;
    text-align: right;
}

.footer-right p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-right .highlight {
    color: var(--color-primary-orange);
    font-weight: 700;
}

.footer-right a.highlight {
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.footer-right a.highlight:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Animaciones */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .header h1 {
        font-size: 2.5rem;
    }

    .forms-wrapper {
        gap: 30px;
    }

    .form-panel {
        padding: 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .header {
        margin-bottom: 30px;
    }

    .logo {
        height: 60px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .forms-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .form-panel {
        padding: 25px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .theme-btn {
        width: 45px;
        height: 45px;
    }

    .theme-btn svg {
        width: 20px;
        height: 20px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-right {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.85rem;
    }

    .form-panel {
        padding: 20px;
        border-radius: 15px;
    }

    .form-panel h2 {
        font-size: 1.4rem;
    }

    .forms-wrapper {
        gap: 15px;
    }

    .divider span {
        font-size: 0.8rem;
    }

    .btn-google,
    .btn-submit {
        font-size: 0.9rem;
        padding: 11px 16px;
    }

    .theme-toggle {
        top: 15px;
        right: 15px;
    }

    .footer {
        padding: 20px 15px;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-logo,
    .footer-logo-dark,
    .footer-logo-light {
        height: 30px;
    }

    .footer-right p {
        font-size: 0.75rem;
    }
}

/* Inputs que siempre muestran/envían el valor en MAYÚSCULAS */
.input-uppercase,
input.input-uppercase {
    text-transform: uppercase;
}

.input-uppercase::placeholder {
    text-transform: none;
}
