:root {
    --bg: #f6efe5;
    --bg-accent: #eadfd0;
    --panel: rgba(255, 250, 244, 0.78);
    --panel-border: rgba(82, 49, 23, 0.14);
    --text: #24150d;
    --muted: #755947;
    --available: #1f7a57;
    --registered: #ba5a31;
    --error: #8b2e2e;
    --shadow: 0 24px 60px rgba(65, 33, 14, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text);
    background: #ffffff;
}

.topbar {
    width: 100%;
    margin: 20px 0 0;
    padding: 0 16px;
}

.topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 16px;
    background: rgba(255, 250, 244, 0.78);
    border: 1px solid var(--panel-border);
}

.topbar__brand {
    margin: 0;
    font-weight: 700;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar__user {
    color: var(--muted);
    font-size: 0.95rem;
}

.topbar__logout {
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(36, 21, 13, 0.08);
    color: var(--text);
    font-weight: 700;
}

.shell {
    width: 100%;
    margin: 0;
    padding: 48px 16px 64px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: start;
}

.hero,
.results-panel {
    position: relative;
}

.hero {
    padding: 28px;
}

.eyebrow {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: var(--muted);
}

h1 {
    margin: 0;
    max-width: 11ch;
    font-family: 'Instrument Serif', serif;
    font-size: clamp(3rem, 7vw, 5.8rem);
    line-height: 0.95;
    font-weight: 400;
}

.intro {
    max-width: 58ch;
    margin: 22px 0 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--muted);
}

.intro span {
    color: var(--text);
}

.search-card,
.result-card,
.result-empty,
.account-card {
    margin-top: 30px;
    padding: 24px;
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 500;
}

.search-row {
    display: flex;
    gap: 12px;
}

input {
    flex: 1;
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid rgba(82, 49, 23, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    font: inherit;
    color: var(--text);
}

input::placeholder {
    color: rgba(36, 21, 13, 0.6);
}

.search-card,
.auth-card {
    background: #982ce9 !important;
    background-image: none !important;
    border-color: #982ce9;
    color: #ffffff;
}

.account-card {
    background: #982ce9;
    border-color: #982ce9;
}

.account-card,
.account-card .section-kicker,
.account-card .account-copy,
.account-card h3 {
    color: #ffffff;
}

.search-card .search-label,
.search-card .hint,
.auth-card .auth-copy,
.auth-form label,
.auth-card .eyebrow,
.auth-card h1 {
    color: #ffffff;
}

input:focus {
    outline: 2px solid rgba(186, 90, 49, 0.24);
    border-color: rgba(186, 90, 49, 0.38);
}

button {
    padding: 18px 26px;
    border: 0;
    border-radius: 18px;
    background: #cb2fb7;
    color: #fff8f2;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 120ms ease, opacity 120ms ease;
}

button:hover {
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.75;
    cursor: wait;
    transform: none;
}

.secondary-button,
.mini-button {
    background: #cb2fb7;
    color: #fff8f2;
}

.secondary-button {
    padding: 12px 18px;
}

.mini-button {
    padding: 10px 14px;
    font-size: 0.9rem;
}

.hint {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.account-card__header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.section-kicker {
    margin: 0 0 6px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
}

.account-card h3 {
    margin: 0;
    font-size: 1.4rem;
}

.account-copy {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.domain-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.domain-item {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(82, 49, 23, 0.08);
}

.domain-item__main h4 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.domain-item__main p {
    margin: 0;
    color: var(--muted);
}

.domain-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: end;
    align-content: start;
}

.domain-chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(36, 21, 13, 0.08);
    font-size: 0.9rem;
}

.mini-link,
.register-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
}

.mini-link {
    padding: 10px 14px;
    border-radius: 14px;
    color: var(--text);
    background: rgba(36, 21, 13, 0.08);
}

.results-panel {
    padding-top: 18px;
}

.result-empty {
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
}

.result-card {
    min-height: 300px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(36, 21, 13, 0.08);
}

.status-pill[data-state='available'] {
    background: rgba(31, 122, 87, 0.12);
    color: var(--available);
}

.status-pill[data-state='registered'] {
    background: rgba(186, 90, 49, 0.14);
    color: var(--registered);
}

.status-pill[data-state='error'] {
    background: rgba(139, 46, 46, 0.12);
    color: var(--error);
}

.status-pill[data-state='loading'] {
    background: rgba(36, 21, 13, 0.08);
    color: var(--text);
}

h2 {
    margin: 18px 0 8px;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.05;
}

.result-summary {
    margin: 0;
    line-height: 1.6;
    color: var(--muted);
}

.result-meta {
    margin: 24px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.result-meta div {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.55);
}

dt {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

dd {
    margin: 0;
    font-weight: 500;
}

.result-note {
    margin: 20px 0 0;
    padding-top: 18px;
    border-top: 1px solid rgba(82, 49, 23, 0.12);
    line-height: 1.6;
}

.result-actions {
    margin-top: 22px;
}

.register-button {
    min-width: 220px;
    padding: 16px 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #1f7a57, #2d9b72);
    color: #f7fff9;
    transition: transform 120ms ease, opacity 120ms ease;
}

.register-button:hover,
.mini-link:hover {
    transform: translateY(-1px);
}

.hidden {
    display: none;
}

.auth-shell {
    width: min(520px, calc(100% - 24px));
    margin: 44px auto;
}

.auth-card {
    padding: 28px;
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.auth-copy {
    margin: 12px 0 0;
    color: var(--muted);
}

.logo-slot {
    width: 100%;
    margin-bottom: 18px;
    display: grid;
    place-items: center;
}

.logo-image {
    max-width: 240px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.auth-form {
    margin-top: 22px;
    display: grid;
    gap: 10px;
}

.auth-form label {
    font-size: 0.95rem;
    font-weight: 500;
}

.auth-error {
    margin: 16px 0 0;
    color: var(--error);
    font-weight: 600;
}

@media (max-width: 860px) {
    .shell {
        grid-template-columns: 1fr;
        padding-top: 24px;
    }

    .topbar {
        width: 100%;
        padding: 0 12px;
    }

    .hero {
        padding: 12px 4px;
    }

    .results-panel {
        padding-top: 0;
    }
}

@media (max-width: 640px) {
    .shell {
        width: 100%;
        padding: 24px 12px 40px;
    }

    .hero {
        padding: 0;
    }

    h1 {
        max-width: none;
        font-size: clamp(2.2rem, 13vw, 3.3rem);
    }

    .intro {
        max-width: none;
        margin-top: 16px;
        font-size: 0.95rem;
    }

    .search-row,
    .result-meta,
    .domain-item {
        grid-template-columns: 1fr;
        display: grid;
    }

    .account-card__header,
    .domain-item__meta {
        display: grid;
        justify-content: stretch;
    }

    .topbar__inner,
    .topbar__actions {
        display: grid;
    }

    button {
        width: 100%;
    }

    .search-card,
    .result-card,
    .result-empty,
    .account-card {
        padding: 20px;
        border-radius: 22px;
    }

    .register-button,
    .mini-link,
    .mini-button,
    .secondary-button {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════
   IMMERSIVE LOGIN PAGE
   ═══════════════════════════════════════════════ */

body.login-page {
    background: #080010;
    overflow: auto;
    min-height: 100dvh;
}

/* ── Floating glowing orbs ── */
.orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.orb--1 {
    width: 700px;
    height: 700px;
    top: -220px;
    left: -200px;
    background: radial-gradient(circle at 40% 40%, #982ce9 0%, transparent 68%);
    opacity: 0.72;
    filter: blur(70px);
    animation: orb-a 18s ease-in-out infinite;
}

.orb--2 {
    width: 560px;
    height: 560px;
    bottom: -160px;
    right: -160px;
    background: radial-gradient(circle at 60% 60%, #cb2fb7 0%, transparent 68%);
    opacity: 0.65;
    filter: blur(65px);
    animation: orb-b 14s ease-in-out infinite;
}

.orb--3 {
    width: 380px;
    height: 380px;
    top: 50%;
    left: 55%;
    background: radial-gradient(circle, #4a0dad 0%, transparent 70%);
    opacity: 0.45;
    filter: blur(80px);
    animation: orb-c 20s ease-in-out infinite;
}

@keyframes orb-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    30%       { transform: translate(60px, -80px) scale(1.08); }
    60%       { transform: translate(-40px, 50px) scale(0.94); }
}

@keyframes orb-b {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40%       { transform: translate(-70px, -60px) scale(1.1); }
    70%       { transform: translate(50px, 30px) scale(0.92); }
}

@keyframes orb-c {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    25%       { transform: translate(calc(-50% + 55px), calc(-50% - 70px)) scale(1.06); }
    50%       { transform: translate(calc(-50% - 45px), calc(-50% + 55px)) scale(0.96); }
    75%       { transform: translate(calc(-50% + 30px), calc(-50% + 40px)) scale(1.03); }
}

/* ── Auth shell: full-screen centered ── */
body.login-page .auth-shell {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1;
}

/* ── Glassmorphism card ── */
body.login-page .auth-card {
    position: relative;
    z-index: 2;
    width: min(440px, 100%);
    padding: 52px 44px 48px;
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.055) !important;
    backdrop-filter: blur(52px) saturate(180%);
    -webkit-backdrop-filter: blur(52px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    box-shadow:
        0 0 0 1px rgba(152, 44, 233, 0.25),
        0 48px 120px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* Subtle shimmer line at top of card */
body.login-page .auth-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 36px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 50%
    );
    pointer-events: none;
}

/* ── Logo ── */
body.login-page .logo-slot {
    margin-bottom: 36px;
}

/* ── Form labels ── */
body.login-page .auth-form label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── Inputs ── */
body.login-page input {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-radius: 16px;
    padding: 16px 20px;
    transition: border-color 180ms ease, background 180ms ease;
}

body.login-page input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

body.login-page input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.13);
}

/* ── Login button: transparent + white solid border ── */
body.login-page .auth-form button {
    background: transparent !important;
    border: 2px solid #ffffff;
    color: #ffffff;
    border-radius: 16px;
    letter-spacing: 0.06em;
    transition: background 200ms ease, box-shadow 200ms ease, transform 120ms ease;
    margin-top: 8px;
}

body.login-page .auth-form button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

body.login-page .auth-form button:active {
    transform: translateY(0);
}

/* ── Error message ── */
body.login-page .auth-error {
    background: rgba(255, 80, 80, 0.14);
    border: 1px solid rgba(255, 110, 110, 0.35);
    border-radius: 14px;
    padding: 13px 16px;
    margin-top: 0;
    color: #ffb8b8;
    font-weight: 500;
    font-size: 0.93rem;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    body.login-page .auth-shell {
        position: relative;
        inset: auto;
        min-height: 100dvh;
        align-items: flex-start;
        justify-content: center;
        padding: 16px;
    }

    body.login-page .auth-card {
        width: 100%;
        max-width: 100%;
        padding: 36px 28px 32px;
        border-radius: 28px;
    }

    body.login-page .logo-slot {
        margin-bottom: 22px;
    }
}