html[data-i18n-ready="false"] body {
    visibility: hidden;
}

html[data-i18n-ready="true"] body {
    visibility: visible;
}

:root {
    --primary: #1578ff;
    --primary-dark: #0f67db;
    --primary-accent: #22b8cf;
    --success: #1578ff;
    --danger: #dc2626;
    --bg: radial-gradient(circle at top, #eef7ff 0, #f7fbff 40%, #ffffff 100%);
    --card: rgba(255, 255, 255, 0.86);
    --text: #102033;
    --muted: #6b7c90;
    --line: rgba(60, 130, 210, 0.16);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero {
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border-bottom: 1px solid var(--line);
    padding: 28px 16px;
}

.hero-inner,
.main {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
}

.hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lang-switch {
    display: flex;
    gap: 8px;
}

.lang-btn {
    border: 1px solid rgba(60, 130, 210, 0.2);
    background: rgba(255, 255, 255, 0.82);
    color: #31506f;
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(30, 86, 140, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

    .lang-btn:hover {
        transform: translateY(-2px);
        border-color: rgba(50, 130, 220, 0.32);
        box-shadow: 0 18px 36px rgba(30, 86, 140, 0.12);
    }

    .lang-btn.active {
        color: #fff;
        border-color: transparent;
        background: linear-gradient(135deg, #1578ff, #22b8cf);
    }

.logo {
    height: 44px;
    max-width: 180px;
    object-fit: contain;
}

.hero h1 {
    margin: 22px 0 10px;
    font-size: 28px;
}

.hero p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.main {
    flex: 1;
    padding: 24px 16px 40px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.step,
.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 24px 64px rgba(30, 86, 140, 0.12);
}

.step {
    padding: 20px;
}

.step-no {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 12px;
}

.step h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.step p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    min-height: 72px;
}

.download-btn,
.submit-btn,
.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    background: linear-gradient(135deg, #1578ff, #22b8cf);
    box-shadow: 0 18px 36px rgba(30, 86, 140, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.download-btn {
    margin-top: 14px;
}

.submit-btn {
    width: 100%;
}

    .download-btn:hover,
    .submit-btn:hover,
    .copy-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 24px 48px rgba(30, 86, 140, 0.22);
        filter: brightness(1.02);
    }

    .submit-btn:disabled {
        opacity: .7;
        cursor: not-allowed;
        transform: none;
        box-shadow: 0 18px 36px rgba(30, 86, 140, 0.12);
    }

.panel {
    padding: 24px;
}

    .panel h2 {
        margin: 0 0 20px;
        font-size: 22px;
    }

.row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.col {
    flex: 1 1 320px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.required::after {
    content: " *";
    color: var(--danger);
}

input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    outline: none;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.95);
}

    input:focus {
        border-color: #1578ff;
        box-shadow: 0 0 0 3px rgba(21, 120, 255, .12);
    }

.alert {
    display: none;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    line-height: 1.7;
}

    .alert.info {
        color: #1d4ed8;
        background: #eff6ff;
        border: 1px solid #bfdbfe;
    }

    .alert.success {
        color: #166534;
        background: #f0fdf4;
        border: 1px solid #bbf7d0;
    }

    .alert.error {
        color: #991b1b;
        background: #fef2f2;
        border: 1px solid #fecaca;
    }

.loading {
    display: none;
    margin-bottom: 16px;
    color: var(--muted);
}

.result {
    display: none;
    margin-top: 18px;
    padding: 18px;
    border-radius: 20px;
    border: 1px dashed #93c5fd;
    background: #f8fbff;
}

.result-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.result-code {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #fff;
    font-family: Consolas, monospace;
    font-size: 16px;
    font-weight: 700;
    word-break: break-all;
}

.tips {
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.8;
    font-size: 13px;
}

.footer {
    padding: 16px;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid rgba(60, 130, 210, 0.12);
    background: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

@media (max-width: 860px) {
    .steps {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 24px;
    }

    .panel {
        padding: 18px;
    }
}
