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

:root {
    --bg0: #040a1a;
    --bg1: #0a1534;
    --bg2: #1a1d5a;
    --card: rgba(8, 20, 54, 0.72);
    --card-strong: rgba(10, 24, 62, 0.9);
    --line: rgba(122, 178, 255, 0.28);
    --line-soft: rgba(122, 178, 255, 0.14);
    --text-main: #e8f0ff;
    --text-sub: #aebee6;
    --text-faint: #7f90bc;
    --primary-a: #5ce1ff;
    --primary-b: #6f6dff;
    --primary-c: #9d5fff;
    --success: #2ee6a1;
    --danger: #ff6f88;
    --warning: #ffc266;
    --shadow-lg: 0 24px 68px rgba(2, 10, 32, 0.62);
    --shadow-md: 0 14px 36px rgba(2, 10, 32, 0.4);
}

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

body {
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background:
            radial-gradient(1200px 600px at -10% -10%, rgba(78, 170, 255, 0.35), transparent 45%),
            radial-gradient(980px 520px at 110% 0%, rgba(157, 95, 255, 0.28), transparent 42%),
            radial-gradient(900px 600px at 50% 120%, rgba(62, 102, 255, 0.24), transparent 50%),
            linear-gradient(145deg, var(--bg0) 0%, var(--bg1) 40%, var(--bg2) 100%);
    padding: 20px 16px 36px;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    filter: blur(52px);
}

body::before {
    width: 360px;
    height: 360px;
    background: rgba(92, 225, 255, 0.2);
    top: -120px;
    left: -120px;
}

body::after {
    width: 420px;
    height: 420px;
    background: rgba(157, 95, 255, 0.2);
    right: -160px;
    bottom: -180px;
}

.app-shell {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-panel {
    background: linear-gradient(160deg, rgba(79, 128, 255, 0.26) 0%, rgba(109, 84, 255, 0.22) 44%, rgba(17, 31, 82, 0.72) 100%);
    border: 1px solid rgba(193, 222, 255, 0.3);
    border-radius: 22px;
    backdrop-filter: blur(18px);
    padding: 18px 20px;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    margin-bottom: 14px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    color: #d7e9ff;
    border: 1px solid rgba(170, 216, 255, 0.38);
    background: rgba(74, 157, 255, 0.2);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
}

.hero-title {
    margin-top: 8px;
    color: #f3f7ff;
    font-size: clamp(24px, 3.4vw, 38px);
    line-height: 1.18;
    font-weight: 900;
    text-shadow: 0 0 18px rgba(92, 225, 255, 0.2);
}

.hero-subtitle {
    margin-top: 8px;
    color: #d7e6ff;
    font-size: 15px;
    line-height: 1.58;
    max-width: 680px;
}

.hero-tabs {
    display: inline-flex;
    margin-top: 14px;
    border-radius: 999px;
    padding: 4px;
    background: rgba(5, 15, 44, 0.48);
    border: 1px solid rgba(173, 210, 255, 0.3);
    box-shadow: inset 0 0 0 1px rgba(92, 225, 255, 0.12);
}

.hero-tab {
    border: none;
    background: transparent;
    color: #d5e5ff;
    padding: 9px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
}

.hero-tab.active {
    background: linear-gradient(135deg, rgba(92, 225, 255, 0.96) 0%, rgba(122, 109, 255, 0.96) 58%, rgba(157, 95, 255, 0.96) 100%);
    color: #06122f;
    box-shadow: 0 10px 24px rgba(96, 152, 255, 0.35);
}

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

.glass-card {
    background: linear-gradient(165deg, rgba(6, 17, 45, 0.9), rgba(6, 14, 38, 0.82));
    border-radius: 24px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(219, 236, 255, 0.14);
    padding: 20px;
}

.progress-shell {
    margin-bottom: 18px;
}

.progress-rail {
    height: 6px;
    border-radius: 999px;
    background: rgba(173, 206, 255, 0.12);
    overflow: hidden;
    border: 1px solid rgba(173, 206, 255, 0.2);
}

.progress-fill {
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, var(--primary-a) 0%, var(--primary-b) 54%, var(--primary-c) 100%);
    box-shadow: 0 0 26px rgba(108, 150, 255, 0.56);
    transition: width 0.25s ease;
}

.progress-steps {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.step-item {
    text-align: center;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(180, 206, 255, 0.35);
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #adbee2;
    background: rgba(5, 18, 46, 0.9);
}

.step-item.active .step-circle,
.step-item.done .step-circle {
    border-color: rgba(105, 185, 255, 0.94);
    color: #fff;
    background: linear-gradient(135deg, rgba(92, 225, 255, 0.88), rgba(106, 102, 255, 0.96));
    box-shadow: 0 0 20px rgba(95, 148, 255, 0.46);
}

.step-label {
    font-size: 12px;
    color: var(--text-faint);
}

.step-item.active .step-label,
.step-item.done .step-label {
    color: var(--text-main);
    font-weight: 700;
}

.section-title {
    font-size: clamp(20px, 2.4vw, 28px);
    font-weight: 900;
    margin-bottom: 6px;
    color: #f0f6ff;
    letter-spacing: 0.01em;
}

.section-sub {
    color: var(--text-sub);
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.6;
}

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

.field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #dae9ff;
    font-size: 15px;
}

.field-help {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-faint);
    line-height: 1.6;
}

.token-insight {
    margin-top: 10px;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(67, 223, 171, 0.36);
    background: linear-gradient(155deg, rgba(14, 58, 76, 0.6), rgba(8, 34, 56, 0.5));
    box-shadow: inset 0 1px 0 rgba(190, 255, 238, 0.12);
    display: none;
}

.token-insight.show {
    display: block;
}

.token-insight-title {
    font-size: 15px;
    font-weight: 800;
    color: #c9fff0;
    margin-bottom: 8px;
}

.token-insight-list {
    margin-bottom: 0;
}

.token-insight-list .summary-item:last-child {
    padding-bottom: 0;
}

.guide-card {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid rgba(102, 188, 255, 0.35);
    border-radius: 14px;
    background: rgba(8, 30, 72, 0.58);
    box-shadow: inset 0 1px 0 rgba(198, 228, 255, 0.12);
}

.guide-title {
    font-weight: 800;
    margin-bottom: 8px;
    font-size: 15px;
    color: #d9eaff;
}

.guide-list {
    margin: 0 0 8px 18px;
    color: #c5d7ff;
    line-height: 1.72;
    font-size: 14px;
}

.guide-link {
    color: #88deff;
    text-decoration: underline;
    word-break: break-all;
}

.guide-link:hover {
    color: #b0ecff;
}

.guide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mono-inline {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    background: rgba(84, 125, 255, 0.28);
    border-radius: 6px;
    padding: 2px 6px;
    color: #d7e6ff;
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid rgba(128, 174, 255, 0.34);
    border-radius: 12px;
    padding: 12px 13px;
    font-size: 15px;
    background: rgba(7, 21, 56, 0.82);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.textarea {
    min-height: 136px;
    resize: vertical;
    line-height: 1.6;
}

.input::placeholder,
.textarea::placeholder {
    color: #778bb9;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: rgba(97, 203, 255, 0.84);
    box-shadow: 0 0 0 4px rgba(80, 150, 255, 0.2), 0 0 24px rgba(87, 147, 255, 0.3);
    background: rgba(10, 26, 64, 0.9);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.btn {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-a) 0%, var(--primary-b) 56%, var(--primary-c) 100%);
    color: #06122f;
    box-shadow: 0 10px 26px rgba(92, 136, 255, 0.36);
}

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

.btn-secondary {
    background: rgba(8, 25, 61, 0.84);
    border-color: rgba(139, 192, 255, 0.36);
    color: #dbe9ff;
}

.btn-danger {
    background: rgba(77, 9, 28, 0.9);
    border-color: rgba(255, 110, 145, 0.48);
    color: #ffdce5;
}

.btn-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid transparent;
}

.badge-primary {
    background: rgba(85, 129, 255, 0.32);
    color: #d8e8ff;
    border-color: rgba(139, 181, 255, 0.4);
}

.badge-success {
    background: rgba(33, 95, 80, 0.52);
    color: #cefff0;
    border-color: rgba(64, 230, 173, 0.42);
}

.badge-warning {
    background: rgba(95, 67, 15, 0.62);
    color: #ffe3ba;
    border-color: rgba(255, 194, 102, 0.45);
}

.badge-danger {
    background: rgba(104, 26, 46, 0.66);
    color: #ffd9e3;
    border-color: rgba(255, 111, 136, 0.46);
}

.summary-list {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px dashed rgba(130, 167, 230, 0.3);
    padding-bottom: 8px;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-key {
    color: var(--text-faint);
    font-size: 13px;
}

.summary-value {
    font-weight: 700;
    text-align: right;
    word-break: break-all;
    color: #e8f1ff;
    font-size: 14px;
}

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

.alert-info {
    background: rgba(33, 70, 130, 0.52);
    color: #cde5ff;
    border-color: rgba(105, 168, 255, 0.34);
}

.alert-success {
    background: rgba(24, 82, 62, 0.58);
    color: #cefff2;
    border-color: rgba(74, 235, 177, 0.36);
}

.alert-error {
    background: rgba(90, 22, 45, 0.66);
    color: #ffd9e6;
    border-color: rgba(255, 111, 136, 0.36);
}

.result-grid {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(118, 167, 244, 0.3);
    border-radius: 14px;
    background: rgba(9, 24, 61, 0.62);
}

.data-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.data-table-detail {
    min-width: 0;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(118, 167, 244, 0.16);
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
    color: #e8f1ff;
}

.data-table thead th {
    font-size: 13px;
    font-weight: 800;
    color: #aebee6;
    background: rgba(5, 17, 44, 0.72);
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: rgba(16, 36, 82, 0.42);
}

.data-table tbody tr:last-child td,
.data-table tbody tr:last-child th {
    border-bottom: none;
}

.data-table-detail th {
    width: 150px;
    font-weight: 700;
    color: #aebee6;
    white-space: nowrap;
}

.data-table-detail td {
    word-break: break-all;
}

.table-empty {
    border: 1px solid rgba(118, 167, 244, 0.3);
    border-radius: 14px;
    padding: 14px 16px;
    background: rgba(9, 24, 61, 0.62);
    color: #d7e6ff;
}

.table-empty-error {
    color: #ffd9e6;
    border-color: rgba(255, 111, 136, 0.36);
    background: rgba(90, 22, 45, 0.4);
}

.query-panel {
    display: none;
}

.query-panel.active {
    display: block;
}

.redeem-panel {
    display: none;
}

.redeem-panel.active {
    display: block;
}

.dialog-mask {
    position: fixed;
    inset: 0;
    background: rgba(4, 10, 26, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.dialog-mask.show {
    display: flex;
}

.dialog-card {
    width: min(460px, 92vw);
    border-radius: 20px;
    border: 1px solid rgba(132, 182, 255, 0.34);
    background: linear-gradient(165deg, rgba(9, 24, 60, 0.96), rgba(6, 17, 45, 0.96));
    box-shadow: 0 28px 62px rgba(2, 10, 26, 0.7), inset 0 1px 0 rgba(198, 228, 255, 0.15);
    padding: 20px;
    text-align: center;
}

.dialog-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #ff7b98, #a14bff);
    box-shadow: 0 0 22px rgba(161, 75, 255, 0.42);
}

.dialog-card.success .dialog-icon {
    background: linear-gradient(135deg, #2ee6a1, #57c6ff);
}

.dialog-card.warning .dialog-icon {
    background: linear-gradient(135deg, #ffc266, #ff8d6a);
}

.dialog-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 8px;
    color: #f0f6ff;
}

.dialog-message {
    font-size: 16px;
    color: #d0def9;
    line-height: 1.66;
    margin-bottom: 18px;
    word-break: break-all;
    white-space: pre-line;
}

.dialog-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dialog-btn {
    border: none;
    border-radius: 12px;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 800;
    color: #081732;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-a), var(--primary-b));
    box-shadow: 0 10px 20px rgba(92, 136, 255, 0.36);
}

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

@media (max-width: 768px) {
    body {
        padding: 16px 12px 24px;
    }

    .hero-panel,
    .glass-card {
        border-radius: 18px;
        padding: 16px;
    }

    .hero-title {
        font-size: 26px;
    }

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

    .progress-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .field-label {
        font-size: 14px;
    }

    .input,
    .textarea {
        font-size: 15px;
    }

    .btn {
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .guide-actions .btn {
        width: auto;
    }

    .data-table {
        min-width: 720px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 22px;
    }

    .hero-subtitle {
        font-size: 13px;
    }

    .hero-tab {
        font-size: 13px;
        padding: 7px 12px;
    }
}
