:root {
    --bs-body-bg: #081120;
    --bs-body-color: #f3f7ff;
    --bs-primary: #6d8cff;
    --bs-primary-rgb: 109, 140, 255;
    --surface: rgba(10, 18, 34, 0.78);
    --surface-elevated: rgba(16, 26, 48, 0.85);
    --surface-border: rgba(255, 255, 255, 0.08);
    --surface-strong: rgba(255, 255, 255, 0.12);
    --text-soft: rgba(243, 247, 255, 0.72);
    --success-soft: rgba(34, 197, 94, 0.14);
    --danger-soft: rgba(239, 68, 68, 0.14);
    --warning-soft: rgba(250, 204, 21, 0.14);
    --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.28);
    --radius-xl: 1.5rem;
    --radius-lg: 1rem;
}

* {
    box-sizing: border-box;
}

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

body {
    position: relative;
    overflow-x: hidden;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(76, 99, 210, 0.32), transparent 32%),
        radial-gradient(circle at 80% 10%, rgba(8, 145, 178, 0.24), transparent 25%),
        linear-gradient(180deg, #09111f 0%, #081120 55%, #040910 100%);
    color: var(--bs-body-color);
}

.hero-orb {
    position: fixed;
    inset: auto;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.hero-orb-one {
    width: 18rem;
    height: 18rem;
    top: -5rem;
    right: -6rem;
    background: rgba(59, 130, 246, 0.35);
}

.hero-orb-two {
    width: 16rem;
    height: 16rem;
    left: -5rem;
    bottom: 4rem;
    background: rgba(14, 165, 233, 0.18);
}

main {
    position: relative;
    z-index: 1;
}

.hero-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.hero-copy {
    max-width: 52rem;
}

.hero-lead {
    max-width: 40rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(243, 247, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(18px);
}

.glass-card {
    background: linear-gradient(180deg, rgba(14, 22, 40, 0.88), rgba(9, 15, 28, 0.88));
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.eyebrow {
    margin: 0;
    color: rgba(191, 202, 255, 0.78);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.letter-space {
    letter-spacing: 0.12em;
}

.text-body-secondary {
    color: var(--text-soft) !important;
}

.modern-input-group {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.modern-input-group .input-group-text,
.modern-input-group .form-control {
    background: transparent;
    border: 0;
    color: var(--bs-body-color);
}

.modern-input-group .input-group-text {
    padding-inline: 1rem 0.25rem;
    color: rgba(243, 247, 255, 0.7);
}

.modern-input-group .form-control {
    padding-left: 0.5rem;
    padding-right: 1rem;
    box-shadow: none;
}

.modern-input-group:focus-within {
    border-color: rgba(var(--bs-primary-rgb), 0.55);
    box-shadow: 0 0 0 0.18rem rgba(var(--bs-primary-rgb), 0.15);
}

.form-control::placeholder {
    color: rgba(243, 247, 255, 0.36);
}

.submit-button {
    min-height: 3.6rem;
    border-radius: 1rem;
    border: 0;
    box-shadow: 0 18px 40px rgba(109, 140, 255, 0.22);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(109, 140, 255, 0.98), rgba(77, 107, 235, 0.98));
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, rgba(123, 152, 255, 0.98), rgba(93, 121, 238, 0.98));
}

.btn-outline-light,
.btn-outline-primary,
.btn-outline-danger {
    border-width: 1px;
    border-radius: 999px;
}

.results-card {
    min-height: 22rem;
}


.min-w-0 {
    min-width: 0;
}

.soft-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--bs-body-color);
}


.summary-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--bs-body-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.summary-pill.success {
    background: var(--success-soft);
    border-color: rgba(34, 197, 94, 0.2);
}

.summary-pill.danger {
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.2);
}

.summary-pill.warning {
    background: var(--warning-soft);
    border-color: rgba(250, 204, 21, 0.2);
}

.summary-pill.info {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.24);
}

.result-group + .result-group {
    margin-top: 1.5rem;
}

.result-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.result-group-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.result-list {
    display: grid;
    gap: 0.8rem;
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 1rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.035);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.result-row:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
}

.result-row.available {
    border-color: rgba(34, 197, 94, 0.22);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.08), rgba(255, 255, 255, 0.03));
}

.result-row.taken {
    border-color: rgba(239, 68, 68, 0.22);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.08), rgba(255, 255, 255, 0.03));
}

.result-row.unknown,
.result-row.loading {
    border-color: rgba(250, 204, 21, 0.16);
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.06), rgba(255, 255, 255, 0.03));
}

.result-row.is-stale {
    border-style: dashed;
}

.result-main {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    min-width: 0;
}

.result-icon {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 1rem;
    flex: 0 0 auto;
}

.result-row.available .result-icon {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.14);
}

.result-row.taken .result-icon {
    color: #f87171;
    background: rgba(239, 68, 68, 0.14);
}

.result-row.unknown .result-icon,
.result-row.loading .result-icon {
    color: #facc15;
    background: rgba(250, 204, 21, 0.14);
}

.result-label {
    font-weight: 700;
    margin-bottom: 0.15rem;
    word-break: break-word;
}

.result-message {
    color: var(--text-soft);
    font-size: 0.92rem;
    margin: 0;
}

.result-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.status-chip.available {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.18);
}

.status-chip.taken {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.18);
}

.status-chip.unknown,
.status-chip.loading {
    color: #fde047;
    background: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.18);
}

.status-chip.saved {
    color: #93c5fd;
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.22);
}

.result-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(191, 202, 255, 0.92);
    text-decoration: none;
    font-weight: 600;
}

.result-link:hover {
    color: white;
}

.empty-state {
    padding: 1.25rem;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.03);
}

.history-list {
    display: grid;
    gap: 0.75rem;
}

.history-item {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1rem 1rem 0.95rem;
    color: var(--bs-body-color);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.history-item:hover,
.history-item.active {
    transform: translateY(-1px);
    border-color: rgba(var(--bs-primary-rgb), 0.4);
    background: rgba(109, 140, 255, 0.08);
}

.history-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.history-word {
    font-weight: 700;
    font-size: 1rem;
}

.history-meta,
.history-stats {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.88rem;
}

.history-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.history-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.alert.glass-alert {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #ffe7e7;
    border-radius: 1rem;
}

.invisible {
    visibility: hidden !important;
}

.loading .result-message {
    color: rgba(243, 247, 255, 0.78);
}

@media (max-width: 991.98px) {
    .history-card {
        display: none;
    }

    .history-card.is-open {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .result-row {
        flex-direction: column;
        align-items: stretch;
    }

    .result-actions {
        justify-content: flex-start;
    }

    .hero-shell {
        gap: 1rem;
    }
}
