/* ==========================================
   1. 全局设计系统 (Design System)
   所有子工具页面统一引用此文件
   ========================================== */
:root {
    /* 色彩系统 */
    --primary-blue: #2b6bcb;
    --primary-light: #e7f0ff;
    --primary-gradient: linear-gradient(135deg, #7bb9ff, #3a8eff, #1f6dd9);
    --text-dark: #14273e;
    --text-gray: #4d739b;
    --bg-body: #f6faff;
    --bg-white: #ffffff;
    --border-light: rgba(210, 228, 255, 0.4);

    /* 排版 */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* 圆角 (统一风格) */
    --radius-card: 24px;
    --radius-button: 50px;
    --radius-input: 20px;

    /* 阴影 (统一风格) */
    --shadow-sm: 0 4px 16px rgba(30, 60, 120, 0.04);
    --shadow-md: 0 14px 34px rgba(30, 60, 120, 0.08);
    --shadow-lg: 0 20px 40px rgba(30, 60, 120, 0.12);
    --shadow-input-focus: 0 0 0 5px rgba(60, 140, 255, 0.25), 0 12px 32px rgba(30, 90, 210, 0.18);
}

/* 全局重置 (不影响 WordPress 主题) */
.tool-wrap * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.tool-wrap {
    font-family: var(--font-family);
    color: var(--text-dark);
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.5rem 0 2rem;
}

/* ---------- 通用卡片 (所有工具共用) ---------- */
.tool-card {
    background: var(--bg-white);
    border-radius: var(--radius-card);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: box-shadow 0.2s ease;
}

/* ---------- 通用按钮 ---------- */
.tool-btn {
    background: var(--primary-light);
    border: none;
    padding: 0.5rem 1.8rem;
    border-radius: var(--radius-button);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-blue);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 30, 70, 0.02);
    letter-spacing: 0.2px;
}
.tool-btn:hover {
    background: #d3e4ff;
    transform: scale(0.96);
    box-shadow: 0 6px 12px rgba(40, 100, 200, 0.08);
}
.tool-btn:active {
    transform: scale(0.92);
}

/* ---------- 通用统计卡片网格 ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-top: 2rem;
}
.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-card);
    padding: 1.2rem 0.2rem 1.2rem 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.25s;
    border: 1px solid var(--border-light);
    background: linear-gradient(145deg, #ffffff, #f9fcff);
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-gray);
    margin-bottom: 0.2rem;
}
.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #0b284f;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.stat-value small {
    font-size: 1rem;
    font-weight: 500;
    color: #3a6a96;
    margin-left: 2px;
}

/* ---------- 响应式调整 ---------- */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    .stat-card {
        padding: 0.9rem 0.2rem 0.9rem 0.8rem;
    }
    .stat-value {
        font-size: 1.8rem;
    }
}
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }
    .stat-card {
        padding: 0.6rem 0.2rem 0.6rem 0.6rem;
    }
    .stat-value {
        font-size: 1.5rem;
    }
    .stat-label {
        font-size: 0.7rem;
    }
}

/* ==========================================
   2. 本工具 (Word Counter) 特有样式
   ========================================== */

/* ---------- Hero 区域 ---------- */
.hero-counter {
    background: linear-gradient(145deg, #e4efff 0%, #d4e5ff 60%, #c2d9fc 100%);
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(50, 100, 200, 0.06);
}
.hero-counter h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #113a6b, #1f5a9e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.1rem;
    line-height: 1.3;
}
.hero-counter p {
    font-size: 0.95rem;
    font-weight: 400;
    color: #1f3f64;
    max-width: 100%;
    background: transparent;
    padding: 0;
    border-radius: 0;
    backdrop-filter: none;
    display: block;
    margin-bottom: 0;
}

/* ---------- 渐变输入框 (带发光效果) ---------- */
.textarea-gradient-wrap {
    position: relative;
    background: white;
    border-radius: var(--radius-input);
    padding: 3px;
    background: var(--primary-gradient);
    transition: box-shadow 0.35s ease, filter 0.3s;
    box-shadow: 0 2px 8px rgba(40, 100, 210, 0.08);
}
.textarea-gradient-wrap:focus-within {
    box-shadow: var(--shadow-input-focus);
    filter: brightness(1.01);
}
.textarea-gradient-wrap textarea {
    width: 100%;
    min-height: 80px;
    max-height: 600px;
    padding: 1.3rem 1.5rem;
    border: none;
    border-radius: calc(var(--radius-input) - 2px);
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    resize: none;
    overflow-y: auto;
    background: white;
    color: var(--text-dark);
    outline: none;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.01);
}
.textarea-gradient-wrap textarea::placeholder {
    color: #9aafc7;
    font-weight: 400;
    font-size: 0.95rem;
}

/* ---------- 工具栏 ---------- */
.toolbar {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.2rem;
}

/* ---------- SEO 内容区块 (What / How) ---------- */
.seo-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2.8rem 0 2.8rem;
}
.seo-block {
    background: var(--bg-white);
    padding: 1.8rem 2.2rem;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.seo-block h2 {
    font-size: 1.7rem;
    font-weight: 600;
    color: #14315c;
    margin-bottom: 0.7rem;
    letter-spacing: -0.01em;
}
.seo-block p,
.seo-block li {
    color: #233d5e;
    font-size: 1rem;
    line-height: 1.6;
}
.seo-block ul {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}
.seo-block li {
    margin-bottom: 0.2rem;
}

/* ---------- FAQ 手风琴 ---------- */
.faq-section {
    background: var(--bg-white);
    border-radius: var(--radius-card);
    padding: 1.8rem 2.2rem 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-top: 1.8rem;
}
.faq-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #14315c;
    margin-bottom: 1.2rem;
}
.faq-item {
    border-bottom: 1px solid #e7effa;
    padding: 0.8rem 0;
    transition: border-color 0.2s;
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: #1f3f68;
    font-size: 1rem;
    padding: 0.2rem 0;
    transition: color 0.15s;
    user-select: none;
}
.faq-question:hover {
    color: var(--primary-blue);
}
.faq-question .icon {
    font-size: 1.6rem;
    font-weight: 300;
    transition: transform 0.3s ease, color 0.2s;
    color: #4f7eb3;
    line-height: 1;
}
.faq-item.open .faq-question .icon {
    transform: rotate(45deg);
    color: #1f6dd9;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.2, 0.9, 0.3, 1), padding 0.2s ease;
    color: #2f4a6e;
    line-height: 1.6;
    padding-right: 0.5rem;
}
.faq-item.open .faq-answer {
    max-height: 240px;
    padding-top: 0.6rem;
    padding-bottom: 0.2rem;
}
.faq-answer p {
    margin: 0;
}

/* ==========================================
   3. 响应式 (移动端适配)
   ========================================== */

/* ---------- 平板 (≤768px) ---------- */
@media (max-width: 768px) {
    /* Hero 响应式 */
    .hero-counter {
        padding: 0.8rem 1.5rem;
    }
    .hero-counter h1 {
        font-size: 1.8rem;
    }
    .hero-counter p {
        font-size: 0.9rem;
        display: block;
        background: transparent;
        backdrop-filter: none;
        padding: 0;
        white-space: normal;
    }

    /* 工具卡片 */
    .tool-card {
        padding: 1.2rem;
    }

    /* SEO & FAQ */
    .seo-block,
    .faq-section {
        padding: 1.2rem 1.2rem;
    }
    .seo-block h2 {
        font-size: 1.4rem;
    }
}

/* ---------- 手机 (≤480px) ---------- */
@media (max-width: 480px) {
    /* Hero 响应式 - 更紧凑 */
    .hero-counter {
        padding: 0.6rem 1rem;
        border-radius: 16px;
        margin-bottom: 1rem;
    }
    .hero-counter h1 {
        font-size: 1.5rem;
    }
    .hero-counter p {
        font-size: 0.8rem;
        white-space: normal;
    }

    /* 工具栏按钮 */
    .toolbar {
        justify-content: flex-start;
    }
    .tool-btn {
        padding: 0.45rem 1.2rem;
        font-size: 0.85rem;
    }

    /* 输入框 */
    .textarea-gradient-wrap textarea {
        height: 150px;
        min-height: 150px;
    }

    /* SEO & FAQ */
    .seo-block,
    .faq-section {
        padding: 1rem;
    }
    .seo-block h2 {
        font-size: 1.2rem;
    }
    .faq-section h2 {
        font-size: 1.3rem;
    }
}
/* 隐藏 WordPress 默认页面标题，防止和 Hero 标题重复 */
.entry-header,
.entry-title,
.page-title {
    display: none !important;
}