:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary-sky: #00D2FF;
    --secondary-rose: #FB7185;
    --text-heading: #0F172A;
    --text-body: #475569;
    --text-muted: #94A3B8;
    --border-mesh: rgba(226, 232, 240, 0.8);
    --glass-card: rgba(255, 255, 255, 0.94);
    --glass-border: rgba(255, 255, 255, 0.6);
    --radius-pill: 9999px;
    --radius-card: 20px;
    --radius-input: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.universe-body {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    color: var(--text-heading);
    background: 
        radial-gradient(circle at 5% 15%, rgba(251, 113, 133, 0.8) 0%, rgba(251, 113, 133, 0) 38%),
        radial-gradient(circle at 10% 45%, rgba(251, 191, 36, 0.75) 0%, rgba(251, 191, 36, 0) 32%),
        radial-gradient(circle at 95% 15%, rgba(0, 210, 255, 0.85) 0%, rgba(0, 210, 255, 0) 40%),
        radial-gradient(circle at 90% 50%, rgba(56, 189, 248, 0.75) 0%, rgba(56, 189, 248, 0) 35%),
        radial-gradient(circle at 50% 5%, rgba(99, 102, 241, 0.85) 0%, rgba(99, 102, 241, 0) 50%),
        linear-gradient(180deg, #4F46E5 0%, #4338CA 30%, #3730A3 50%, #EEF2FF 78%, #FFFFFF 100%);
    overflow-x: hidden;
}

.universe-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.25) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 1;
}

.universe-auth-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 480px;
    margin: auto;
}

.auth-card-glass {
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 44px 38px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.brand-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 22px;
}

.brand-symbol {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.brand-text {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.02em;
}

.auth-heading-group {
    margin-bottom: 26px;
}

.sub-pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    color: #4338CA;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pulse-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 8px #10B981;
}

.auth-title {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0F172A;
    line-height: 1.2;
}

.auth-description {
    font-size: 0.92rem;
    color: var(--text-body);
    margin-top: 6px;
    line-height: 1.5;
}

.social-oauth-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.btn-social-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-input);
    color: #1E293B;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.btn-social-oauth:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 24px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

.auth-divider span {
    padding: 0 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-field-wrapper {
    margin-bottom: 20px;
}

.form-field-label {
    display: block;
    margin-bottom: 9px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1E293B;
    line-height: 1.3;
}

.label-row-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 9px;
}

.label-row-split .form-field-label {
    margin-bottom: 0;
}

.forgot-link {
    font-size: 0.84rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

.input-icon-shell {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon-shell svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94A3B8;
    pointer-events: none;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.form-control-mesh {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 48px;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-input);
    font-size: 0.94rem;
    color: #0F172A;
    font-weight: 500;
    outline: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-control-mesh:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
}

.form-control-mesh:focus + svg,
.input-icon-shell:focus-within svg {
    color: var(--primary);
}

.form-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    margin-bottom: 24px;
}

.custom-checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark-box {
    width: 18px;
    height: 18px;
    border: 1.5px solid #CBD5E1;
    border-radius: 5px;
    background: #FFFFFF;
    display: inline-block;
    position: relative;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.custom-checkbox-container input:checked ~ .checkmark-box {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox-container input:checked ~ .checkmark-box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-caption {
    font-size: 0.86rem;
    color: var(--text-body);
    font-weight: 500;
}

.btn-primary-gradient {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
    border: none;
    border-radius: var(--radius-input);
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(79, 70, 229, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45);
    background: linear-gradient(135deg, #4338CA 0%, #312E81 100%);
}

.btn-primary-gradient:active {
    transform: translateY(0);
}

.auth-switch-link {
    text-align: center;
    margin-top: 24px;
    font-size: 0.88rem;
    color: var(--text-body);
}

.auth-switch-link a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-switch-link a:hover {
    text-decoration: underline;
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-input);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.alert-success {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
}

.alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.otp-inputs-grid {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 20px 0;
}

.otp-digit {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: #1E1B4B;
    background: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.otp-digit:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    transform: translateY(-2px);
}

.icon-avatar-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #EEF2FF;
    border: 2px solid #C7D2FE;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.text-center {
    text-align: center;
}

.highlight-text {
    color: var(--primary);
    word-break: break-all;
}

.resend-block {
    margin-top: 24px;
    font-size: 0.88rem;
    color: var(--text-body);
}

.btn-link-action {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 4px;
}

.btn-link-subtle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.84rem;
    cursor: pointer;
    text-decoration: underline;
}

.mt-4 {
    margin-top: 16px;
}

@media (max-width: 480px) {
    .auth-card-glass {
        padding: 32px 22px;
    }
    .otp-digit {
        width: 42px;
        height: 50px;
        font-size: 1.3rem;
    }
}