/* ===================================================
   Auth Pages - Modern Login Styles
   Glassmorphism Design for Space Background
   =================================================== */

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

.auth-body {
    background-image: url('../images/bg.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ===== Space Scene (background nebula + GSAP particle zones) ===== */
.space-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.space-nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.3;
    animation: nebulaDrift 18s ease-in-out infinite;
}

.space-nebula-1 {
    width: 480px;
    height: 480px;
    top: -140px;
    left: -120px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.55), transparent 70%);
}

.space-nebula-2 {
    width: 420px;
    height: 420px;
    bottom: -160px;
    right: -100px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.45), transparent 70%);
    animation-delay: 4s;
}

.space-nebula-3 {
    width: 360px;
    height: 360px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(212, 175, 55, 0.16), transparent 70%);
    animation-delay: 8s;
}

@keyframes nebulaDrift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, -16px) scale(1.08);
    }
}

.space-side {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 26vw;
    max-width: 340px;
}

.space-side-left {
    left: 0;
}

.space-side-right {
    right: 0;
}

.star-particle {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.8);
    opacity: 0.5;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0.5;
}

.shooting-star {
    position: absolute;
    width: 110px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85) 70%, #ffffff);
    border-radius: 999px;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

.shooting-star::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 50%;
    width: 4px;
    height: 4px;
    background: #ffffff;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.9);
}

@media (max-width: 1100px) {
    .space-side {
        display: none;
    }
}

/* ===== Split Layout (Login: info panel + form panel) ===== */
.split-shell {
    min-height: 100vh;
    display: flex;
    position: relative;
    z-index: 1;
}

.split-info {
    flex: 1 1 46%;
    max-width: 620px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 60px 56px;
    /* Lets the space photo (set on .auth-body) show through directly,
       just darkened enough for the info text to stay readable. */
    background: linear-gradient(135deg, rgba(2, 3, 10, 0.78) 0%, rgba(2, 3, 10, 0.5) 55%, rgba(2, 3, 10, 0.22) 100%);
}

.split-info-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.split-info-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
    animation: nebulaDrift 18s ease-in-out infinite;
}

.split-info-glow-1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.55), transparent 70%);
}

.split-info-glow-2 {
    width: 380px;
    height: 380px;
    bottom: -140px;
    right: -80px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.4), transparent 70%);
    animation-delay: 5s;
}

.split-info-content {
    position: relative;
    z-index: 2;
    max-width: 440px;
}

.split-info-logo {
    margin-bottom: 36px;
}

.split-info-logo img {
    max-width: 260px;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
}

.split-info-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 60%, #d4af37);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.split-info-subtitle {
    font-size: 14.5px;
    line-height: 1.7;
    color: rgba(226, 232, 240, 0.65);
    margin-bottom: 36px;
}

.split-feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.split-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.split-feature-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #22d3ee;
    font-size: 20px;
}

.split-feature-item strong {
    display: block;
    font-size: 14.5px;
    color: #f1f5f9;
    margin-bottom: 2px;
}

.split-feature-item span {
    font-size: 12.5px;
    color: rgba(148, 163, 184, 0.75);
    line-height: 1.5;
}

.split-form {
    flex: 1 1 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    /* Frosted glass panel: the same space photo shows through blurred,
       visually separating the form side from the crisp image on the left. */
    background: linear-gradient(160deg, rgba(8, 11, 26, 0.55), rgba(4, 5, 14, 0.72));
    backdrop-filter: blur(36px) saturate(130%);
    -webkit-backdrop-filter: blur(36px) saturate(130%);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -40px 0 80px -20px rgba(0, 0, 0, 0.5) inset;
}

.split-mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 16px;
}

.split-mobile-logo img {
    max-width: 240px;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
}

@media (max-width: 900px) {
    .split-info {
        display: none;
    }

    .split-form {
        flex: 1 1 100%;
        padding: 32px 16px;
    }

    .split-mobile-logo {
        display: block;
    }
}

/* ===== Auth Wrapper ===== */
.auth-wrapper {
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* ===== Auth Container ===== */
.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    animation: authFadeIn 0.6s ease-out;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Logo ===== */
.auth-logo {
    text-align: center;
    margin-bottom: 12px;
}

.auth-logo img {
    max-width: 320px;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease;
}

.auth-logo img:hover {
    transform: scale(1.03);
}

/* ===== Glass Card ===== */
@property --auth-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.auth-card {
    position: relative;
    isolation: isolate;
    background: linear-gradient(160deg, rgba(20, 26, 53, 0.72), rgba(8, 11, 26, 0.88));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow:
        0 25px 60px -12px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.auth-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    padding: 1px;
    background: conic-gradient(from var(--auth-angle, 0deg), #22d3ee, #8b5cf6, #d4af37, #22d3ee);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    z-index: -1;
    animation: authBorderRotate 6s linear infinite;
}

@keyframes authBorderRotate {
    to {
        --auth-angle: 360deg;
    }
}

/* ===== Card Header ===== */
.auth-header {
    text-align: center;
    margin-bottom: 18px;
}

.auth-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #22d3ee, #8b5cf6 60%, #d4af37);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.45);
    animation: authPulse 2.5s ease-in-out infinite;
}

@keyframes authPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(139, 92, 246, 0.45);
    }

    50% {
        transform: scale(1.04);
        box-shadow: 0 14px 40px rgba(34, 211, 238, 0.5);
    }
}

.auth-icon i {
    font-size: 34px;
    color: white;
}

.auth-title {
    font-size: 25px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 60%, #d4af37);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-subtitle {
    font-size: 13px;
    color: rgba(226, 232, 240, 0.6);
}

/* ===== Alert ===== */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: authShake 0.4s ease;
}

@keyframes authShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    50% {
        transform: translateX(6px);
    }

    75% {
        transform: translateX(-3px);
    }
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.auth-alert-error i {
    font-size: 20px;
    color: #f87171;
    flex-shrink: 0;
}

.auth-alert-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: rgba(226, 232, 240, 0.6);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.auth-alert-close:hover {
    color: #ffffff;
}

/* ===== Form ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-label i {
    font-size: 14px;
    color: #22d3ee;
}

.auth-input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #f1f5f9;
    transition: all 0.25s ease;
    outline: none;
}

.auth-input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.auth-input:focus {
    border-color: #22d3ee;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

.auth-input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Password Field */
.auth-password-wrap {
    position: relative;
}

.auth-password-wrap .auth-input {
    padding-right: 48px;
}

.auth-password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(148, 163, 184, 0.8);
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    transition: color 0.2s;
}

.auth-password-toggle:hover {
    color: #22d3ee;
}

.auth-password-toggle i {
    font-size: 20px;
}

/* Error Text */
.auth-error {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #fca5a5;
}

.auth-error i {
    font-size: 13px;
}

/* ===== Captcha ===== */
.auth-captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-captcha-img-wrap {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-captcha-img-wrap:hover {
    border-color: #22d3ee;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

.auth-captcha-img-wrap:hover .auth-captcha-overlay {
    opacity: 1;
}

.auth-captcha-img {
    display: block;
    height: 40px;
}

.auth-captcha-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
}

.auth-captcha-overlay i {
    font-size: 24px;
    color: white;
}

.auth-captcha-input {
    flex: 1;
}

/* ===== Checkbox ===== */
.auth-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #22d3ee;
    cursor: pointer;
    border-radius: 4px;
}

.auth-checkbox-label {
    font-size: 14px;
    color: rgba(226, 232, 240, 0.75);
}

/* ===== Submit Button ===== */
.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #22d3ee, #8b5cf6);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.auth-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(139, 92, 246, 0.55);
}

.auth-submit-btn:hover::before {
    left: 100%;
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn i {
    font-size: 20px;
}

/* ===== Support Section ===== */
.auth-support {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.auth-support-text {
    font-size: 10px;
    color: rgba(148, 163, 184, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.auth-support-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.auth-support-logo-wrap {
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.auth-support-logo-wrap:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(34, 211, 238, 0.35);
}

.auth-support-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.auth-support-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
}

/* ===== Footer ===== */
.auth-footer {
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.5);
}

.auth-footer a {
    color: #67e8f9;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #d4af37;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .auth-wrapper {
        padding: 16px;
    }

    .auth-card {
        padding: 28px 24px;
        border-radius: 16px;
    }

    .auth-icon {
        width: 58px;
        height: 58px;
    }

    .auth-icon i {
        font-size: 28px;
    }

    .auth-title {
        font-size: 22px;
    }

    .auth-captcha-row {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-captcha-img-wrap {
        align-self: flex-start;
    }
}