:root {
    --surface: #FFFFFF;
    --surface-soft: #FAFAFC;
    --foreground: #1A1A1A;
    --foreground-secondary: #666666;
    --foreground-tertiary: #8A8A8E;
    --accent: #4A9FD8;
    --border-subtle: #E8E8EC;
    --chip-bg: #F3F4F7;
    --wave-inactive: #D8D8DC;
    --dot-red: #FF5F57;
    --dot-yellow: #FEBC2E;
    --dot-green: #28C840;
    --danger: #C44569;

    --font-heading: 'Funnel Sans', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
    --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
    --font-caption: 'Geist', 'Inter', 'PingFang SC', system-ui, sans-serif;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-xl: 12px;
    --radius-full: 9999px;

    --shadow-back: 0 4px 6px #00000008, 0 16px 40px #00000012;
    --shadow-front: 0 8px 12px #00000014, 0 24px 60px #0000001F;
}

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

html, body {
    background: var(--surface);
    color: var(--foreground);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

a {
    text-decoration: none;
    color: inherit;
}

.page {
    width: 1440px;
    min-height: 1660px;
    margin: 0 auto;
    padding: 20px 120px 56px 120px;
    display: flex;
    flex-direction: column;
    gap: 48px;
    background: var(--surface);
}

/* ============= NAV ============= */
.nav {
    height: 40px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--foreground);
}

.logo-word {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--foreground);
    white-space: nowrap;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--foreground-secondary);
    white-space: nowrap;
    cursor: pointer;
}

.engine-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--chip-bg);
    border-radius: var(--radius-full);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--accent);
}

.badge-text {
    font-family: var(--font-caption);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--foreground-secondary);
    white-space: nowrap;
}

/* ============= HERO ============= */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.eyebrow {
    font-family: var(--font-caption);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--foreground-tertiary);
    white-space: nowrap;
}

.title {
    width: 760px;
    font-family: var(--font-heading);
    font-size: 68px;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -1.5px;
    text-align: center;
    color: var(--foreground);
}

.subtitle {
    width: 560px;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.5;
    text-align: center;
    color: var(--foreground-secondary);
}

.cta-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.primary-cta {
    padding: 14px 28px;
    background: var(--foreground);
    color: var(--surface);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    white-space: nowrap;
    transition: transform 0.18s, box-shadow 0.18s;
}

.primary-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(26, 26, 26, 0.25);
}

.secondary-cta {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--foreground-secondary);
    white-space: nowrap;
}

/* ============= FEATURES ============= */
.features {
    display: flex;
    justify-content: center;
    gap: 80px;
    padding: 8px 40px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--chip-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground);
}

.icon-wrap svg {
    width: 18px;
    height: 18px;
}

.feature-label {
    font-family: var(--font-caption);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--foreground-secondary);
    white-space: nowrap;
}

/* ============= CASCADE STAGE ============= */
.cascade-stage {
    position: relative;
    width: 100%;
    height: 980px;
}

.device {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.back-device {
    left: 200px;
    top: 30px;
    width: 760px;
    height: 580px;
    box-shadow: var(--shadow-back);
    z-index: 0;
}

.front-device {
    left: 720px;
    top: 580px;
    width: 480px;
    height: 340px;
    transform: rotate(-6deg);
    transform-origin: top left;
    box-shadow: var(--shadow-front);
    z-index: 1;
}

.device-chrome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--surface-soft);
}

.front-device .device-chrome {
    padding: 12px 18px;
}

.dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
}

.dot.sm {
    width: 9px;
    height: 9px;
}

.dot-red { background: var(--dot-red); }
.dot-yellow { background: var(--dot-yellow); }
.dot-green { background: var(--dot-green); }

.device-url {
    font-family: var(--font-caption);
    font-size: 11px;
    color: var(--foreground-tertiary);
    white-space: nowrap;
}

.front-device .device-url {
    font-size: 10px;
}

.device-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 32px;
}

.front-body {
    padding: 20px 24px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label-text {
    font-family: var(--font-caption);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--foreground);
}

.label-meta {
    font-family: var(--font-caption);
    font-size: 10px;
    color: var(--foreground-tertiary);
}

.text-area {
    height: 130px;
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.text-area textarea {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.5;
    color: var(--foreground);
}

.text-area textarea::placeholder {
    color: var(--foreground-tertiary);
    opacity: 0.6;
}

/* ============= VOICE TRIGGER ============= */
.voice-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--surface-soft);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.voice-trigger:hover {
    border-color: var(--foreground-secondary);
}

.trigger-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.trigger-label {
    font-family: var(--font-caption);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--foreground);
    flex-shrink: 0;
}

.trigger-selected {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--foreground-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trigger-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.trigger-hint {
    font-family: var(--font-caption);
    font-size: 10px;
    color: var(--foreground-tertiary);
    white-space: nowrap;
}

.trigger-chevron {
    width: 14px;
    height: 14px;
    color: var(--foreground-secondary);
}

/* ============= VOICE MODAL ============= */
.voice-modal-mask {
    position: fixed;
    inset: 0;
    background: #00000033;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 100px 24px 24px;
    z-index: 100;
    overflow-y: auto;
}

.voice-modal-mask[hidden] {
    display: none;
}

.voice-modal {
    width: 100%;
    max-width: 760px;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 24px 80px #00000033, 0 8px 24px #0000001F;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--foreground);
}

.modal-close {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: #0000000F;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground-secondary);
    transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
    background: #0000001A;
    color: var(--foreground);
}

.modal-close svg {
    width: 14px;
    height: 14px;
}

.lang-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.lang-tabs::-webkit-scrollbar {
    height: 4px;
}

.lang-tabs::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 2px;
}

.lang-tab {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: transparent;
    font-family: var(--font-caption);
    font-size: 11px;
    font-weight: 500;
    color: var(--foreground-secondary);
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.lang-tab:hover {
    background: #0000000A;
}

.lang-tab.selected {
    background: #0000000F;
    color: var(--foreground);
}

.voice-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 2px;
}

.voice-grid::-webkit-scrollbar {
    width: 4px;
}

.voice-grid::-webkit-scrollbar-track {
    background: transparent;
}

.voice-grid::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 2px;
}

.voice-grid::-webkit-scrollbar-thumb:hover {
    background: var(--foreground-tertiary);
}

.voice-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 0.15s, border-color 0.15s;
}

.voice-row:hover {
    background: #0000000A;
}

.voice-row.selected {
    background: #0000000A;
    border-color: #00000033;
}

.voice-row.previewing {
    background: var(--chip-bg);
    border-color: var(--accent);
}

.voice-gender {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.voice-gender.female {
    background: rgba(196, 69, 105, 0.12);
    color: var(--danger);
}

.voice-gender.male {
    background: rgba(74, 159, 216, 0.12);
    color: var(--accent);
}

.voice-name {
    flex: 1;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-locale {
    font-family: var(--font-caption);
    font-size: 10px;
    color: var(--foreground-tertiary);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.voice-preview {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground-secondary);
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.voice-preview:hover {
    background: var(--foreground);
    color: var(--surface);
}

.voice-preview svg {
    width: 10px;
    height: 10px;
}

/* ============= AUDIO TUNING ============= */
.audio-tuning {
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tuning-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tuning-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.slider-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-name {
    font-family: var(--font-caption);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--foreground);
}

.slider-value {
    font-family: var(--font-caption);
    font-size: 10px;
    color: var(--foreground-tertiary);
}

.slider-input {
    width: 100%;
    height: 16px;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
    margin: 0;
}

.slider-input:focus {
    outline: none;
}

.slider-input::-webkit-slider-runnable-track {
    height: 4px;
    background: var(--border-subtle);
    border-radius: 2px;
}

.slider-input::-moz-range-track {
    height: 4px;
    background: var(--border-subtle);
    border-radius: 2px;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--foreground);
    border-radius: var(--radius-full);
    margin-top: -6px;
    border: none;
    transition: transform 0.15s;
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.slider-input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--foreground);
    border-radius: var(--radius-full);
    border: none;
}

.slider-marks {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-caption);
    font-size: 10px;
    color: var(--foreground-tertiary);
    letter-spacing: 0.04em;
}

/* ============= ACTIONS ============= */
.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.generate-btn {
    padding: 12px 24px;
    background: var(--foreground);
    color: var(--surface);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.18s, transform 0.18s;
    white-space: nowrap;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.generate-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.status {
    font-family: var(--font-caption);
    font-size: 10px;
    color: var(--foreground-tertiary);
}

.error {
    color: var(--danger);
    font-family: var(--font-body);
    font-size: 12px;
    min-height: 0;
    transition: min-height 0.18s;
}

.error:not(:empty) {
    min-height: 18px;
    padding: 8px 12px;
    background: rgba(196, 69, 105, 0.06);
    border-radius: var(--radius-sm);
}

/* ============= FRONT DEVICE / PREVIEW ============= */
.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-label {
    font-family: var(--font-caption);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--foreground-secondary);
}

.divider {
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.waveform {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.waveform .bar {
    flex: 1;
    min-width: 5px;
    max-width: 5px;
    background: var(--wave-inactive);
    border-radius: 2px;
    transition: background 0.15s;
}

.waveform .bar.active {
    background: var(--foreground);
}

.time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-current {
    font-family: var(--font-caption);
    font-size: 11px;
    color: var(--foreground);
}

.time-total {
    font-family: var(--font-caption);
    font-size: 11px;
    color: var(--foreground-tertiary);
}

.front-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.play-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--foreground);
    color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.18s;
}

.play-btn:hover {
    transform: scale(1.05);
}

.play-btn svg {
    width: 14px;
    height: 14px;
}

.voice-tag {
    flex: 1;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--foreground-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--foreground);
    border-radius: var(--radius-full);
    font-family: var(--font-caption);
    font-size: 11px;
    font-weight: 500;
    color: var(--foreground);
    white-space: nowrap;
    transition: background 0.18s, color 0.18s;
}

.download-btn:hover {
    background: var(--foreground);
    color: var(--surface);
}

.download-btn svg {
    width: 12px;
    height: 12px;
}

#player {
    display: none;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 1480px) {
    .page {
        width: 100%;
        max-width: 1440px;
    }
}

@media (max-width: 1200px) {
    .cascade-stage {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 24px;
        align-items: center;
    }
    .device {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 760px;
        height: auto;
    }
    .front-device {
        transform: none;
    }
    .text-area {
        height: auto;
        min-height: 130px;
    }
    .tuning-row {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 880px) {
    .page {
        padding: 32px 24px;
        gap: 32px;
    }
    .title {
        width: 100%;
        font-size: 40px;
        line-height: 1.1;
        letter-spacing: -1px;
    }
    .subtitle {
        width: 100%;
        font-size: 15px;
    }
    .features {
        gap: 32px;
        padding: 8px 0;
        flex-wrap: wrap;
    }
    .nav-link {
        display: none;
    }
    .device-body {
        padding: 20px;
    }
    .tuning-row {
        gap: 16px;
    }
}

.seo-content {
    max-width: 880px;
    margin: 80px auto 32px;
    padding: 0 24px;
    color: #2b2b2b;
    font-size: 15px;
    line-height: 1.75;
}
.seo-content h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}
.seo-content p {
    margin: 0 0 14px;
}
.seo-content strong {
    font-weight: 600;
    color: #1a1a1a;
}
.seo-content em {
    font-style: normal;
    color: #FF6B2C;
    font-weight: 500;
}
.seo-faq {
    margin-top: 32px;
}
.seo-faq h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px;
}
.seo-faq details {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 10px;
    background: #fff;
    transition: box-shadow 0.2s ease;
}
.seo-faq details[open] {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.seo-faq summary {
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
    color: #1a1a1a;
}
.seo-faq summary::-webkit-details-marker {
    display: none;
}
.seo-faq summary::before {
    content: "+";
    display: inline-block;
    width: 18px;
    color: #FF6B2C;
    font-weight: 600;
}
.seo-faq details[open] summary::before {
    content: "−";
}
.seo-faq p {
    margin: 10px 0 0 26px;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
}
.site-footer {
    max-width: 880px;
    margin: 0 auto;
    padding: 28px 24px 36px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    color: #888;
    font-size: 13px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-icp {
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-icp:hover {
    color: #FF6B2C;
}
@media (max-width: 720px) {
    .seo-content {
        margin: 48px auto 24px;
        padding: 0 16px;
    }
    .footer-inner {
        justify-content: center;
        text-align: center;
    }
}
