:root {
    color-scheme: dark;
    --bg: #07100f;
    --panel: #101d1c;
    --panel-strong: #162927;
    --line: rgba(141, 220, 207, 0.18);
    --line-strong: rgba(235, 196, 102, 0.34);
    --text: #e9fff9;
    --muted: #829994;
    --teal: #33e0bf;
    --mint: #b8ffe8;
    --gold: #f4c35e;
    --code: #fff4bf;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    color: var(--text);
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 18% 8%, rgba(51, 224, 191, 0.18), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(244, 195, 94, 0.13), transparent 26%),
        linear-gradient(180deg, #091514 0%, var(--bg) 62%, #050807 100%);
}

.sms-shell {
    width: min(1120px, calc(100% - 36px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 44px 0 56px;
}

.sms-hero {
    position: relative;
    display: grid;
    justify-items: center;
    min-height: 190px;
    padding-top: 16px;
    overflow: hidden;
}

.sms-kicker {
    margin: 0 0 8px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sms-hero h1 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(48px, 8vw, 92px);
    line-height: 1;
    font-weight: 950;
    letter-spacing: 0;
    color: transparent;
    background: linear-gradient(90deg, var(--mint) 0%, var(--teal) 46%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 34px rgba(51, 224, 191, 0.28);
}

.title-beam {
    width: min(360px, 56vw);
    height: 3px;
    margin-top: 24px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--teal), var(--gold), transparent);
    box-shadow: 0 0 18px rgba(51, 224, 191, 0.68);
}

.signal-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.signal-field span {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--teal);
    box-shadow: 0 0 14px var(--teal);
    opacity: 0.8;
}

.signal-field span:nth-child(1) { left: 6%; top: 18%; }
.signal-field span:nth-child(2) { left: 15%; top: 32%; width: 3px; height: 3px; }
.signal-field span:nth-child(3) { right: 12%; top: 24%; background: var(--gold); box-shadow: 0 0 14px var(--gold); }
.signal-field span:nth-child(4) { right: 26%; top: 40%; width: 3px; height: 3px; }

.code-board {
    margin-top: 4px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(22, 41, 39, 0.96), rgba(13, 23, 22, 0.96)),
        var(--panel);
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.code-table {
    width: 100%;
}

.code-row {
    display: grid;
    grid-template-columns: 1.2fr 1.15fr 0.9fr 1.05fr;
    align-items: center;
    min-height: 64px;
}

.code-head {
    min-height: 58px;
    color: var(--mint);
    font-size: 17px;
    font-weight: 900;
    background: rgba(24, 48, 45, 0.92);
    border-bottom: 1px solid var(--line-strong);
}

.code-head > div,
.code-cell {
    min-width: 0;
    padding: 0 26px;
}

.code-body .code-row {
    color: #d9f7ef;
    border-bottom: 1px solid rgba(141, 220, 207, 0.09);
}

.code-body .code-row:last-child {
    border-bottom: 0;
}

.code-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.code-value {
    color: var(--code);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 22px;
    font-weight: 900;
}

.empty-state {
    min-height: 132px;
    display: flex;
    align-items: center;
    padding: 0 58px;
    color: var(--muted);
    font-size: 18px;
    font-weight: 700;
}

.totp-board {
    margin-top: 30px;
    padding: 26px;
    border: 1px solid var(--line);
    background: rgba(13, 23, 22, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.totp-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.totp-head h2 {
    margin: 0;
    color: var(--mint);
    font-size: 24px;
    letter-spacing: 0;
}

.totp-head p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.totp-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
}

.totp-form input {
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--text);
    background: rgba(4, 10, 9, 0.72);
    font: inherit;
}

.totp-form input:focus {
    outline: 2px solid rgba(51, 224, 191, 0.42);
    outline-offset: 2px;
}

.totp-form button {
    height: 48px;
    padding: 0 28px;
    border: 0;
    color: #06110f;
    background: linear-gradient(90deg, var(--teal), var(--gold));
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.totp-result {
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid var(--line-strong);
    color: var(--text);
    background: rgba(4, 10, 9, 0.82);
}

.totp-result.is-error {
    border-color: rgba(255, 112, 112, 0.72);
    background: rgba(56, 13, 13, 0.84);
}

.totp-result.is-success {
    border-color: rgba(51, 224, 191, 0.72);
    background: rgba(4, 28, 24, 0.86);
}

.totp-result.is-loading {
    border-color: rgba(244, 195, 94, 0.56);
}

.totp-title {
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
}

.totp-code {
    color: var(--code);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 30px;
    font-weight: 950;
}

.totp-meta {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

.phone-sms-board {
    margin-top: 18px;
}

.phone-sms-form {
    display: grid;
    grid-template-columns: 1fr 180px auto;
    gap: 12px;
}

.phone-sms-form input {
    min-width: 0;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--text);
    background: rgba(4, 10, 9, 0.72);
    font: inherit;
}

.phone-sms-form input:focus {
    outline: 2px solid rgba(51, 224, 191, 0.42);
    outline-offset: 2px;
}

.phone-sms-form button {
    height: 44px;
    padding: 0 26px;
    border: 0;
    color: #06110f;
    background: linear-gradient(90deg, var(--teal), var(--gold));
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.phone-sms-result {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 42px;
    margin-top: 10px;
    padding: 0 14px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: rgba(4, 10, 9, 0.66);
}

.phone-sms-result.is-success {
    border-color: rgba(51, 224, 191, 0.72);
    color: var(--text);
}

.phone-sms-result.is-error {
    border-color: rgba(255, 112, 112, 0.72);
    color: #ffc6c6;
}

.phone-sms-result.is-loading {
    border-color: rgba(244, 195, 94, 0.56);
}

.phone-sms-result strong {
    color: var(--code);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 24px;
}

@media (max-width: 760px) {
    .sms-shell {
        width: min(100% - 24px, 560px);
        padding-top: 32px;
    }

    .sms-hero {
        min-height: 150px;
    }

    .code-row {
        grid-template-columns: 1fr;
        gap: 4px;
        min-height: 0;
        padding: 18px 20px;
    }

    .code-head {
        display: none;
    }

    .code-cell {
        padding: 0;
        white-space: normal;
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 10px;
    }

    .code-cell::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 800;
    }

    .empty-state {
        min-height: 116px;
        padding: 0 24px;
        font-size: 16px;
    }

    .totp-head {
        display: block;
    }

    .totp-head p {
        margin-top: 8px;
    }

    .totp-form {
        grid-template-columns: 1fr;
    }

    .phone-sms-form {
        grid-template-columns: 1fr;
    }

    .phone-sms-result {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        padding: 12px 14px;
    }
}
