:root {
    --brand-blue: rgb(72, 125, 171);
    --brand-pink: rgb(195, 26, 112);
    --brand-white: rgb(255, 255, 255);
    --bg-dark: #0a0b10;
    --gradient-brand: linear-gradient(135deg, rgb(72, 125, 171) 0%, rgb(195, 26, 112) 100%);
    --glow-blue: 0 0 20px rgba(72, 125, 171, 0.6);
    --glow-pink: 0 0 20px rgba(195, 26, 112, 0.6);
    --glow-brand: 0 0 40px rgba(72, 125, 171, 0.3), 0 0 80px rgba(195, 26, 112, 0.2);
    color-scheme: dark;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--brand-white);
    font-family: 'Rajdhani', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding: 80px 20px 20px;
}

.animated-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(circle at center, #1a1f2e 0%, #0a0b10 100%);
    overflow: hidden;
}

.animated-bg::before,
.animated-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(24px);
    opacity: 0.55;
}

.animated-bg::before {
    width: 360px;
    height: 360px;
    top: -120px;
    left: -90px;
    background: radial-gradient(circle, rgba(72, 125, 171, 0.34), transparent 68%);
}

.animated-bg::after {
    width: 320px;
    height: 320px;
    right: -70px;
    bottom: -100px;
    background: radial-gradient(circle, rgba(195, 26, 112, 0.26), transparent 68%);
}

.bg-ornaments {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.ornament {
    position: absolute;
    display: block;
}

.square {
    border-radius: 18px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.square-blue {
    width: 120px;
    height: 120px;
    top: 14%;
    left: 10%;
    border: 1px solid rgba(72, 125, 171, 0.28);
    background: linear-gradient(135deg, rgba(72, 125, 171, 0.14), rgba(72, 125, 171, 0.03));
    box-shadow: inset 0 0 22px rgba(72, 125, 171, 0.08);
    transform: rotate(12deg);
    animation: ornamentEnterBlue 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.square-pink {
    width: 86px;
    height: 86px;
    right: 13%;
    top: 22%;
    border: 1px solid rgba(195, 26, 112, 0.28);
    background: linear-gradient(135deg, rgba(195, 26, 112, 0.12), rgba(195, 26, 112, 0.03));
    box-shadow: inset 0 0 18px rgba(195, 26, 112, 0.08);
    transform: rotate(-18deg);
    animation: ornamentEnterPink 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.square-outline {
    width: 140px;
    height: 140px;
    right: 18%;
    bottom: 14%;
    border: 1px solid rgba(72, 125, 171, 0.16);
    background: transparent;
    transform: rotate(22deg);
    animation: ornamentEnterOutline 1.15s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.line {
    height: 1px;
    box-shadow: 0 0 10px currentColor;
}

.line-blue {
    width: 180px;
    left: 8%;
    bottom: 22%;
    color: rgba(72, 125, 171, 0.5);
    background: linear-gradient(90deg, rgba(72, 125, 171, 0), rgba(72, 125, 171, 0.8), rgba(72, 125, 171, 0));
    transform: rotate(-18deg);
    animation: lineEnterBlue 1.05s ease-out;
}

.line-pink {
    width: 150px;
    right: 11%;
    top: 44%;
    color: rgba(195, 26, 112, 0.5);
    background: linear-gradient(90deg, rgba(195, 26, 112, 0), rgba(195, 26, 112, 0.8), rgba(195, 26, 112, 0));
    transform: rotate(24deg);
    animation: lineEnterPink 1.15s ease-out;
}

.diamond {
    width: 42px;
    height: 42px;
    left: 24%;
    top: 58%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(135deg, rgba(72, 125, 171, 0.12), rgba(195, 26, 112, 0.1));
    transform: rotate(45deg);
    box-shadow: 0 0 18px rgba(72, 125, 171, 0.08);
    animation: diamondEnter 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.particle {
    position: absolute;
    z-index: 2;
    border-radius: 50%;
    animation: starFall 15s infinite linear;
    opacity: 0.8;
    box-shadow: 0 0 6px currentColor;
}

.particle.blue {
    background: var(--brand-blue);
    color: var(--brand-blue);
}

.particle.pink {
    background: var(--brand-pink);
    color: var(--brand-pink);
}

.particle.white {
    background: var(--brand-white);
    color: var(--brand-white);
}

@keyframes starFall {
    0% {
        transform: translateY(-100vh) rotate(0deg) scale(0);
        opacity: 0;
    }
    6% {
        opacity: 0.85;
        transform: translateY(-92vh) rotate(18deg) scale(1);
    }
    94% {
        opacity: 0.8;
        transform: translateY(94vh) rotate(338deg) scale(1);
    }
    100% {
        transform: translateY(100vh) rotate(360deg) scale(0);
        opacity: 0;
    }
}

.particle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px white;
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2147483646;
    transform: translate(-50%, -50%);
}

html.custom-cursor-active,
html.custom-cursor-active body,
html.custom-cursor-active body *,
body.custom-cursor-active,
body.custom-cursor-active * {
    cursor: none !important;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--brand-pink);
    box-shadow: 0 0 10px var(--brand-pink);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--brand-blue);
    transition: width 0.3s ease-out, height 0.3s ease-out, background-color 0.3s ease-out;
}

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 600px;
    min-width: 0;
    padding: 20px;
    margin: 0 auto;
    flex-shrink: 0;
}

.login-card {
    background: rgba(21, 24, 32, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), var(--glow-brand);
    transition: transform 0.35s ease-out;
    animation: loginZoomIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.login-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-brand);
    border-radius: 22px;
    z-index: -1;
    filter: blur(20px);
    opacity: 0.42;
    animation: pulseGlow 5s infinite alternate;
}

@keyframes pulseGlow {
    0% { opacity: 0.28; filter: blur(14px); }
    100% { opacity: 0.5; filter: blur(22px); }
}

@keyframes ornamentEnterBlue {
    0% {
        opacity: 0;
        transform: translate(-34px, -24px) rotate(-8deg) scale(0.75);
    }
    100% {
        opacity: 1;
        transform: rotate(12deg) scale(1);
    }
}

@keyframes ornamentEnterPink {
    0% {
        opacity: 0;
        transform: translate(30px, -20px) rotate(-40deg) scale(0.7);
    }
    100% {
        opacity: 1;
        transform: rotate(-18deg) scale(1);
    }
}

@keyframes ornamentEnterOutline {
    0% {
        opacity: 0;
        transform: translate(28px, 28px) rotate(0deg) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: rotate(22deg) scale(1);
    }
}

@keyframes lineEnterBlue {
    0% {
        opacity: 0;
        transform: translateX(-30px) rotate(-18deg) scaleX(0.35);
    }
    100% {
        opacity: 1;
        transform: rotate(-18deg) scaleX(1);
    }
}

@keyframes lineEnterPink {
    0% {
        opacity: 0;
        transform: translateX(30px) rotate(24deg) scaleX(0.35);
    }
    100% {
        opacity: 1;
        transform: rotate(24deg) scaleX(1);
    }
}

@keyframes diamondEnter {
    0% {
        opacity: 0;
        transform: translateY(24px) rotate(8deg) scale(0.55);
    }
    100% {
        opacity: 1;
        transform: rotate(45deg) scale(1);
    }
}

@keyframes loginZoomIn {
    0% {
        opacity: 0;
        transform: translateY(34px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.4rem;
    filter: drop-shadow(0 0 10px rgba(72, 125, 171, 0.5));
    animation: fadeInUp 0.7s ease forwards;
}

.login-logo img {
    width: min(150px, 46vw);
    height: auto;
    display: block;
}

.text-blue {
    color: var(--brand-blue);
}

.text-pink {
    color: var(--brand-pink);
}

.login-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.8px;
    font-weight: 700;
    text-transform: uppercase;
    animation: fadeInUp 0.8s ease forwards;
}

.login-feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.login-feedback-modal.is-visible {
    opacity: 1;
    visibility: visible;
}

.login-feedback-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 18, 0.72);
    backdrop-filter: blur(6px);
}

.login-feedback-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    border-radius: 24px;
    padding: 28px 26px 24px;
    text-align: center;
    background: linear-gradient(180deg, rgba(10, 16, 28, 0.98), rgba(18, 24, 38, 0.96));
    border: 1px solid rgba(72, 125, 171, 0.28);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), 0 0 35px rgba(72, 125, 171, 0.18);
    transform: translateY(18px) scale(0.96);
    transition: transform 0.28s ease;
}

.login-feedback-modal.is-visible .login-feedback-modal__dialog {
    transform: translateY(0) scale(1);
}

.login-feedback-modal__icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    background: linear-gradient(135deg, rgba(72, 125, 171, 1), rgba(195, 26, 112, 1));
    box-shadow: 0 0 30px rgba(72, 125, 171, 0.35), 0 0 46px rgba(195, 26, 112, 0.24);
}

.login-feedback-modal--error .login-feedback-modal__dialog {
    border-color: rgba(195, 26, 112, 0.34);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), 0 0 35px rgba(195, 26, 112, 0.2);
}

.login-feedback-modal--error .login-feedback-modal__icon {
    background: linear-gradient(135deg, rgba(195, 26, 112, 1), rgba(136, 23, 79, 1));
    box-shadow: 0 0 30px rgba(195, 26, 112, 0.32), 0 0 46px rgba(136, 23, 79, 0.22);
}

.login-feedback-modal__dialog h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.35rem;
    color: white;
    margin-bottom: 10px;
}

.login-feedback-modal__dialog p {
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 0;
    font-size: 1rem;
}

.form-container {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.form-section {
    display: none;
    opacity: 0;
    transform: translateY(18px);
}

.form-section.active {
    display: block;
    animation: formSectionIn 0.35s ease forwards;
}

.form-section.slide-out {
    display: block;
    animation: formSectionOut 0.28s ease forwards;
}

.register-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
}

.register-field {
    margin-bottom: 1rem;
}

.register-half {
    grid-column: span 1;
}

.register-submit,
.divider,
.signup-link-register {
    grid-column: 1 / -1;
}

@keyframes formSectionIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes formSectionOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-16px);
    }
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.3rem 0 0.6rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.divider span {
    padding: 0 10px;
}

.input-group-custom {
    position: relative;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.input-group-custom:nth-child(1) { animation-delay: 0.15s; }
.input-group-custom:nth-child(2) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-group-custom label {
    display: block;
    font-size: 0.92rem;
    color: rgba(220, 234, 255, 0.96);
    margin-bottom: 5px;
    font-weight: 700;
    letter-spacing: 0.25px;
    text-transform: uppercase;
}

.form-control {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(72, 125, 171, 0.3);
    color: white !important;
    -webkit-text-fill-color: #ffffff;
    padding: 12px 15px 12px 42px;
    border-radius: 10px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--brand-pink);
    box-shadow: 0 0 15px rgba(195, 26, 112, 0.3);
    outline: none;
    color: white !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.68) !important;
    font-weight: 400;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 39px;
    color: var(--brand-blue);
    font-size: 1rem;
    transition: color 0.3s;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 39px;
    color: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-password:hover {
    color: var(--brand-white);
    text-shadow: 0 0 10px var(--brand-white);
}

.btn-login {
    width: 100%;
    border: none;
    border-radius: 12px;
    margin-top: 1rem;
    padding: 14px 18px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: white;
    background: var(--gradient-brand);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), var(--glow-brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease 0.45s forwards;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn-login:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.32), var(--glow-brand);
    filter: saturate(1.05);
}

.signup-link {
    text-align: center;
    margin-top: 1.4rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.55s forwards;
}

.signup-link a {
    color: rgba(255, 255, 255, 0.94);
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 700;
}

.signup-link a:hover {
    color: var(--brand-pink);
    text-shadow: var(--glow-pink);
}

.signup-link-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.signup-link-login span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.signup-link-register {
    margin-top: 0;
}

.login-helper-links {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.login-inline-link {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.login-inline-link:hover {
    color: var(--brand-pink);
}

.login-flow-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.login-flow-modal[hidden] {
    display: none !important;
}

.login-flow-modal.is-visible {
    opacity: 1;
    visibility: visible;
}

.login-flow-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 18, 0.76);
    backdrop-filter: blur(8px);
}

.login-flow-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    border-radius: 24px;
    padding: 26px;
    background: linear-gradient(180deg, rgba(10, 16, 28, 0.98), rgba(18, 24, 38, 0.96));
    border: 1px solid rgba(72, 125, 171, 0.28);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), 0 0 35px rgba(72, 125, 171, 0.18);
    transform: translateY(18px) scale(0.96);
    transition: transform 0.28s ease;
}

.login-flow-modal.is-visible .login-flow-modal__dialog {
    transform: translateY(0) scale(1);
}

.login-flow-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: white;
    cursor: pointer;
}

.login-flow-modal__eyebrow {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.login-flow-modal__dialog h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.login-flow-modal__dialog p {
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 18px;
    line-height: 1.6;
}

.modal-field {
    margin-bottom: 16px;
}

.login-flow-modal__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.login-flow-modal__actions .btn-login {
    margin-top: 0;
    width: calc(50% - 6px);
    flex: 0 0 calc(50% - 6px);
}

.login-flow-modal__actions .modal-submit-button,
.login-flow-modal__actions .btn-login-secondary {
    flex: 1 1 0;
    width: auto;
}

.btn-login-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.login-code-input {
    text-align: center;
    letter-spacing: 0.35em;
    font-size: 1.1rem;
    font-weight: 800;
}

@media (max-width: 767px) {
    body {
        align-items: center;
        padding: 56px 14px 18px;
    }

    .login-wrapper {
        padding: 0;
        max-width: 380px;
    }

    .login-card {
        padding: 1.65rem 1.15rem 1.25rem;
        border-radius: 20px;
    }

    .login-header {
        margin-bottom: 1rem;
    }

    .login-logo {
        margin-bottom: 0.2rem;
    }

    .login-logo img {
        width: 84px !important;
        max-width: 84px !important;
        max-height: 84px;
        height: auto;
        object-fit: contain;
    }

    .login-subtitle {
        font-size: 0.86rem;
        letter-spacing: 0.12em;
    }

    .register-form {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .register-half,
    .register-submit,
    .divider,
    .signup-link-register {
        grid-column: auto;
    }

    .form-control {
        font-size: 1rem;
        padding: 11px 14px 11px 40px;
    }

    .input-group-custom {
        margin-bottom: 0.95rem;
    }

    .btn-login {
        margin-top: 0.2rem;
    }

    .login-helper-links,
    .signup-link {
        margin-top: 0.85rem;
    }

    .input-icon,
    .toggle-password {
        top: 37px;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    .square-blue {
        width: 80px;
        height: 80px;
        left: -8px;
        top: 18%;
    }

    .square-pink {
        width: 64px;
        height: 64px;
        right: -10px;
        top: 18%;
    }

    .square-outline {
        width: 96px;
        height: 96px;
        right: 4%;
        bottom: 10%;
    }

    .line-blue {
        width: 110px;
        left: -12px;
        bottom: 20%;
    }

    .line-pink {
        width: 100px;
        right: -12px;
        top: 48%;
    }

    .diamond {
        width: 32px;
        height: 32px;
        left: 10%;
        top: 66%;
    }

    .login-flow-modal__dialog {
        padding: 22px 18px;
    }

    .login-flow-modal__actions {
        flex-direction: column;
    }
}