:root {
    --bg-0: #05060a;
    --bg-1: #0b1020;
    --bg-2: #121a33;
    --card: rgba(14, 20, 40, 0.72);
    --card-border: rgba(255, 255, 255, 0.08);
    --text: #f4f6ff;
    --muted: #9aa6c3;
    --gold: #d4a853;
    --gold-2: #f0d48a;
    --accent: #5b8cff;
    --accent-2: #7c5cff;
    --danger: #ff6b8a;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: "DM Sans", system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg-0);
    overflow-x: hidden;
}

.page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
    isolation: isolate;
}

.bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 60% at 15% 10%, rgba(91, 140, 255, 0.22), transparent 55%),
        radial-gradient(ellipse 70% 55% at 85% 85%, rgba(124, 92, 255, 0.18), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(212, 168, 83, 0.08), transparent 60%),
        linear-gradient(160deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-2) 100%);
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
    animation: float 12s ease-in-out infinite;
}

.orb-1 {
    width: 320px;
    height: 320px;
    top: 8%;
    left: -4%;
    background: rgba(91, 140, 255, 0.25);
}

.orb-2 {
    width: 280px;
    height: 280px;
    right: -2%;
    bottom: 10%;
    background: rgba(212, 168, 83, 0.18);
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-18px) scale(1.04); }
}

.shell {
    width: min(100%, 440px);
    animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.brand {
    text-align: center;
    margin-bottom: 28px;
}

.brand-mark {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.2), rgba(91, 140, 255, 0.15));
    border: 1px solid rgba(212, 168, 83, 0.35);
    box-shadow: 0 12px 40px rgba(212, 168, 83, 0.12);
}

.brand-mark svg {
    width: 34px;
    height: 34px;
}

.brand h1 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.brand h1 span {
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.95rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 32px 28px 28px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.card .subtitle {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 0.88rem;
    line-height: 1.45;
    background: rgba(255, 107, 138, 0.12);
    border: 1px solid rgba(255, 107, 138, 0.28);
    color: #ffc9d4;
    animation: shake 0.45s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 8px;
}

.input-wrap {
    position: relative;
}

.input-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrap input {
    width: 100%;
    height: 50px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    padding: 0 44px 0 44px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-wrap input::placeholder {
    color: rgba(154, 166, 195, 0.65);
}

.input-wrap input:focus {
    outline: none;
    border-color: rgba(91, 140, 255, 0.55);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.12);
}

.input-wrap:focus-within svg {
    color: var(--accent);
}

.toggle-pass {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.toggle-pass:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 22px;
    font-size: 0.88rem;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.check input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.btn {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 14px;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #0a0d16;
    cursor: pointer;
    background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold) 55%, #c9983f 100%);
    box-shadow: 0 12px 32px rgba(212, 168, 83, 0.28);
    transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(212, 168, 83, 0.35);
    filter: brightness(1.03);
}

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

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.footer {
    margin-top: 22px;
    text-align: center;
    color: rgba(154, 166, 195, 0.75);
    font-size: 0.8rem;
}

.footer strong {
    color: var(--muted);
    font-weight: 500;
}

@media (max-width: 480px) {
    .card {
        padding: 26px 20px 22px;
    }

    .brand h1 {
        font-size: 1.45rem;
    }
}
