/* ==========================================================================
   AFIRIN.NET AUTHENTICATION SYSTEM
   Playful Educational Design for Create Account (Pink) & Login (Blue)
   Matches reference layouts with 100% original Afirin branding & assets.
   ========================================================================== */

:root {
    --auth-pink-bg: #fff1f5;
    --auth-pink-primary: #ec4899;
    --auth-pink-hover: #db2777;
    --auth-pink-soft: #fdf2f8;
    --auth-pink-border: #fbcfe8;
    --auth-pink-shadow: rgba(236, 72, 153, 0.18);

    --auth-blue-bg: #eff6ff;
    --auth-blue-primary: #2563eb;
    --auth-blue-hover: #1d4ed8;
    --auth-blue-soft: #f0f7ff;
    --auth-blue-border: #bfdbfe;
    --auth-blue-shadow: rgba(37, 99, 235, 0.20);

    --auth-text-main: #0f172a;
    --auth-text-muted: #64748b;
    --auth-card-bg: #ffffff;
    --auth-input-bg: #ffffff;
    --auth-input-border: #e2e8f0;
}

/* Base resets for Auth Pages */
body.af-auth-body {
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--auth-text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

/* ==========================================================================
   1. THEME BACKGROUND VARIATIONS (Pink for Register, Blue for Login)
   ========================================================================== */

/* CREATE ACCOUNT: Pink theme */
body.af-auth-pink {
    background: linear-gradient(180deg, #ffeef4 0%, #ffdce8 45%, #ffcbe0 85%, #f472b6 100%);
    --auth-active-primary: var(--auth-pink-primary);
    --auth-active-hover: var(--auth-pink-hover);
    --auth-active-soft: var(--auth-pink-soft);
    --auth-active-border: var(--auth-pink-border);
    --auth-active-shadow: var(--auth-pink-shadow);
}

/* LOGIN: Blue theme */
body.af-auth-blue {
    background: linear-gradient(180deg, #eff8ff 0%, #dbeafe 45%, #bfdbfe 80%, #3b82f6 100%);
    --auth-active-primary: var(--auth-blue-primary);
    --auth-active-hover: var(--auth-blue-hover);
    --auth-active-soft: var(--auth-blue-soft);
    --auth-active-border: var(--auth-blue-border);
    --auth-active-shadow: var(--auth-blue-shadow);
}

/* Floating background stars & clouds decorations */
.af-auth-ambient-decor {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.af-auth-cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    filter: blur(1px);
}
.af-auth-cloud-1 { top: 7%; left: -40px; width: 220px; height: 75px; }
.af-auth-cloud-2 { top: 18%; right: -50px; width: 260px; height: 85px; }
.af-auth-cloud-3 { bottom: 22%; left: 4%; width: 170px; height: 55px; opacity: 0.5; }

.af-auth-star {
    position: absolute;
    width: 28px;
    height: 28px;
    color: #fbbf24;
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.4));
    animation: floatStar 4s ease-in-out infinite alternate;
}
.af-auth-star-1 { top: 12%; left: 16%; animation-delay: 0s; }
.af-auth-star-2 { top: 22%; right: 14%; animation-delay: 1.2s; width: 34px; height: 34px; color: #f59e0b; }
.af-auth-star-3 { bottom: 35%; right: 18%; animation-delay: 2.1s; }
.af-auth-star-4 { bottom: 26%; left: 18%; animation-delay: 0.8s; width: 22px; height: 22px; }

@keyframes floatStar {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    100% { transform: translateY(-8px) rotate(6deg) scale(1.06); }
}

/* ==========================================================================
   2. TOP AUTH NAVIGATION BAR
   ========================================================================== */

.af-auth-nav {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1380px;
    margin: 0 auto;
    width: 100%;
    padding: 24px 32px 12px;
    box-sizing: border-box;
}

.af-auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--auth-text-main);
}

.af-auth-brand-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    padding: 6px;
    box-sizing: border-box;
    transition: transform 0.2s ease;
}
.af-auth-brand:hover .af-auth-brand-logo {
    transform: rotate(-6deg) scale(1.05);
}

.af-auth-brand-logo img,
.af-auth-brand-logo svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.af-auth-brand-copy {
    display: flex;
    flex-direction: column;
}

.af-auth-brand-name {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1.1;
}

.af-auth-pink .af-auth-brand-name span { color: #ec4899; }
.af-auth-blue .af-auth-brand-name span { color: #2563eb; }

.af-auth-brand-tagline {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
    color: #64748b;
    text-transform: uppercase;
    margin-top: 2px;
}

.af-auth-top-action {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
}

.af-auth-top-action a {
    color: var(--auth-active-primary);
    text-decoration: none;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
}
.af-auth-top-action a:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

/* ==========================================================================
   3. MAIN STAGE (DESKTOP 3-COLUMN / BALANCED CONTAINER)
   ========================================================================== */

.af-auth-stage {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1420px;
    margin: 0 auto;
    width: 100%;
    padding: 10px 24px 40px;
    box-sizing: border-box;
}

.af-auth-stage-grid {
    display: grid;
    grid-template-columns: 1fr minmax(360px, 540px) 1fr;
    gap: 32px;
    align-items: center;
    width: 100%;
}

.af-auth-stage-grid--login {
    grid-template-columns: 1fr minmax(340px, 480px) 1fr;
}

/* Side decorative columns (Desktop only) */
.af-auth-side-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.af-auth-side-col--left {
    align-items: flex-end;
    text-align: right;
}
.af-auth-side-col--right {
    align-items: flex-start;
    text-align: left;
}

/* Stylized Motivational Typography Callouts */
.af-auth-script-heading {
    font-size: clamp(32px, 3.2vw, 44px);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.02em;
    max-width: 320px;
    margin: 0;
}
.af-auth-pink .af-auth-script-heading {
    color: #be185d;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.6);
}
.af-auth-blue .af-auth-script-heading {
    color: #1e40af;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.6);
}

/* Side Illustration Frame */
.af-auth-hero-art {
    width: 100%;
    max-width: 340px;
    height: auto;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.10));
    animation: gentleBob 5s ease-in-out infinite alternate;
}
@keyframes gentleBob {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

/* Side Checklist Card */
.af-auth-checklist-card {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 18px 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 280px;
}
.af-auth-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}
.af-auth-check-bullet {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
    flex-shrink: 0;
}

/* Side Stacked Books Spine Card (Right side of Register) */
.af-auth-spine-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 240px;
}
.af-auth-spine-item {
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.af-auth-spine-1 { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.af-auth-spine-2 { background: linear-gradient(90deg, #db2777, #f472b6); }
.af-auth-spine-3 { background: linear-gradient(90deg, #059669, #34d399); }
.af-auth-spine-4 { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* ==========================================================================
   4. CENTRAL WHITE AUTH CARD
   ========================================================================== */

.af-auth-card {
    background: var(--auth-card-bg);
    border-radius: 28px;
    box-shadow: 0 20px 45px -10px var(--auth-active-shadow), 0 0 0 1px rgba(255, 255, 255, 0.8);
    padding: 38px 36px 32px;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    z-index: 2;
}

.af-auth-card-header {
    margin-bottom: 24px;
}

.af-auth-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.af-auth-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #ffffff;
}
.af-auth-pink .af-auth-card-icon {
    background: linear-gradient(135deg, #ec4899, #db2777);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
}
.af-auth-blue .af-auth-card-icon {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.af-auth-card-title {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}
.af-auth-pink .af-auth-card-title { color: #831843; }
.af-auth-blue .af-auth-card-title { color: #1e3a8a; }

.af-auth-card-sub {
    font-size: 13.5px;
    color: #64748b;
    margin: 4px 0 0;
    font-weight: 600;
}

/* ==========================================================================
   5. ACCOUNT TYPE SELECTOR (Student vs Parent Pills)
   ========================================================================== */

.af-auth-role-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
    background: #f8fafc;
    padding: 5px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.af-auth-role-tab {
    cursor: pointer;
    position: relative;
}

.af-auth-role-tab input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.af-auth-role-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 800;
    color: #64748b;
    background: transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.af-auth-role-tab input:checked + .af-auth-role-pill {
    background: #ffffff;
    color: var(--auth-active-primary);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   6. FORM INPUTS & FIELD STYLING
   ========================================================================== */

.af-auth-form-group {
    margin-bottom: 15px;
}

.af-auth-label {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 6px;
}

.af-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.af-auth-input-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    pointer-events: none;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
}

.af-auth-input {
    width: 100%;
    height: 48px;
    background: var(--auth-input-bg);
    border: 1.5px solid var(--auth-input-border);
    border-radius: 14px;
    padding: 0 16px 0 42px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.af-auth-input:focus {
    border-color: var(--auth-active-primary);
    box-shadow: 0 0 0 3.5px var(--auth-active-shadow);
}

.af-auth-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

/* Password eye toggle */
.af-auth-pw-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: grid;
    place-items: center;
}
.af-auth-pw-toggle:hover {
    color: var(--auth-active-primary);
}

/* Select dropdown wrapper */
.af-auth-select-wrap select {
    appearance: none;
    cursor: pointer;
    padding-right: 38px;
}
.af-auth-select-chevron {
    position: absolute;
    right: 14px;
    pointer-events: none;
    color: #94a3b8;
}

/* Validation error block */
.af-auth-error {
    color: #e11d48;
    font-size: 12px;
    font-weight: 700;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 2-Column input grids */
.af-auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Gender selector pills (Boy / Girl vs Male / Female) */
.af-auth-gender-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.af-auth-gender-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.af-auth-gender-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.af-auth-gender-card input:checked + .af-auth-gender-content {
    color: var(--auth-active-primary);
}
.af-auth-gender-card.male.checked {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.07);
}
.af-auth-gender-card.female.checked {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.07);
}

.af-auth-gender-icon { font-size: 1.3rem; }
.af-auth-gender-title { font-size: 13px; font-weight: 800; color: #1e293b; }
.af-auth-gender-sub { font-size: 10.5px; font-weight: 600; color: #64748b; }

/* Remember me & Forgot password row */
.af-auth-row-remember {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 20px;
    font-size: 13px;
    font-weight: 700;
}
.af-auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #475569;
}
.af-auth-checkbox-label input {
    width: 17px;
    height: 17px;
    border-radius: 5px;
    accent-color: var(--auth-active-primary);
    cursor: pointer;
}
.af-auth-forgot-link {
    color: var(--auth-active-primary);
    text-decoration: none;
    font-weight: 700;
}
.af-auth-forgot-link:hover {
    text-decoration: underline;
}

/* Primary CTA Button */
.af-auth-btn-primary {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-sizing: border-box;
}

.af-auth-pink .af-auth-btn-primary {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    box-shadow: 0 8px 22px -2px rgba(236, 72, 153, 0.45);
}
.af-auth-pink .af-auth-btn-primary:hover {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%);
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.55);
    transform: translateY(-2px);
}

.af-auth-blue .af-auth-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 8px 22px -2px rgba(37, 99, 235, 0.45);
}
.af-auth-blue .af-auth-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.55);
    transform: translateY(-2px);
}

.af-auth-terms-note {
    font-size: 11.5px;
    color: #64748b;
    text-align: center;
    margin-top: 14px;
    line-height: 1.4;
}
.af-auth-terms-note a {
    color: var(--auth-active-primary);
    text-decoration: none;
    font-weight: 700;
}

/* ==========================================================================
   7. BENEFIT CARDS (Inspired by Blue Login Screenshot)
   ========================================================================== */

.af-auth-benefit-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 24px;
}

.af-auth-benefit-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 18px;
    padding: 16px 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}
.af-auth-benefit-icon {
    font-size: 26px;
    margin-bottom: 4px;
}
.af-auth-benefit-title {
    font-size: 12.5px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

/* ==========================================================================
   8. BOTTOM FOOTER STRIP (Waves & Brand Banner)
   ========================================================================== */

.af-auth-bottom-banner {
    position: relative;
    z-index: 10;
    margin-top: auto;
    width: 100%;
    padding: 24px 20px 20px;
    text-align: center;
    box-sizing: border-box;
}

.af-auth-pink .af-auth-bottom-banner {
    background: linear-gradient(180deg, rgba(244, 114, 182, 0.2) 0%, rgba(219, 39, 119, 0.9) 100%);
    color: #ffffff;
}

.af-auth-blue .af-auth-bottom-banner {
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.25) 0%, rgba(30, 64, 175, 0.92) 100%);
    color: #ffffff;
}

/* 4 Feature Items on Pink Bottom Bar */
.af-auth-feature-strip {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.af-auth-strip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
}
.af-auth-strip-icon {
    font-size: 24px;
}

.af-auth-footer-brand {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 4px 0 2px;
}
.af-auth-footer-tagline {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
}

/* ==========================================================================
   9. RESPONSIVE MEDIA QUERIES (Mobile-first prioritization)
   ========================================================================== */

@media (max-width: 1120px) {
    .af-auth-stage-grid {
        grid-template-columns: 1fr;
        max-width: 540px;
    }
    .af-auth-stage-grid--login {
        max-width: 460px;
    }
    .af-auth-side-col {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .af-auth-nav {
        padding: 16px 18px 8px;
    }
    .af-auth-brand-name {
        font-size: 20px;
    }
    .af-auth-brand-logo {
        width: 38px;
        height: 38px;
    }
    .af-auth-card {
        padding: 26px 20px;
        border-radius: 22px;
    }
    .af-auth-card-title {
        font-size: 21px;
    }
    .af-auth-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .af-auth-benefit-cards {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .af-auth-feature-strip {
        gap: 20px;
    }
}

@media (max-width: 380px) {
    .af-auth-gender-grid {
        grid-template-columns: 1fr;
    }
    .af-auth-nav {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        text-align: center;
    }
}
