:root {
    --bg-color: var(--tg-theme-bg-color, #0d1119);
    --bg-elevated: rgba(20, 27, 39, 0.88);
    --bg-card: rgba(16, 21, 31, 0.9);
    --bg-card-strong: rgba(9, 14, 24, 0.96);
    --text-color: var(--tg-theme-text-color, #eff5ff);
    --muted-color: var(--tg-theme-hint-color, rgba(197, 209, 229, 0.68));
    --line-color: rgba(151, 175, 211, 0.16);
    --accent-color: #68b4ff;
    --accent-strong: #88c5ff;
    --accent-soft: rgba(104, 180, 255, 0.12);
    --accent-glow: rgba(104, 180, 255, 0.28);
    --warning-soft: rgba(255, 211, 117, 0.12);
    --warning-line: rgba(255, 211, 117, 0.32);
    --button-color: var(--tg-theme-button-color, #5fb3ff);
    --button-text-color: var(--tg-theme-button-text-color, #08111d);
    --input-bg: rgba(8, 13, 22, 0.78);
    --shadow-card: 0 24px 60px rgba(2, 7, 16, 0.38);
    --shadow-soft: 0 10px 30px rgba(3, 8, 18, 0.2);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(89, 164, 255, 0.16), transparent 32%),
        radial-gradient(circle at top right, rgba(45, 90, 168, 0.22), transparent 28%),
        linear-gradient(180deg, #0b1017 0%, #111827 52%, #0b1017 100%);
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 18px 16px 96px;
    color: var(--text-color);
    font-family: "Manrope", "Segoe UI Variable", sans-serif;
    font-size: 15px;
    line-height: 1.45;
    background: transparent;
}

.hidden {
    display: none !important;
}

.app-shell {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.screen {
    width: 100%;
}

.screen-centered {
    min-height: calc(100vh - 36px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-card,
.hero-card,
.section-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-color);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(19, 26, 38, 0.98) 0%, rgba(11, 16, 25, 0.95) 100%);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
}

.status-card {
    width: min(100%, 460px);
    padding: 32px 28px;
    text-align: center;
}

.status-card--loading::before,
.status-card--error::before,
.hero-card::before,
.section-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(104, 180, 255, 0.16), transparent 38%),
        linear-gradient(320deg, rgba(72, 121, 200, 0.12), transparent 42%);
}

.status-eyebrow,
.hero-eyebrow,
.section-kicker,
.summary-label,
.footnote-title,
.token-badge {
    margin: 0;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 800;
}

.status-eyebrow,
.hero-eyebrow,
.section-kicker,
.summary-label {
    color: var(--accent-strong);
}

.status-card h1,
.status-card h2,
.hero-card h1,
.section-heading h2 {
    margin: 10px 0 0;
    line-height: 1.05;
}

.status-card h1,
.hero-card h1 {
    font-size: clamp(30px, 6vw, 42px);
    font-weight: 800;
}

.status-card h2,
.section-heading h2 {
    font-size: 24px;
    font-weight: 800;
}

.status-copy,
.hero-copy,
.field-note,
.footnote-copy,
.token-copy {
    color: var(--muted-color);
}

.status-copy,
.hero-copy,
.footnote-copy {
    margin: 14px 0 0;
    font-size: 14px;
}

.status-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 10px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    font-size: 26px;
    font-weight: 800;
    color: #ffd8d8;
    background: rgba(140, 34, 34, 0.28);
    border: 1px solid rgba(255, 151, 151, 0.18);
}

.loader {
    width: 42px;
    height: 42px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 3px solid rgba(95, 179, 255, 0.16);
    border-top-color: var(--accent-color);
    box-shadow: 0 0 22px rgba(95, 179, 255, 0.22);
    animation: spin 0.9s linear infinite;
}

.hero-card {
    padding: 28px 24px 24px;
    margin-bottom: 16px;
}

.hero-copy {
    max-width: 560px;
}

.hero-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.9;
    pointer-events: none;
}

.hero-orb--one {
    right: -28px;
    top: -24px;
    width: 110px;
    height: 110px;
    background: rgba(104, 180, 255, 0.16);
}

.hero-orb--two {
    left: -24px;
    bottom: -34px;
    width: 90px;
    height: 90px;
    background: rgba(42, 91, 167, 0.22);
}

.provider-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.provider-badge {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(146, 178, 223, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(235, 242, 255, 0.88);
    font-size: 12px;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
}

.section-card {
    padding: 22px 20px;
    margin-bottom: 14px;
}

.section-card--summary {
    background:
        linear-gradient(180deg, rgba(18, 26, 39, 0.98), rgba(12, 17, 26, 0.96)),
        linear-gradient(120deg, rgba(104, 180, 255, 0.08), transparent 40%);
}

.section-card--footnote {
    background:
        linear-gradient(180deg, rgba(17, 23, 35, 0.94), rgba(11, 16, 25, 0.9)),
        linear-gradient(135deg, rgba(95, 179, 255, 0.05), transparent 55%);
}

.section-heading {
    margin-bottom: 16px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.summary-card {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(151, 175, 211, 0.12);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.summary-card--wide {
    grid-column: 1 / -1;
}

.summary-value {
    margin: 8px 0 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
}

.summary-value--accent {
    color: var(--accent-strong);
}

.field-shell + .field-shell {
    margin-top: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(244, 248, 255, 0.94);
}

input[type="text"],
input[type="url"],
select {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid rgba(152, 177, 216, 0.16);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(8, 13, 22, 0.82), rgba(13, 18, 28, 0.92));
    color: var(--text-color);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.18s ease,
        background 0.2s ease;
    -webkit-appearance: none;
}

select option,
select optgroup {
    color: #0f1726;
    background: #eef4fb;
}

select option:checked,
select option:hover,
select option:focus {
    color: #ffffff;
    background: #3a5f94;
}

input::placeholder {
    color: rgba(185, 197, 217, 0.42);
}

input:focus,
select:focus {
    border-color: rgba(104, 180, 255, 0.56);
    box-shadow:
        0 0 0 4px rgba(104, 180, 255, 0.08),
        0 12px 28px rgba(7, 15, 30, 0.22);
    transform: translateY(-1px);
}

small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
}

.field-note {
    max-width: 560px;
}

.token-card {
    border-color: var(--warning-line);
    background:
        linear-gradient(180deg, rgba(20, 24, 31, 0.96), rgba(11, 16, 25, 0.94)),
        linear-gradient(135deg, rgba(255, 211, 117, 0.08), transparent 45%);
}

.token-banner {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px 15px;
    border: 1px solid var(--warning-line);
    border-radius: 18px;
    background: var(--warning-soft);
}

.token-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffe7a8;
    background: rgba(255, 211, 117, 0.12);
    border: 1px solid rgba(255, 211, 117, 0.22);
}

.token-copy,
.footnote-copy {
    margin: 0;
}

.btn {
    margin-top: 18px;
    min-width: 160px;
    padding: 14px 20px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--button-color), #9ad0ff);
    color: #08111d;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(95, 179, 255, 0.28);
}

.footnote-title {
    color: rgba(220, 233, 255, 0.96);
}

.bottom-padding {
    height: 104px;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    body {
        padding: 14px 12px 88px;
    }

    .hero-card,
    .section-card,
    .status-card {
        border-radius: 24px;
    }

    .hero-card,
    .section-card {
        padding: 20px 18px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .summary-card--wide {
        grid-column: auto;
    }

    .hero-card h1 {
        font-size: 32px;
    }
}
