:root {
    color-scheme: light;
    --ink: #14263d;
    --muted: #748296;
    --paper: #f4f7fb;
    --surface: #ffffff;
    --line: #e3eaf3;
    --forest: #102e4a;
    --forest-deep: #0a1d32;
    --mint: #ddf4ff;
    --lime: #74e5f4;
    --shadow: 0 20px 60px rgba(26, 61, 95, 0.08);
}

html {
    min-width: 320px;
    background: var(--paper);
}

body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 82% 2%, rgba(116, 229, 244, 0.2), transparent 28rem),
        radial-gradient(ellipse at 8% 18%, rgba(38, 125, 224, 0.06), transparent 32rem),
        linear-gradient(rgba(16, 46, 74, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 46, 74, 0.025) 1px, transparent 1px),
        var(--paper);
    background-size: auto, auto, 40px 40px, 40px 40px, auto;
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.topbar {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid rgba(20, 38, 61, 0.08);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px);
}

.topbar-inner {
    width: min(1180px, calc(100% - 48px));
    min-height: 78px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.topbar-actions,
.hero-meta,
.hero-metric,
.wallet-card-top,
.card-heading,
.balance-footer,
.credits-banner,
.activity-label {
    display: flex;
    align-items: center;
}

.brand {
    gap: 12px;
    text-decoration: none;
}

.brand-mark,
.wallet-symbol,
.balance-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-weight: 800;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: var(--forest);
    color: var(--lime);
    font-size: 19px;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 15px;
    letter-spacing: 0.11em;
}

.brand-copy span {
    color: var(--muted);
    font-size: 11px;
}

.topbar-actions {
    gap: 20px;
}

.topbar-actions form {
    display: flex;
}

.topbar-actions button.topbar-link {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.network-pill {
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #53657a;
    font-size: 12px;
    font-weight: 650;
}

.status-indicator::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a6aea9;
    content: "";
}

.status-indicator.online::before {
    content: "";
    background: #36a46d;
    box-shadow: 0 0 0 3px rgba(54, 164, 109, 0.12);
}

.status-indicator.offline::before {
    content: "";
    background: #d35f58;
    box-shadow: 0 0 0 3px rgba(211, 95, 88, 0.12);
}

.topbar-link,
.wallet-login {
    color: #57635e;
    font-size: 13px;
    text-decoration: none;
}

.topbar-link:hover,
.wallet-login:hover {
    color: var(--forest);
}

.container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 54px 0 48px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.75fr);
    align-items: center;
    gap: clamp(40px, 8vw, 108px);
    padding: 26px 0 56px;
}

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

.eyebrow,
.card-kicker,
.wallet-card-label {
    color: #718094;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.16em;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
}

.eyebrow-line {
    width: 24px;
    height: 2px;
    background: #3199c5;
}

.hero h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(42px, 5.4vw, 68px);
    font-weight: 680;
    letter-spacing: -0.065em;
    line-height: 1.02;
}

.hero h1 span {
    color: #167da8;
}

.hero-description {
    max-width: 470px;
    margin: 22px 0 0;
    color: #687b90;
    font-size: 16px;
    line-height: 1.75;
}

.hero-meta {
    gap: 24px;
    margin-top: 36px;
}

.hero-metric {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
}

.hero-metric-value {
    color: #263c55;
    font-size: 17px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.hero-metric-label {
    color: #8593a3;
    font-size: 11px;
}

.hero-divider {
    width: 1px;
    height: 32px;
    background: #dfe8f1;
}

.wallet-section {
    position: relative;
    overflow: hidden;
    min-height: 310px;
    margin: 0;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background:
        radial-gradient(circle at 100% 0, rgba(116, 229, 244, 0.2), transparent 45%),
        radial-gradient(circle at 0 100%, rgba(38, 125, 224, 0.16), transparent 52%),
        linear-gradient(145deg, var(--forest), var(--forest-deep));
    box-shadow: 0 24px 60px rgba(16, 46, 74, 0.2);
    color: #fff;
}

.wallet-section::after {
    position: absolute;
    right: -54px;
    bottom: -96px;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(217, 240, 218, 0.12);
    border-radius: 50%;
    content: "";
    box-shadow: 0 0 0 25px rgba(217, 240, 218, 0.035), 0 0 0 50px rgba(217, 240, 218, 0.025);
    pointer-events: none;
}

.wallet-card-top {
    position: relative;
    z-index: 1;
    justify-content: space-between;
    margin-bottom: 35px;
}

.wallet-symbol {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(116, 229, 244, 0.38);
    border-radius: 12px;
    color: var(--lime);
}

.wallet-card-label {
    color: rgba(255, 255, 255, 0.58);
}

.wallet-section h2 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 27px;
    font-weight: 620;
    letter-spacing: -0.04em;
    line-height: 1.2;
}

.wallet-description {
    position: relative;
    z-index: 1;
    max-width: 310px;
    margin: 12px 0 22px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
    line-height: 1.65;
}

.wallet-actions {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: start;
    gap: 16px;
}

.wallet-login {
    color: rgba(255, 255, 255, 0.68);
    font-size: 11px;
}

.wallet-login strong {
    color: var(--lime);
    font-weight: 650;
}

.wallet-address {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
    margin-top: 24px;
}

.wallet-address span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.13em;
}

.wallet-address strong {
    overflow-wrap: anywhere;
    color: #e7f2e9;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
}

.btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--lime);
    color: #183527;
}

.btn-primary:hover:not(:disabled) {
    background: #a7f2fa;
    box-shadow: 0 8px 20px rgba(116, 229, 244, 0.24);
}

.btn-secondary {
    background: #e9eee9;
    color: var(--forest);
}

.topbar-cta {
    min-height: 40px;
    padding: 0 14px;
    background: var(--forest);
    color: #fff;
}

.topbar-cta:hover:not(:disabled) {
    background: #1b5b82;
}

.btn-light {
    flex: 0 0 auto;
    background: #fff;
    color: var(--forest);
}

.btn-light:hover:not(:disabled) {
    background: var(--lime);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#alertContainer {
    display: grid;
    gap: 10px;
}

.alert {
    padding: 13px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
}

.alert-success {
    border-color: #b7dfc8;
    background: #edf8f1;
    color: #246843;
}

.alert-error {
    border-color: #f1c6c1;
    background: #fff1ef;
    color: #933c35;
}

.alert-info {
    border-color: #c8e0ef;
    background: #eff7fc;
    color: #27516d;
}

.loading {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto 12px;
    border: 3px solid #e0eaf4;
    border-top-color: #167da8;
}

.hidden {
    display: none;
}

.credits-banner {
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    padding: 22px 26px;
    border-radius: 16px;
    background: var(--forest);
    color: #fff;
}

.credits-symbol {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(116, 229, 244, 0.38);
    border-radius: 13px;
    color: var(--lime);
    font-size: 22px;
}

.credits-copy {
    flex: 1;
}

.credits-copy .eyebrow {
    margin: 0 0 5px;
    color: var(--lime);
}

.credits-copy h2,
.credits-copy p {
    margin: 0;
}

.credits-copy h2 {
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.credits-copy p {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.64);
    font-size: 12px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.18fr 1.15fr;
    gap: 18px;
    margin-bottom: 18px;
}

.card {
    min-width: 0;
    padding: 23px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.card-heading {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.card-heading h2 {
    margin: 5px 0 0;
    color: var(--ink);
    font-size: 17px;
    font-weight: 670;
    letter-spacing: -0.03em;
}

.card-kicker {
    font-size: 9px;
}

.balance-card {
    display: flex;
    min-height: 252px;
    flex-direction: column;
    justify-content: space-between;
    border-color: var(--forest);
    background: var(--forest);
    color: #fff;
    box-shadow: 0 20px 45px rgba(16, 46, 74, 0.18);
}

.balance-card .card-kicker {
    color: rgba(255, 255, 255, 0.54);
}

.balance-card .card-heading h2 {
    color: #fff;
}

.balance-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(116, 229, 244, 0.14);
    color: var(--lime);
}

.balance-value {
    display: flex;
    align-items: baseline;
    gap: 9px;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: clamp(34px, 4vw, 46px);
    font-weight: 650;
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;
}

.balance-unit {
    color: var(--lime);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.balance-footer {
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.61);
    font-size: 11px;
}

.tier-badge {
    padding: 5px 9px;
    border-radius: 99px;
    background: rgba(116, 229, 244, 0.16);
    color: var(--lime);
    font-weight: 650;
}

.card-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 11px;
    background: #edf5fb;
    color: #167da8;
    font-size: 18px;
}

.transfer-card .card-heading,
.stats-card .card-heading {
    margin-bottom: 18px;
}

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    margin-bottom: 7px;
    color: #465a70;
    font-size: 11px;
    font-weight: 650;
}

.form-input {
    width: 100%;
    min-height: 43px;
    padding: 0 12px;
    border: 1px solid #dfe8f2;
    border-radius: 9px;
    outline: none;
    background: #fbfdff;
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.form-input::placeholder {
    color: #a1aaa5;
}

.form-input:focus {
    border-color: #5da9cc;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(22, 125, 168, 0.14);
}

.fee-hint {
    min-height: 15px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.transfer-card > .btn {
    width: 100%;
    min-height: 43px;
    background: var(--forest);
    color: white;
}

.transfer-card > .btn:hover:not(:disabled) {
    background: #1b5b82;
}

.network-stats {
    display: grid;
    gap: 0;
    margin: 0;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    text-align: left;
}

.stat-item:last-child {
    border-bottom: 0;
}

.stat-value {
    order: 2;
    margin: 0;
    color: var(--forest);
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    color: var(--muted);
    font-size: 11px;
}

.transactions-card {
    padding-bottom: 8px;
}

.transactions-card .card-heading {
    margin-bottom: 12px;
}

.activity-label {
    gap: 7px;
    color: #79857e;
    font-size: 10px;
}

.activity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #53a477;
}

.transaction-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    border-top: 1px solid var(--line);
}

.transaction-symbol {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    background: #edf5fb;
    color: #167da8;
    font-size: 16px;
}

.transaction-details {
    min-width: 0;
}

.transaction-title {
    display: block;
    overflow: hidden;
    color: #193550;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-route {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: #8a948e;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-summary {
    text-align: right;
}

.transaction-amount {
    color: #167da8;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.transaction-time {
    margin-top: 4px;
    color: #8a948e;
    font-size: 10px;
    white-space: nowrap;
}

.empty-state {
    padding: 22px 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.transactions-error {
    color: #a5463e;
}

.site-footer {
    display: flex;
    width: min(1180px, calc(100% - 48px));
    justify-content: space-between;
    gap: 16px;
    margin: 0 auto;
    padding: 22px 0 28px;
    border-top: 1px solid rgba(20, 38, 61, 0.08);
    color: #87918b;
    font-size: 11px;
}

.site-footer a {
    color: #58675f;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--forest);
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
        gap: 36px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .topbar-inner,
    .container,
    .site-footer {
        width: min(100% - 32px, 520px);
    }

    .topbar-inner {
        min-height: 68px;
        gap: 10px;
    }

    .brand-copy span,
    .topbar-login {
        display: none;
    }

    .topbar-actions {
        gap: 10px;
    }

    .network-pill {
        padding: 8px 10px;
    }

    .status-indicator {
        font-size: 10px;
    }

    .topbar-cta {
        min-height: 38px;
        padding: 0 11px;
        font-size: 10px;
    }

    .container {
        padding-top: 34px;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 10px 0 34px;
    }

    .hero h1 {
        font-size: clamp(42px, 12vw, 58px);
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-meta {
        margin-top: 24px;
    }

    .wallet-section {
        min-height: auto;
        padding: 24px;
    }

    .wallet-card-top {
        margin-bottom: 26px;
    }

    .wallet-section h2 {
        font-size: 25px;
    }

    .credits-banner {
        flex-wrap: wrap;
        gap: 14px;
        padding: 19px;
    }

    .credits-copy {
        min-width: calc(100% - 60px);
    }

    .credits-banner > .btn {
        width: 100%;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .balance-card {
        min-height: 220px;
    }

    .card {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
