:root {
    --ink: #171a24;
    --muted: #656b7b;
    --line: #e6e8ee;
    --surface: #ffffff;
    --surface-soft: #f7f7fa;
    --accent: #6d5dfc;
    --accent-dark: #5747e8;
    --success: #15996b;
    --danger: #d6485d;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 18%, rgba(109, 93, 252, 0.12), transparent 28rem),
        radial-gradient(circle at 88% 82%, rgba(84, 181, 255, 0.1), transparent 26rem),
        #f7f7fa;
    font-family:
        Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
        "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.page-shell {
    display: flex;
    width: min(1180px, calc(100% - 48px));
    min-height: 100vh;
    margin: 0 auto;
    flex-direction: column;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 92px;
}

.brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    color: var(--ink);
    font-size: 17px;
    font-weight: 760;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border-radius: 11px;
    background: var(--ink);
    place-items: center;
}

.brand-mark span {
    position: absolute;
    width: 14px;
    height: 6px;
    border-radius: 999px;
    background: #fff;
    transform: rotate(-42deg);
}

.brand-mark span:first-child {
    transform: translate(-4px, -3px) rotate(-42deg);
}

.brand-mark span:last-child {
    transform: translate(4px, 3px) rotate(-42deg);
    opacity: 0.55;
}

.service-state {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: #596071;
    font-size: 13px;
    font-weight: 650;
}

.state-dot {
    width: 8px;
    height: 8px;
    border: 2px solid rgba(21, 153, 107, 0.2);
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(21, 153, 107, 0.08);
}

.hero {
    display: grid;
    flex: 1;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 500px);
    gap: clamp(60px, 9vw, 132px);
    align-items: center;
    padding: 54px 0 80px;
}

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

.eyebrow,
.card-kicker {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 760;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 480px;
    margin: 0;
    font-size: clamp(48px, 6.3vw, 78px);
    font-weight: 790;
    letter-spacing: -0.065em;
    line-height: 0.98;
}

.hero-description {
    max-width: 500px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.85;
}

.steps {
    display: grid;
    gap: 4px;
    margin-top: 48px;
}

.step {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid rgba(23, 26, 36, 0.08);
}

.step:last-child {
    border-bottom: 0;
}

.step-number {
    padding-top: 3px;
    color: #aaafbc;
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    font-weight: 700;
}

.step h2 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 720;
}

.step p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.generator-card {
    position: relative;
    padding: 34px;
    border: 1px solid rgba(23, 26, 36, 0.08);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
        0 28px 80px rgba(37, 32, 75, 0.11),
        0 2px 8px rgba(37, 32, 75, 0.04);
    backdrop-filter: blur(18px);
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
}

.card-heading h2 {
    margin: 0;
    font-size: 25px;
    letter-spacing: -0.035em;
}

.secure-badge {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    color: #34735d;
    background: #edf9f4;
    font-size: 11px;
    font-weight: 720;
}

.secure-badge svg {
    width: 14px;
    fill: currentColor;
}

.field {
    display: block;
    margin-bottom: 19px;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    color: #414655;
    font-size: 13px;
    font-weight: 680;
}

.input-wrap {
    position: relative;
    display: block;
}

.input-wrap svg {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 18px;
    fill: #9ba0ad;
    pointer-events: none;
    transform: translateY(-50%);
}

.input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 15px 0 45px;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
    color: var(--ink);
    background: #fbfbfd;
    font-size: 14px;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.input-wrap input::placeholder {
    color: #a4a8b3;
}

.input-wrap input:focus {
    border-color: rgba(109, 93, 252, 0.62);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.1);
}

.input-wrap:focus-within svg {
    fill: var(--accent);
}

.primary-button {
    display: flex;
    width: 100%;
    height: 54px;
    margin-top: 25px;
    border: 0;
    border-radius: 14px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    background: var(--ink);
    box-shadow: 0 12px 26px rgba(23, 26, 36, 0.16);
    cursor: pointer;
    font-size: 14px;
    font-weight: 720;
    transition:
        transform 140ms var(--ease-out),
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.primary-button:hover {
    background: #292d39;
    box-shadow: 0 14px 30px rgba(23, 26, 36, 0.2);
}

.primary-button:active {
    transform: scale(0.98);
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.primary-button svg {
    width: 18px;
    fill: currentColor;
}

.button-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

.primary-button.loading .button-loader {
    display: block;
}

.primary-button.loading > svg {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.result-panel {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid #dceee7;
    border-radius: 15px;
    background: #f4fbf8;
}

.result-panel.error {
    border-color: #f3d9df;
    background: #fff6f7;
}

.result-heading {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.result-icon {
    display: grid;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    background: var(--success);
    place-items: center;
}

.result-icon::after {
    content: "✓";
    font-size: 14px;
    font-weight: 800;
}

.error .result-icon {
    background: var(--danger);
}

.error .result-icon::after {
    content: "!";
}

.result-heading h3 {
    margin: 1px 0 3px;
    font-size: 14px;
}

.result-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.code-block {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    align-items: center;
    margin-top: 14px;
    padding: 13px;
    border: 1px solid rgba(21, 153, 107, 0.14);
    border-radius: 12px;
    background: #fff;
}

.code-label {
    grid-column: 1;
    color: #8a909d;
    font-size: 10px;
    font-weight: 720;
    letter-spacing: 0.08em;
}

.code-block code {
    overflow-wrap: anywhere;
    color: #343947;
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 14px;
    font-weight: 720;
}

.copy-button {
    grid-row: 1 / 3;
    grid-column: 2;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: #4a5060;
    background: #fff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    transition:
        transform 140ms var(--ease-out),
        border-color 160ms ease;
}

.copy-button:hover {
    border-color: #bbbfc9;
}

.copy-button:active {
    transform: scale(0.96);
}

.result-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #6d7381;
    font-size: 11px;
}

.privacy-note {
    margin: 18px 0 0;
    color: #8c919e;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}

.site-footer {
    display: flex;
    min-height: 72px;
    border-top: 1px solid rgba(23, 26, 36, 0.07);
    align-items: center;
    justify-content: space-between;
    color: #969aa5;
    font-size: 11px;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 52px;
        padding-top: 36px;
    }

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

    .hero h1 {
        font-size: clamp(48px, 10vw, 72px);
    }

    .generator-card {
        width: min(100%, 560px);
    }
}

@media (max-width: 560px) {
    .page-shell {
        width: min(100% - 28px, 1180px);
    }

    .site-header {
        min-height: 76px;
    }

    .service-state {
        font-size: 11px;
    }

    .hero {
        gap: 36px;
        padding: 32px 0 48px;
    }

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

    .hero-description {
        margin-top: 22px;
        font-size: 15px;
    }

    .steps {
        margin-top: 34px;
    }

    .generator-card {
        padding: 24px 20px;
        border-radius: 21px;
    }

    .secure-badge {
        display: none;
    }

    .result-meta,
    .site-footer {
        gap: 8px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
    }
}

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