@import url('./variables.css');

/* ─── AUTH LAYOUT ─── */

.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ─── LEFT ASIDE ─── */

.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to bottom right, #D99618e6, #EDA82A, #F5BC42cc);
    padding: 3rem;
    overflow: hidden;
    color: white;
}

.auth-aside-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.auth-aside-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
}

.auth-aside-glow-1 {
    width: 16rem;
    height: 16rem;
    top: 25%;
    right: 25%;
    background: rgba(255,255,255,0.1);
}

.auth-aside-glow-2 {
    width: 24rem;
    height: 24rem;
    bottom: 25%;
    left: 25%;
    background: rgba(255,255,255,0.05);
}

.auth-aside-top {
    position: relative;
    z-index: 20;
}

.auth-aside-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.auth-brand-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-brand-icon svg {
    width: 1rem;
    height: 1rem;
}

.auth-aside-bottom {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 0.875rem;
}

.auth-aside-bottom a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color var(--transition);
}

.auth-aside-bottom a:hover {
    color: white;
    text-decoration: none;
}

/* ─── CHARACTERS ─── */

.auth-characters-wrap {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 500px;
}

.auth-characters {
    position: relative;
    width: 550px;
    height: 400px;
}

.character {
    position: absolute;
    bottom: 0;
    transition: transform 700ms ease-in-out, height 700ms ease-in-out;
    transform-origin: bottom center;
}

.char-purple {
    left: 70px;
    width: 180px;
    height: 400px;
    background: #6C3FF5;
    border-radius: 10px 10px 0 0;
    z-index: 1;
}

.char-black {
    left: 240px;
    width: 120px;
    height: 310px;
    background: #2D2D2D;
    border-radius: 8px 8px 0 0;
    z-index: 2;
}

.char-orange {
    left: 0;
    width: 240px;
    height: 200px;
    background: #FF9B6B;
    border-radius: 120px 120px 0 0;
    z-index: 3;
}

.char-yellow {
    left: 310px;
    width: 140px;
    height: 230px;
    background: #E8D754;
    border-radius: 70px 70px 0 0;
    z-index: 4;
}

/* ─── EYES ─── */

.char-eyes {
    position: absolute;
    display: flex;
    gap: 32px;
    transition: left 700ms ease-in-out, top 700ms ease-in-out;
}

.char-eyes-sm {
    gap: 24px;
}

.eyeball {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height 150ms ease;
    overflow: hidden;
}

.eyeball-sm {
    width: 16px;
    height: 16px;
}

.eyeball.blink {
    height: 2px !important;
}

.eyeball-sm.blink {
    height: 2px !important;
}

.pupil {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2D2D2D;
    transition: transform 100ms ease-out;
    flex-shrink: 0;
}

.pupil-sm {
    width: 6px;
    height: 6px;
}

.pupil-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2D2D2D;
    transition: transform 100ms ease-out;
}

.char-mouth {
    position: absolute;
    width: 80px;
    height: 4px;
    background: #2D2D2D;
    border-radius: 9999px;
    transition: left 200ms ease-out, top 200ms ease-out;
}

/* ─── RIGHT FORM ─── */

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-white);
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-brand-mobile {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 3rem;
    color: var(--text);
}

.auth-brand-icon-mobile {
    background: var(--primary-light);
}

.auth-brand-icon-mobile svg {
    color: var(--primary);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-input-lg {
    height: 3rem;
    font-size: 0.9375rem;
    border-color: rgba(229, 231, 235, 0.6);
}

.form-input-lg:focus {
    border-color: var(--primary);
}

.input-password-wrap {
    position: relative;
}

.input-password-wrap .form-input {
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
}

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

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.auth-checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.auth-forgot {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
}

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

.auth-form .btn-primary {
    margin-top: 0.25rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    height: 3rem;
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--text);
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

/* ─── PASSWORD STRENGTH ─── */

.password-strength {
    margin-top: 0.5rem;
}

.password-strength-bar {
    display: flex;
    gap: 0.25rem;
}

.password-strength-segment {
    flex: 1;
    height: 3px;
    background: var(--bg-active);
    border-radius: var(--radius-full);
    transition: background var(--transition);
}

.password-strength-segment.weak { background: var(--danger); }
.password-strength-segment.fair { background: var(--warning); }
.password-strength-segment.good { background: var(--primary); }
.password-strength-segment.strong { background: var(--success); }

.password-strength-text {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: block;
}

/* ─── RESPONSIVE ─── */

@media (max-width: 1024px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }
    .auth-aside {
        display: none;
    }
    .auth-brand-mobile {
        display: flex;
    }
}

@media (max-width: 480px) {
    .auth-main {
        padding: 1.5rem;
    }
    .auth-title {
        font-size: 1.5rem;
    }
}
