﻿/* =============================================
   LOGIN / AUTH — JustAnime-style
   ============================================= */

html, body.login-page {
    height: 100%;
    overflow: hidden;
}

.auth-page {
    display: flex;
    min-height: 100dvh;
    background: #0d0d0d;
    overflow: hidden;
}

/* =============================================
   LEFT PANEL
   ============================================= */
.auth-left {
    position: relative;
    flex: 0 0 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #080808;
}

/* Animated poster collage background */
.auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 25% 40%, rgba(219,123,59,0.18) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 70%, rgba(100,60,180,0.14) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 60% 10%, rgba(219,123,59,0.1) 0%, transparent 55%);
    z-index: 0;
}

/* Fine dot grid */
.auth-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    z-index: 1;
    mask-image: radial-gradient(ellipse 75% 75% at 40% 50%, black 20%, transparent 100%);
}

/* Right-edge gradient bleed into form panel */
.auth-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 55%, #0d0d0d 100%);
    z-index: 2;
    pointer-events: none;
}

/* Hidden blobs */
.auth-blob { display: none; }

/* Left inner */
.auth-left-inner {
    position: relative;
    z-index: 3;
    padding: 56px 48px;
    max-width: 480px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 48px;
}
.brand-animes { color: #fff; }
.brand-hub {
    color: #fff;
    background: #db7b3b;
    padding: 2px 6px 3px;
    border-radius: 5px;
    font-size: 20px;
    margin-left: 2px;
}

.auth-tagline { margin-bottom: 44px; }
.auth-tagline h2 {
    font-size: clamp(24px, 2.8vw, 34px);
    font-weight: 700;
    line-height: 1.28;
    color: #fff;
    margin: 0 0 12px;
    letter-spacing: -0.4px;
}
.auth-tagline p {
    font-size: 14.5px;
    color: rgba(255,255,255,0.38);
    margin: 0;
    line-height: 1.65;
}

.auth-stats {
    display: flex;
    gap: 32px;
    padding-top: 4px;
}
.auth-stat { display: flex; flex-direction: column; gap: 3px; }
.stat-num {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.4px;
    line-height: 1;
}
.stat-num span { color: #db7b3b; font-size: 16px; }
.stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.32);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* =============================================
   RIGHT FORM PANEL
   ============================================= */
.auth-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #0d0d0d;
    overflow-y: auto;
    padding: 40px 24px;
}

/* Back link */
.auth-back {
    position: absolute;
    top: 20px;
    left: 22px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.3);
    text-decoration: none;
    transition: color 0.2s;
    z-index: 2;
}
.auth-back:hover { color: rgba(255,255,255,0.7); }

/* Form box — clean, minimal */
.auth-box {
    width: 100%;
    max-width: 368px;
}

/* Mobile logo */
.auth-logo-mobile {
    display: none;
    justify-content: center;
    margin-bottom: 32px;
}
.auth-logo-mobile a {
    text-decoration: none;
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
}
.auth-logo-mobile .brand-animes { color: #fff; }
.auth-logo-mobile .brand-hub {
    color: #fff;
    background: #db7b3b;
    padding: 1px 5px 2px;
    border-radius: 4px;
    font-size: 17px;
    margin-left: 2px;
}

/* Heading */
.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}
.auth-subtitle {
    font-size: 13.5px;
    color: rgba(255,255,255,0.35);
    margin: 0 0 28px;
}

/* =============================================
   TABS
   ============================================= */
.auth-tabs {
    position: relative;
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 28px;
}
.auth-tab {
    background: none;
    border: none;
    padding: 8px 22px 11px 0;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    z-index: 1;
    letter-spacing: 0.01em;
    font-family: inherit;
}
.auth-tab.active { color: #fff; }
.auth-tab:hover:not(.active) { color: rgba(255,255,255,0.6); }

.auth-tab-indicator {
    position: absolute;
    bottom: -1px;
    height: 2px;
    background: #db7b3b;
    border-radius: 2px;
    transition: left 0.25s cubic-bezier(0.4,0,0.2,1), width 0.25s cubic-bezier(0.4,0,0.2,1);
    pointer-events: none;
}

/* =============================================
   FORM FIELDS
   ============================================= */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Error / Success banners */
.form-error,
.form-success {
    display: none;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
}
.form-error {
    background: rgba(220,50,50,0.1);
    border: 1px solid rgba(220,50,50,0.18);
    color: #f87171;
}
.form-success {
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.18);
    color: #4ade80;
}
.form-error.show, .form-success.show { display: flex; }

/* Form group */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Input wrapper */
.form-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 15px;
    height: 15px;
    color: rgba(255,255,255,0.22);
    pointer-events: none;
    flex-shrink: 0;
    z-index: 1;
}

.form-input-wrap input {
    width: 100%;
    height: 46px;
    background: #161616;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 0 44px 0 42px;
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: border-color 0.18s, background 0.18s;
    font-family: inherit;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.form-input-wrap input::placeholder { color: rgba(255,255,255,0.18); }
.form-input-wrap input:focus {
    border-color: rgba(219,123,59,0.55);
    background: #1a1a1a;
}
.form-input-wrap input:focus + .input-icon,
.form-input-wrap:focus-within .input-icon {
    color: rgba(219,123,59,0.6);
}

/* Toggle password */
.toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.22);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.18s;
    z-index: 1;
}
.toggle-pass:hover { color: rgba(255,255,255,0.6); }

/* Remember / Forgot row */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -4px;
}
.remember-me {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: rgba(255,255,255,0.38);
    cursor: pointer;
    user-select: none;
}
.remember-me input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #db7b3b;
    cursor: pointer;
}
.forgot-link {
    font-size: 13px;
    color: rgba(255,255,255,0.38);
    text-decoration: none;
    transition: color 0.18s;
}
.forgot-link:hover { color: #db7b3b; }

/* Submit button */
.auth-submit {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #db7b3b;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    letter-spacing: 0.01em;
    margin-top: 2px;
    transition: background 0.18s, transform 0.12s;
    font-family: inherit;
}
.auth-submit:hover { background: #c96e32; }
.auth-submit:active { transform: scale(0.99); }

/* Bottom switch text */
.auth-bottom {
    margin: 22px 0 0;
    text-align: center;
    font-size: 13.5px;
    color: rgba(255,255,255,0.3);
}
.auth-bottom a {
    color: #db7b3b;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.18s;
}
.auth-bottom a:hover { opacity: 0.8; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 820px) {
    html, body.login-page { overflow: auto; }
    .auth-page { flex-direction: column; height: auto; min-height: 100dvh; }
    .auth-left { display: none; }
    .auth-right {
        flex: 1;
        justify-content: flex-start;
        padding: 72px 20px 48px;
        min-height: 100dvh;
        background: #0d0d0d;
    }
    .auth-box { max-width: 420px; }
    .auth-logo-mobile { display: flex; }
    .auth-back { top: 16px; left: 16px; }
}
@media (max-width: 380px) {
    .auth-title { font-size: 20px; }
    .auth-right { padding: 64px 16px 40px; }
}
