:root {
    --bg: #f7f9ff;
    --panel: #ffffff;
    --text: #12182b;
    --muted: #68738a;
    --line: #e6ebf5;
    --primary: #111827;
    --primary-soft: #eef4ff;
    --cyan: #36d6db;
    --blue: #4c7dff;
    --green: #1ec8a5;
    --gold: #f0b84a;
    --danger: #b42318;
    --success: #087443;
    --warning: #9a6700;
    --shadow: 0 24px 80px rgba(43, 76, 138, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background:
        radial-gradient(circle at 18% 0%, rgba(74, 125, 255, .16), transparent 28%),
        radial-gradient(circle at 85% 12%, rgba(54, 214, 219, .18), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #ffffff 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.topbar {
    width: min(1180px, calc(100% - 40px));
    min-height: 66px;
    margin: 16px auto 0;
    padding: 10px 14px 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(230, 235, 245, .95);
    border-radius: 999px;
    position: sticky;
    top: 12px;
    z-index: 10;
    box-shadow: 0 12px 42px rgba(42, 68, 122, .1);
    backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; white-space: nowrap; }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #151b31, #427cff 60%, #31d5d9);
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(76, 125, 255, .25);
}
.nav { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; }
.nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    white-space: nowrap;
}
.nav a:hover { color: var(--text); background: #f3f6fb; }
.nav-button {
    color: #fff !important;
    background: var(--primary) !important;
    border: 1px solid var(--primary);
    box-shadow: 0 10px 24px rgba(17, 24, 39, .16);
}
main { min-height: calc(100vh - 152px); }

.hero {
    width: min(1220px, calc(100% - 40px));
    margin: 0 auto;
}
.ai-hero {
    min-height: 640px;
    padding: 72px 0 42px;
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(420px, 1.12fr);
    gap: 34px;
    align-items: center;
    border-bottom: 0;
    background: transparent;
}
.activity-pill {
    width: fit-content;
    padding: 8px 14px;
    border: 1px solid rgba(76, 125, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: #3765d8;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 12px 34px rgba(76, 125, 255, .1);
}
.eyebrow {
    margin: 0 0 10px;
    color: #3765d8;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}
h1, h2, h3 { margin: 0; line-height: 1.18; letter-spacing: 0; }
.hero h1 {
    margin-top: 18px;
    max-width: 670px;
    font-size: 62px;
    font-weight: 900;
    letter-spacing: 0;
}
.lead {
    max-width: 650px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 20px;
}
.hero-actions { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.section-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    font-size: 15px;
}
.button.primary {
    background: linear-gradient(135deg, #101827, #315cff);
    color: #fff;
    box-shadow: 0 16px 34px rgba(49, 92, 255, .22);
}
.button.primary:hover { transform: translateY(-1px); }
.button.secondary {
    background: #fff;
    color: var(--text);
    border-color: var(--line);
    box-shadow: 0 12px 30px rgba(43, 76, 138, .1);
}
.button.full { width: 100%; }
.button:disabled { opacity: .65; cursor: not-allowed; }
.hero-stats {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 560px;
}
.hero-stats div {
    padding: 14px;
    border: 1px solid rgba(230, 235, 245, .95);
    border-radius: 20px;
    background: rgba(255, 255, 255, .72);
}
.hero-stats strong { display: block; font-size: 18px; }
.hero-stats span { color: var(--muted); font-size: 13px; }
.hero-art {
    position: relative;
    border-radius: 34px;
    padding: 10px;
    background: rgba(255, 255, 255, .68);
    border: 1px solid rgba(230, 235, 245, .95);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.hero-art:before {
    content: "";
    position: absolute;
    inset: -18px;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 18%, rgba(54, 214, 219, .34), transparent 30%),
        radial-gradient(circle at 84% 70%, rgba(76, 125, 255, .24), transparent 34%);
    filter: blur(6px);
}
.hero-art img {
    display: block;
    width: 100%;
    border-radius: 26px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.creator-panel {
    width: min(980px, calc(100% - 40px));
    margin: -14px auto 30px;
}
.creator-card {
    display: grid;
    grid-template-columns: .75fr 1.4fr .55fr;
    gap: 18px;
    align-items: center;
    padding: 18px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 18px 60px rgba(43, 76, 138, .12);
}
.creator-head span { display: block; color: #3765d8; font-size: 13px; font-weight: 800; }
.creator-head strong { display: block; margin-top: 4px; font-size: 20px; }
.creator-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.creator-flow div {
    min-height: 74px;
    padding: 12px;
    border-radius: 18px;
    background: #f6f9ff;
    border: 1px solid #e9eef9;
}
.creator-flow b {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 13px;
}
.creator-flow span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }

.section, .page, .dashboard { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 70px 0; }
.section-title { margin-bottom: 28px; }
.section-title.center { text-align: center; }
.section-title h1, .section-title h2 { font-size: 42px; font-weight: 900; }
.grid { display: grid; gap: 18px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.feature-card, .price-card, .card, .panel, .auth-card, .token-box {
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 18px 60px rgba(43, 76, 138, .08);
}
.feature-card {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    position: relative;
}
.feature-card:before {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -42px;
    top: -42px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(54, 214, 219, .32), transparent 62%);
}
.feature-card.large { grid-column: span 2; min-height: 300px; background: linear-gradient(135deg, #f7fbff, #ffffff 58%, #eef7ff); }
.feature-card.wide { grid-column: span 2; background: linear-gradient(135deg, #ffffff, #f5fbff); }
.card-tag {
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #3765d8;
    background: #edf4ff;
    font-size: 12px;
    font-weight: 800;
}
.feature-card h3, .price-card h3, .card h3 { font-size: 24px; }
.feature-card p, .price-card p, .card p, .auth-card p, .page p, .panel p, .metric span { color: var(--muted); }
.template-section {
    width: 100%;
    max-width: none;
    padding: 76px max(20px, calc((100vw - 1180px) / 2));
    background: linear-gradient(135deg, #101827, #19315d 55%, #0c7b83);
    color: #fff;
}
.template-section .eyebrow { color: #87f6ff; }
.scenario-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}
.scenario-strip div {
    min-height: 130px;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    font-weight: 800;
}
.price-card { min-height: 220px; }
.price-card.featured {
    color: #fff;
    background: linear-gradient(135deg, #141b2e, #315cff);
    border-color: transparent;
}
.price-card.featured p { color: rgba(255, 255, 255, .76); }
.price-card strong {
    display: inline-flex;
    margin-top: 22px;
    padding: 9px 12px;
    border-radius: 999px;
    background: #f4f8ff;
}
.price-card.featured strong { background: rgba(255, 255, 255, .18); }

.auth-wrap { padding: 54px 20px; display: flex; justify-content: center; }
.auth-card { width: min(100%, 460px); border-radius: 28px; }
.auth-card h1 { font-size: 32px; }
label { display: block; margin-top: 18px; font-weight: 800; }
input {
    width: 100%;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    min-height: 48px;
    padding: 11px 14px;
    font: inherit;
    background: #fff;
}
select,
textarea {
    width: 100%;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    min-height: 48px;
    padding: 11px 14px;
    font: inherit;
    background: #fff;
}
textarea {
    min-height: 120px;
    resize: vertical;
}
input:focus { outline: 3px solid rgba(76, 125, 255, .16); border-color: var(--blue); }
select:focus,
textarea:focus { outline: 3px solid rgba(76, 125, 255, .16); border-color: var(--blue); }
.code-row { display: grid; grid-template-columns: 1fr 132px; gap: 10px; align-items: end; }
.auth-card .full { margin-top: 24px; }
.auth-link { text-align: center; }
.auth-link a { color: #315cff; font-weight: 800; }
.form-note {
    margin: 16px 0 0;
    font-size: 14px;
}
.flash {
    width: min(900px, calc(100% - 32px));
    margin: 18px auto 0;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 34px rgba(43, 76, 138, .08);
}
.flash-success { color: var(--success); }
.flash-danger { color: var(--danger); }
.flash-warning { color: var(--warning); }
.page.narrow, .legal { max-width: 960px; }
.legal { padding-top: 58px; }
.legal-hero {
    margin-bottom: 18px;
    padding: 34px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 12% 8%, rgba(54, 214, 219, .22), transparent 30%),
        linear-gradient(135deg, #ffffff, #f4f8ff);
    border: 1px solid var(--line);
    box-shadow: 0 18px 60px rgba(43, 76, 138, .08);
}
.legal-hero h1 { font-size: 44px; font-weight: 900; }
.legal-hero p:last-child { margin-bottom: 0; color: var(--muted); }
.legal-card {
    padding: 34px;
    border-radius: 28px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--line);
    box-shadow: 0 18px 60px rgba(43, 76, 138, .08);
}
.legal-card h2 {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 26px;
}
.legal-card h2:first-of-type { margin-top: 18px; }
.legal-card h3 {
    margin-top: 20px;
    font-size: 18px;
}
.legal-card p { color: #4d5870; }
.contact-list { display: grid; gap: 12px; margin-top: 24px; }
.contact-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
}
.dashboard { display: grid; gap: 18px; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.panel-head h2 { margin: 0; }
.panel-head p { margin: 6px 0 0; }
.empty-state {
    padding: 20px;
    border: 1px dashed #cfd8ea;
    border-radius: 18px;
    background: #f8fbff;
}
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { margin: 0; }
.metric-number {
    margin: 10px 0 0;
    color: var(--text) !important;
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
}
.admin-topbar {
    border-color: rgba(49, 92, 255, .18);
}
.token-box code {
    display: block;
    margin-top: 12px;
    padding: 12px;
    background: #eef8ff;
    border-radius: 16px;
    word-break: break-all;
}
.masked-token,
.token-visible {
    display: inline-block;
    max-width: 420px;
    white-space: normal;
    word-break: break-all;
}
.token-reveal {
    display: grid;
    gap: 8px;
    min-width: 220px;
}
.token-code-row {
    grid-template-columns: minmax(110px, 1fr) 76px;
    gap: 8px;
}
.token-code-row input {
    margin-top: 0;
}
.muted-text {
    color: var(--muted);
    font-size: 14px;
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 800; }
.footer {
    width: min(1180px, calc(100% - 40px));
    min-height: 92px;
    margin: 0 auto;
    padding: 26px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}
.footer div:last-child { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-meta,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.footer-meta {
    max-width: 760px;
    flex-direction: column;
}
.footer-meta strong { color: var(--text); }
.footer a { color: #315cff; font-weight: 700; }
.text-link { color: #315cff; font-weight: 800; }
.timeline { display: grid; gap: 14px; margin-top: 18px; }
.timeline-item {
    position: relative;
    padding: 16px 16px 16px 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}
.timeline-item:before {
    content: "";
    position: absolute;
    left: 8px;
    top: 20px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--blue);
}
.timeline-item strong { display: block; font-size: 17px; }
.timeline-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.timeline-item p { margin: 8px 0 0; }

@media (max-width: 980px) {
    .topbar {
        width: min(100% - 24px, 760px);
        border-radius: 28px;
        align-items: flex-start;
        flex-direction: column;
        padding: 14px;
    }
    .nav { width: 100%; overflow-x: auto; padding-bottom: 2px; }
    .ai-hero { grid-template-columns: 1fr; min-height: 0; padding-top: 48px; }
    .hero h1 { font-size: 42px; }
    .lead { font-size: 17px; }
    .creator-card { grid-template-columns: 1fr; }
    .feature-grid, .grid.four, .grid.three, .grid.two, .scenario-strip { grid-template-columns: 1fr; }
    .feature-card.large, .feature-card.wide { grid-column: span 1; }
    .section-title h1, .section-title h2 { font-size: 32px; }
    .hero-stats { grid-template-columns: 1fr; }
    .code-row { grid-template-columns: 1fr; }
    .footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
    body {
        background:
            radial-gradient(circle at 12% 0%, rgba(76, 125, 255, .14), transparent 26%),
            linear-gradient(180deg, #ffffff 0%, #f7f9ff 48%, #ffffff 100%);
    }

    .topbar {
        width: calc(100% - 20px);
        min-height: 0;
        margin-top: 10px;
        gap: 10px;
        border-radius: 22px;
        padding: 10px;
        top: 8px;
        box-shadow: 0 10px 30px rgba(42, 68, 122, .1);
    }

    .brand {
        width: 100%;
        gap: 9px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 12px;
        font-size: 13px;
        flex: 0 0 auto;
    }

    .brand span:last-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 15px;
    }

    .nav {
        gap: 4px;
        font-size: 14px;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar { display: none; }
    .nav a { min-height: 34px; padding: 7px 10px; }

    .hero,
    .section,
    .page,
    .dashboard,
    .footer,
    .creator-panel {
        width: min(1180px, calc(100% - 24px));
    }

    .ai-hero {
        padding: 34px 0 22px;
        gap: 24px;
    }

    .activity-pill {
        padding: 6px 10px;
        font-size: 12px;
    }

    .hero h1 {
        margin-top: 14px;
        font-size: 36px;
        line-height: 1.1;
    }

    .lead {
        margin-top: 16px;
        font-size: 16px;
    }

    .hero-actions {
        margin-top: 22px;
        gap: 10px;
    }

    .hero-actions .button {
        width: 100%;
        min-height: 46px;
    }

    .hero-stats {
        margin-top: 20px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .hero-stats div {
        padding: 10px;
        border-radius: 16px;
    }

    .hero-stats strong { font-size: 15px; }
    .hero-stats span { font-size: 12px; }

    .hero-art {
        border-radius: 22px;
        padding: 6px;
        box-shadow: 0 16px 46px rgba(43, 76, 138, .14);
    }

    .hero-art:before { inset: -8px; }
    .hero-art img { border-radius: 18px; }

    .creator-panel { margin: 0 auto 8px; }

    .creator-card {
        border-radius: 22px;
        padding: 14px;
        gap: 14px;
    }

    .creator-head strong { font-size: 18px; }
    .creator-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .creator-flow div { min-height: 68px; padding: 10px; border-radius: 16px; }
    .creator-flow span { font-size: 13px; }

    .section,
    .page,
    .dashboard {
        padding: 48px 0;
    }

    .section-title { margin-bottom: 20px; }
    .section-title h1,
    .section-title h2 {
        font-size: 28px;
        line-height: 1.22;
    }

    .grid,
    .feature-grid {
        gap: 14px;
    }

    .feature-card,
    .price-card,
    .card,
    .panel,
    .auth-card,
    .token-box {
        border-radius: 20px;
        padding: 18px;
    }

    .feature-card { min-height: 188px; }
    .feature-card.large { min-height: 220px; }
    .feature-card h3,
    .price-card h3,
    .card h3 {
        font-size: 21px;
    }

    .template-section {
        width: 100%;
        max-width: none;
        padding: 50px 12px;
    }

    .scenario-strip { gap: 10px; }
    .scenario-strip div {
        min-height: 92px;
        border-radius: 18px;
        padding: 16px;
    }

    .price-card { min-height: 0; }
    .price-card strong { margin-top: 16px; }

    .auth-wrap {
        padding: 34px 12px;
    }

    .auth-card h1 { font-size: 28px; }
    label { margin-top: 14px; }
    input { border-radius: 14px; }

    .legal { padding-top: 32px; }
    .legal-hero,
    .legal-card {
        border-radius: 20px;
        padding: 20px;
    }

    .legal-hero h1 { font-size: 30px; }
    .legal-card h2 {
        margin-top: 28px;
        padding-top: 20px;
        font-size: 22px;
    }

    .legal-card h3 { font-size: 17px; }
    .legal-card p,
    .page p,
    .card p,
    .panel p {
        font-size: 15px;
        overflow-wrap: anywhere;
    }

    .contact-list div {
        flex-direction: column;
        gap: 6px;
    }

    .panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .panel-head .button {
        width: 100%;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .footer {
        min-height: 0;
        padding: 22px 0;
        gap: 10px;
    }
}

@media (max-width: 420px) {
    .nav a { padding: 7px 9px; }
    .hero h1 { font-size: 32px; }
    .creator-flow { grid-template-columns: 1fr; }
    .section-title h1,
    .section-title h2 {
        font-size: 26px;
    }
}

@media (max-width: 360px) {
    .hero-stats { grid-template-columns: 1fr; }
}
