body.login-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    color: #f8fbff;
    background: #030711;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: "Inter", "Outfit", system-ui, -apple-system, sans-serif;
}

body.login-page * {
    box-sizing: border-box;
}

body.login-page main::before {
    display: none !important;
    content: none !important;
}

.login-video-bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
    filter: saturate(1.12) contrast(1.06);
}

.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(3,7,17,0.66) 0%, rgba(3,7,17,0.34) 48%, rgba(3,7,17,0.18) 100%),
        linear-gradient(180deg, rgba(3,7,17,0.08) 0%, rgba(3,7,17,0.66) 100%);
}

.login-header,
.login-stage,
.login-footer {
    position: relative;
    z-index: 10;
}

.login-header {
    flex: 0 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px clamp(18px, 4vw, 48px);
    background: rgba(5, 8, 22, 0.56);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
}

.brand-lockup,
.login-nav {
    display: flex;
    align-items: center;
}

.brand-lockup {
    gap: 12px;
    text-decoration: none;
    font-family: "Cinzel", serif;
    color: #ffd700;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(255,215,0,0.42));
}

.login-nav {
    gap: 8px;
}

.login-nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 850;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.login-nav a:hover {
    background: rgba(255,255,255,0.09);
    color: #fff;
    transform: translateY(-1px);
}

.login-stage {
    flex: 1 0 auto;
    width: min(1180px, calc(100% - 36px));
    min-height: 0;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(360px, 520px) 430px;
    justify-content: center;
    gap: clamp(54px, 8vw, 120px);
    align-items: center;
    padding: 42px 0 34px;
}

.login-world-panel {
    max-width: 520px;
    padding: 0;
    background: transparent;
    border: 0;
    backdrop-filter: none;
    text-align: left;
}

.login-copy-panel {
    width: fit-content;
    max-width: 520px;
    padding: 24px 26px;
    border-radius: 8px;
    background: rgba(3,7,17,0.34);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 22px 70px rgba(0,0,0,0.24);
    backdrop-filter: blur(8px);
}

.status-pill {
    width: fit-content;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #9ff7ff;
    background: rgba(255,255,255,0.065);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    font-size: 0.76rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00ffaa;
    box-shadow: 0 0 16px rgba(0,255,170,0.9);
    animation: loginPulse 1.8s infinite;
}

@keyframes loginPulse {
    0%, 100% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.25); opacity: 1; }
}

.login-world-panel h1 {
    margin: 20px 0 14px;
    max-width: 520px;
    color: #fff;
    font-size: clamp(3.2rem, 6.2vw, 5.5rem);
    line-height: 0.92;
    letter-spacing: 0;
    text-shadow: 0 20px 60px rgba(0,0,0,0.55);
}

.login-world-panel p {
    max-width: 520px;
    margin: 0;
    color: rgba(233,242,255,0.76);
    font-size: clamp(1rem, 1.45vw, 1.16rem);
    line-height: 1.62;
}

.login-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.login-feature-grid div {
    min-height: 108px;
    padding: 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.login-feature-grid i {
    color: #ffd700;
    font-size: 1.35rem;
}

.login-feature-grid strong,
.login-feature-grid span {
    display: block;
}

.login-feature-grid strong {
    margin-top: 12px;
    color: #fff;
    font-size: 1rem;
}

.login-feature-grid span {
    margin-top: 3px;
    color: rgba(233,242,255,0.62);
    font-size: 0.82rem;
    font-weight: 750;
}

.login-card-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    position: relative;
    width: min(430px, 100%);
    padding: 26px;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(12,18,39,0.94), rgba(6,10,24,0.9)),
        rgba(255,255,255,0.04);
    border: 1px solid rgba(255,215,0,0.28);
    box-shadow: 0 28px 90px rgba(0,0,0,0.48), inset 0 0 36px rgba(255,215,0,0.035);
    overflow: hidden;
    backdrop-filter: blur(18px);
    z-index: 20;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 3px solid #ffd700;
    opacity: 0.95;
    pointer-events: none;
}

.back-home {
    position: relative;
    z-index: 1;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 999px;
    color: #ffd700;
    text-decoration: none;
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,215,0,0.44);
    font-weight: 950;
    letter-spacing: 0.02em;
}

.back-home:hover {
    color: #181103;
    background: linear-gradient(135deg, #ffd700, #ffae00);
}

.login-card-title {
    position: relative;
    z-index: 1;
    text-align: center;
    margin: 22px 0 18px;
}

.login-card-title span {
    color: #9ff7ff;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-card-title h2 {
    margin: 8px 0 8px;
    color: #ffd700;
    font-size: clamp(1.8rem, 4vw, 2.25rem);
    line-height: 1;
    text-shadow: 0 0 22px rgba(255,215,0,0.28);
}

.login-card-title p {
    margin: 0;
    color: rgba(233,242,255,0.7);
}

.portal-form {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
}

.portal-form label {
    display: grid;
    gap: 7px;
}

.portal-form label span {
    color: #9ff7ff;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-form .form-control {
    width: 100%;
    min-height: 50px;
    padding: 13px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(3,7,17,0.66);
    color: #eaf2ff;
    font: inherit;
    outline: none;
    box-shadow: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.portal-form .form-control::placeholder {
    color: rgba(233,242,255,0.42);
}

.portal-form .form-control:focus {
    color: #fff;
    background: rgba(3,7,17,0.76);
    border-color: rgba(255,215,0,0.72);
    box-shadow: 0 0 0 3px rgba(255,215,0,0.1);
    transform: translateY(-1px);
}

.password-field {
    position: relative;
    display: block;
}

.password-field .form-control {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: rgba(233,242,255,0.72);
    background: rgba(255,255,255,0.055);
    transform: translateY(-50%);
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.password-toggle:hover,
.password-toggle.is-visible {
    color: #ffd700;
    background: rgba(255,215,0,0.12);
}

.password-toggle:focus-visible {
    outline: 2px solid rgba(255,215,0,0.75);
    outline-offset: 2px;
}

.form-link-row {
    display: flex;
    justify-content: flex-end;
}

.form-link-row a,
.portal-switch a {
    color: #9ff7ff;
    text-decoration: none;
    font-weight: 850;
}

.form-link-row a:hover,
.portal-switch a:hover {
    color: #fff;
}

.portal-submit {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffd700, #ff9f1c);
    color: #151000;
    font-weight: 950;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 0 30px rgba(255,176,0,0.26);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.portal-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 38px rgba(255,176,0,0.34);
}

.portal-submit.register {
    background: linear-gradient(135deg, #00ffaa, #00d4ff);
    color: #031018;
    box-shadow: 0 0 30px rgba(0,255,170,0.2);
}

.portal-submit.info {
    background: linear-gradient(135deg, #9ff7ff, #3b82f6);
    color: #031018;
    box-shadow: 0 0 30px rgba(59,130,246,0.2);
}

.portal-divider {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: rgba(255,255,255,0.44);
    font-weight: 900;
    text-transform: uppercase;
}

.portal-divider::before,
.portal-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(255,255,255,0.12);
}

.portal-switch {
    position: relative;
    z-index: 1;
    margin: 0;
    text-align: center;
    color: rgba(255,255,255,0.78);
    font-weight: 800;
}

.portal-switch.compact {
    margin-top: 4px;
}

.forgot-heading {
    text-align: center;
}

.forgot-heading i {
    color: #9ff7ff;
    font-size: 1.45rem;
}

.forgot-heading h3 {
    margin: 10px 0 8px;
    color: #fff;
    font-size: 1.35rem;
}

.forgot-heading p {
    margin: 0 0 6px;
    color: rgba(233,242,255,0.68);
    line-height: 1.5;
    font-size: 0.92rem;
}

.legal-checkbox {
    grid-template-columns: auto 1fr !important;
    align-items: flex-start;
    gap: 10px !important;
    margin: 2px 0 4px;
    color: rgba(233,242,255,0.7);
    font-size: 0.78rem;
    line-height: 1.35;
}

.legal-checkbox input {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: #ffd700;
}

.legal-checkbox span {
    color: rgba(233,242,255,0.72) !important;
    font-size: 0.78rem !important;
    font-weight: 750 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.legal-checkbox a,
.login-legal-links a {
    color: #9ff7ff;
    text-decoration: none;
    font-weight: 900;
}

.legal-checkbox a:hover,
.login-legal-links a:hover {
    color: #fff;
}

#msgBox {
    position: relative;
    z-index: 1;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    font-weight: 800;
}

#msgBox.alert-danger {
    color: #ffd4d4;
    background: rgba(255,71,87,0.14);
    border-color: rgba(255,71,87,0.32);
}

#msgBox.alert-success {
    color: #c8ffe9;
    background: rgba(0,255,170,0.12);
    border-color: rgba(0,255,170,0.3);
}

.d-none {
    display: none !important;
}

.login-footer {
    flex: 0 0 auto;
    min-height: 60px;
    width: min(1280px, calc(100% - 36px));
    margin: 0 auto;
    padding: 0 0 max(18px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: rgba(255,255,255,0.52);
    font-size: 0.82rem;
    font-weight: 800;
}

.login-legal-links {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    row-gap: 6px;
}

.simulated-events-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 8;
    overflow: hidden;
}

.simulated-toast {
    position: absolute;
    bottom: -58px;
    max-width: min(480px, 86vw);
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(8, 13, 30, 0.84);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #eaf2ff;
    font-size: 0.92rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    will-change: transform, opacity;
    animation: floatUpToast 8s linear forwards;
    text-shadow: 0 2px 6px rgba(0,0,0,0.45);
    box-shadow: 0 16px 42px rgba(0,0,0,0.62);
}

.simulated-toast.event-combat {
    border-left: 3px solid #ff4757;
    box-shadow: -5px 0 22px rgba(255, 71, 87, 0.32), 0 16px 42px rgba(0,0,0,0.62);
}

.simulated-toast.event-upgrade {
    border-left: 3px solid #2ed573;
    box-shadow: -5px 0 22px rgba(46, 213, 115, 0.32), 0 16px 42px rgba(0,0,0,0.62);
}

.simulated-toast.event-chest {
    border-left: 3px solid #ffa502;
    box-shadow: -5px 0 22px rgba(255, 165, 2, 0.36), 0 16px 42px rgba(0,0,0,0.62);
}

.simulated-toast.event-join {
    border-left: 3px solid #1e90ff;
    box-shadow: -5px 0 22px rgba(30, 144, 255, 0.36), 0 16px 42px rgba(0,0,0,0.62);
}

.toast-icon {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    font-size: 1rem;
}

.toast-user {
    color: #ffd700;
    font-weight: 950;
}

@keyframes floatUpToast {
    0% { transform: translateY(0) scale(0.92); opacity: 0; }
    10% { transform: translateY(-10vh) scale(1); opacity: 1; }
    76% { transform: translateY(-58vh) scale(1); opacity: 0.9; }
    100% { transform: translateY(-78vh) scale(0.94); opacity: 0; }
}

@media (max-width: 1080px) {
    .login-stage {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 36px;
    }

    .login-world-panel {
        max-width: none;
        text-align: center;
    }

    .login-copy-panel {
        margin: 0 auto;
    }

    .status-pill {
        margin: 0 auto;
    }

    .login-world-panel p {
        margin: 0 auto;
    }

    .login-card-wrapper {
        align-items: flex-start;
    }
}

@media (max-height: 820px) and (min-width: 721px) {
    .login-stage {
        align-items: start;
        padding: 28px 0 22px;
    }

    .login-card {
        padding: 22px;
    }

    .login-card-title {
        margin: 16px 0 14px;
    }

    .portal-form {
        gap: 10px;
    }

    .portal-form .form-control {
        min-height: 46px;
        padding-top: 11px;
        padding-bottom: 11px;
    }

    .portal-submit {
        min-height: 48px;
    }

    .portal-divider {
        margin: 14px 0 10px;
    }

    .login-footer {
        min-height: 48px;
        padding-bottom: 14px;
    }
}

@media (max-height: 700px) and (min-width: 721px) {
    .login-stage {
        grid-template-columns: minmax(320px, 470px) minmax(360px, 430px);
        gap: clamp(28px, 5vw, 70px);
        padding: 20px 0 18px;
    }

    .login-copy-panel {
        padding: 20px 22px;
    }

    .login-world-panel h1 {
        margin: 16px 0 12px;
        font-size: clamp(2.7rem, 5vw, 4.5rem);
    }

    .login-world-panel p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .login-feature-grid div {
        min-height: 92px;
        padding: 13px;
    }

    .login-card {
        padding: 20px 24px;
    }

    .back-home {
        min-height: 38px;
    }

    .login-card-title h2 {
        font-size: clamp(1.55rem, 3vw, 2rem);
    }
}

@media (max-width: 720px) {
    body.login-page {
        overflow-y: auto;
    }

    .login-header {
        justify-content: center;
        flex-wrap: wrap;
    }

    .brand-lockup {
        width: 100%;
        justify-content: center;
    }

    .login-nav {
        display: none;
    }

    .login-stage {
        width: min(100% - 24px, 520px);
        min-height: auto;
        padding: 28px 0;
    }

    .login-feature-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 22px;
    }

    .login-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
