@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --wc-bg: #f2f6fb;
    --wc-surface: rgba(255, 255, 255, 0.94);
    --wc-surface-strong: #ffffff;
    --wc-text: #1f2a44;
    --wc-muted: #64748b;
    --wc-line: rgba(31, 42, 68, 0.08);
    --wc-green: #14b86f;
    --wc-blue: #2667ff;
    --wc-navy: #11203b;
    --wc-shadow: 0 24px 60px rgba(31, 42, 68, 0.08);
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Manrope', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(38, 103, 255, 0.08), transparent 24%),
        radial-gradient(circle at top right, rgba(20, 184, 111, 0.08), transparent 22%),
        var(--wc-bg);
    color: var(--wc-text);
    overflow-x: hidden;
}

.word-counter-page {
    width: min(1240px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 28px 0 88px;
}

.hero-card,
.card-surface,
.content-section {
    background: var(--wc-surface);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--wc-shadow);
    border-radius: 28px;
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 34px;
    margin-bottom: 26px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 48%, #effbf4 100%);
}

.hero-tag,
.section-title span {
    display: inline-flex;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(38, 103, 255, 0.1);
    color: var(--wc-blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.hero-copy p {
    margin: 0;
    color: var(--wc-muted);
    font-size: 18px;
    line-height: 1.75;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-pills span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(17, 32, 59, 0.05);
    font-size: 14px;
    font-weight: 700;
    color: var(--wc-navy);
}

.hero-preview {
    display: flex;
    align-items: center;
}

.preview-shell {
    width: 100%;
    padding: 16px;
    border-radius: 24px;
    background: linear-gradient(180deg, #fefefe, #f4f8ff);
    border: 1px solid var(--wc-line);
}

.preview-header {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.preview-header span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(17, 32, 59, 0.18);
}

.preview-content {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 14px;
}

.preview-editor,
.preview-stats div {
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(17, 32, 59, 0.06);
}

.preview-editor {
    min-height: 210px;
    background:
        linear-gradient(#f9fbff 48px, transparent 48px),
        linear-gradient(180deg, rgba(17, 32, 59, 0.04) 1px, transparent 1px);
    background-size: 100% 100%, 100% 36px;
}

.preview-stats {
    display: grid;
    gap: 12px;
}

.preview-stats div {
    min-height: 48px;
}

.tool-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

.card-surface {
    padding: 22px;
}

.editor-toolbar,
.editor-footer,
.detail-row,
.social-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.editor-toolbar h2 {
    margin: 0;
    font-size: 20px;
}

.editor-toolbar p,
.status-message,
.detail-block,
.feature-panel p,
.step-card p,
.benefit-card p,
.content-section > p,
.tips-list li,
.social-item span,
.detail-row span,
.empty-state {
    color: var(--wc-muted);
}

.editor-toolbar p,
.status-message {
    margin: 6px 0 0;
    font-size: 14px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.primary-btn {
    background: rgba(20, 184, 111, 0.12);
    color: var(--wc-green);
    border-color: rgba(20, 184, 111, 0.35);
}

.ghost-btn {
    background: rgba(38, 103, 255, 0.08);
    color: var(--wc-blue);
    border-color: rgba(38, 103, 255, 0.15);
}

.text-btn {
    background: transparent;
    color: #ef4444;
    border-color: transparent;
}

.text-editor {
    width: 100%;
    min-height: 520px;
    margin: 18px 0 16px;
    padding: 22px;
    resize: vertical;
    border-radius: 22px;
    border: 1px solid var(--wc-line);
    outline: none;
    font: inherit;
    font-size: 18px;
    line-height: 1.9;
    color: var(--wc-text);
    background: var(--wc-surface-strong);
}

.text-editor:focus {
    border-color: rgba(38, 103, 255, 0.28);
    box-shadow: 0 0 0 4px rgba(38, 103, 255, 0.08);
}

.toggle-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--wc-muted);
}

.toggle-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--wc-green);
}

.footer-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.status-message {
    min-height: 20px;
    color: var(--wc-green);
}

.stats-grid,
.feature-grid,
.benefit-grid,
.bullet-grid {
    display: grid;
    gap: 16px;
}

.stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-box,
.feature-panel,
.step-card,
.benefit-card,
.bullet-card,
.detail-block {
    border-radius: 22px;
    background: var(--wc-surface-strong);
    border: 1px solid var(--wc-line);
}

.stat-box {
    padding: 20px 16px;
    text-align: center;
}

.stat-box strong {
    display: block;
    font-size: 48px;
    line-height: 1;
    letter-spacing: -0.05em;
}

.stat-box span {
    display: block;
    margin-top: 8px;
    color: var(--wc-muted);
    font-size: 14px;
    font-weight: 700;
}

.detail-block {
    padding: 18px;
    margin-top: 18px;
}

.detail-block h3,
.section-title h2,
.feature-panel h3,
.step-card h3,
.benefit-card h3,
.detail-header h3 {
    margin: 0;
    letter-spacing: -0.03em;
}

.detail-header {
    margin-bottom: 14px;
}

.detail-row + .detail-row,
.social-item + .social-item {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--wc-line);
}

.detail-row strong,
.social-item strong {
    color: var(--wc-navy);
}

.empty-state {
    font-size: 14px;
    padding: 10px 0 4px;
}

.density-list {
    display: grid;
    gap: 12px;
}

.density-item {
    display: grid;
    grid-template-columns: 28px 1fr 52px;
    gap: 10px;
    align-items: center;
}

.density-label,
.density-value {
    font-size: 13px;
    font-weight: 800;
    color: var(--wc-navy);
}

.density-bar {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(38, 103, 255, 0.08);
}

.density-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--wc-blue), var(--wc-green));
}

.content-section {
    padding: 28px;
    margin-top: 24px;
}

.alt-surface {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.96));
}

.section-title {
    margin-bottom: 16px;
}

.section-title h2 {
    margin-top: 12px;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.1;
}

.content-section > p {
    margin: 0;
    font-size: 17px;
    line-height: 1.9;
}

.bullet-grid,
.feature-grid,
.benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 22px;
}

.bullet-card,
.feature-panel,
.benefit-card,
.step-card {
    padding: 20px;
}

.bullet-card {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    color: var(--wc-navy);
}

.bullet-card i {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(38, 103, 255, 0.1);
    color: var(--wc-blue);
}

.feature-panel h3,
.step-card h3,
.benefit-card h3 {
    font-size: 22px;
}

.feature-panel p,
.step-card p,
.benefit-card p {
    margin: 12px 0 0;
    font-size: 16px;
    line-height: 1.8;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.step-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--wc-blue), var(--wc-green));
    margin-bottom: 18px;
}

.step-visual {
    margin-top: 18px;
    border-radius: 18px;
    min-height: 120px;
    background: linear-gradient(180deg, #f7fbff, #eef4ff);
    border: 1px solid rgba(17, 32, 59, 0.06);
    padding: 14px;
}

.visual-copy,
.visual-paste,
.visual-stats {
    display: grid;
    align-items: center;
}

.visual-copy {
    gap: 10px;
}

.visual-copy span,
.visual-stats span {
    display: block;
    border-radius: 999px;
    background: rgba(38, 103, 255, 0.12);
}

.visual-copy span:nth-child(1) { height: 14px; width: 80%; }
.visual-copy span:nth-child(2) { height: 14px; width: 66%; }
.visual-copy span:nth-child(3) { height: 14px; width: 72%; }

.visual-paste div {
    min-height: 88px;
    border-radius: 18px;
    border: 2px dashed rgba(20, 184, 111, 0.35);
    background: rgba(20, 184, 111, 0.08);
}

.visual-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.visual-stats span {
    min-height: 40px;
}

.tips-list {
    margin: 22px 0 0;
    padding-left: 22px;
    display: grid;
    gap: 14px;
    font-size: 16px;
    line-height: 1.85;
}

@media (max-width: 1080px) {
    .hero-card,
    .tool-layout,
    .steps-grid,
    .feature-grid,
    .benefit-grid,
    .bullet-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .word-counter-page {
        width: min(100%, calc(100vw - 20px));
        padding: 20px 0 64px;
    }

    .hero-card,
    .content-section,
    .card-surface {
        padding: 18px;
        border-radius: 22px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .editor-toolbar,
    .editor-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .text-editor {
        min-height: 360px;
        font-size: 16px;
    }
}