﻿:root {
    --brand: #3370ff;
    --brand-hover: #2a5fe8;
    --brand-active: #2457d6;
    --brand-ring: rgba(51, 112, 255, 0.14);
    --bg: #f7f8fa;
    --surface: #ffffff;
    --text-1: #1f2329;
    --text-2: #646a73;
    --text-3: #86909c;
    --border: #e5e6eb;
    --border-strong: #d9dce3;
    --ok: #16a34a;
    --err: #e11d48;
    --radius: 10px;
    --font: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: "Cascadia Code", "SF Mono", Consolas, Menlo, monospace;
}

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

html, body { height: 100%; }

body.theme {
    font-family: var(--font);
    color: var(--text-1);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
    height: 60px;
    flex: none;
    display: flex;
    align-items: center;
    padding: 0 28px;
    background: var(--surface);
    border-bottom: 1px solid #f0f1f3;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-1);
    letter-spacing: 0.2px;
}
.logo svg { display: block; }
.main-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 24px 96px;
}
.split {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 72px;
    align-items: center;
}

.hero { text-align: left; }

.hero-badge {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    border: 1px solid #e0eaff;
    border-radius: 16px;
    margin-bottom: 26px;
}

.hero-title {
    font-size: 40px;
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-1);
}
.hero-title span { color: var(--brand); }

.hero-sub {
    margin-top: 16px;
    max-width: 430px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-2);
}

.hero-features {
    margin-top: 30px;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}
.hero-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-1);
}
.feat-ico {
    width: 34px;
    height: 34px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    border-radius: 9px;
}

.panel {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px 36px 34px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    text-align: center;
    animation: fadeIn .35s ease both;
}
.panel-center { padding-top: 56px; padding-bottom: 56px; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.panel h1,
.panel h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-1);
}
.panel .sub {
    margin-top: 6px;
    margin-bottom: 30px;
    font-size: 14px;
    color: var(--text-2);
}
.spinner {
    width: 26px;
    height: 26px;
    margin: 0 auto 18px;
    border: 3px solid var(--border);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-2);
}
.status.error { color: var(--err); }
.status.ok { color: var(--ok); }

.panel-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 6px;
}
.receive-form { text-align: left; }

.code-input { margin-bottom: 16px; }

.code-input input {
    width: 100%;
    height: 52px;
    padding: 0 12px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    outline: none;
    color: var(--text-1);
    font-family: var(--mono);
    font-size: 24px;
    letter-spacing: 10px;
    text-align: center;
    transition: border-color .15s, box-shadow .15s;
}
.code-input input::placeholder { color: #c0c4cc; letter-spacing: 10px; }
.code-input input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
}

.btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: var(--brand);
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-hover); }
.btn:active { background: var(--brand-active); transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }

.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.btn.loading .btn-spinner { display: inline-block; }
.btn.loading .btn-label { opacity: .8; }

.hint {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--text-3);
    text-align: center;
}
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 20;
    transform: translate(-50%, 16px);
    max-width: min(92vw, 440px);
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    color: var(--text-1);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { color: var(--ok); border-color: rgba(22, 163, 74, 0.35); }
.toast.error { color: var(--err); border-color: rgba(225, 29, 72, 0.35); }
.footer {
    flex: none;
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
}
@media (max-width: 900px) {
    .split {
        grid-template-columns: 1fr;
        gap: 44px;
    }
    .hero { text-align: center; }
    .hero-badge { margin: 0 auto 22px; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-features { justify-content: center; }
    .panel { width: min(420px, 100%); margin: 0 auto; }
}

@media (max-width: 480px) {
    .topbar { padding: 0 16px; }
    .panel { padding: 32px 22px 28px; }
    .hero-title { font-size: 32px; }
    .hero-features { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .spinner, .panel, .btn-spinner { animation: none !important; }
}
