/* ============================================================
   闪电 PDF 智能工具箱 - 全站公共样式
   设计原则：化繁为简、商务清爽、现代精致、移动优先
   ============================================================ */

/* CSS 变量：品牌色与间距 */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #0ea5e9 100%);
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置 */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 顶部导航 */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.brand:hover {
    text-decoration: none;
}

.brand-icon {
    font-size: 26px;
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 15px;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

/* 页面主内容 */
.page-main {
    padding: 0 0 48px;
}

/* Hero 首屏 */
.hero {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border);
    padding: 56px 0 64px;
    margin-bottom: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero h1 {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 14px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 12px;
}

.hero-tags {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 20px;
    letter-spacing: 0.02em;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.4);
    text-decoration: none;
}

/* 通用卡片 */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
    .card {
        padding: 22px 18px;
    }
}

/* 标题体系 */
h1, h2, h3 {
    margin-top: 0;
    line-height: 1.3;
}

h1 {
    font-size: 34px;
    margin-bottom: 14px;
    font-weight: 800;
}

h2 {
    font-size: 22px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    font-weight: 700;
}

h3 {
    font-size: 21px;
    margin-bottom: 12px;
    font-weight: 700;
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

/* 上传框 */
.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 56px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 24px;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    transform: translateY(-1px);
}

.upload-zone input[type="file"] {
    display: none;
}

.upload-zone .upload-icon {
    font-size: 52px;
    margin-bottom: 14px;
    opacity: 0.85;
}

.upload-zone .upload-text {
    font-size: 17px;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 6px;
}

.upload-zone .upload-hint {
    font-size: 14px;
    color: var(--text-light);
}

.upload-zone .upload-size-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* 表单输入 */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 15px;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 15px 18px;
    font-size: 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
    background: #fff;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text);
    user-select: none;
}

.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

/* 高级选项 / 表单多列布局 */
.advanced-section {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 28px;
}

.advanced-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.form-row .form-group {
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 17px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    width: 100%;
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.btn-primary:disabled {
    background: #93c5fd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 状态提示 */
.status-msg {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    display: none;
}

.status-msg.show {
    display: block;
}

.status-msg.info {
    background: var(--primary-light);
    color: var(--primary-hover);
    border: 1px solid #bfdbfe;
}

.status-msg.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.status-msg.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* 进度/加载 */
.spinner {
    display: none;
    margin-top: 22px;
    text-align: center;
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
}

.spinner.show {
    display: block;
}

/* Modal 弹窗 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 36px 32px;
    text-align: center;
    animation: modal-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text);
}

.modal-body {
    color: var(--text-muted);
    margin-bottom: 22px;
    font-size: 15px;
    line-height: 1.7;
}

.modal-qrcode {
    width: 220px;
    height: 220px;
    margin: 0 auto 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.modal-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-close {
    margin-top: 18px;
    padding: 11px 28px;
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--border);
    color: var(--text);
}

/* SEO 软文区 */
.seo-section {
    margin-top: 36px;
}

.seo-section h2 {
    margin-top: 24px;
    font-weight: 700;
}

.seo-section p {
    margin-bottom: 16px;
    text-align: justify;
    color: var(--text-muted);
}

.seo-section strong {
    color: var(--text);
}

.seo-section ul,
.seo-section ol {
    margin-bottom: 18px;
    padding-left: 24px;
    color: var(--text-muted);
}

.seo-section li {
    margin-bottom: 10px;
}

/* 首页搜索与分类 */
.tool-search-bar {
    margin-bottom: 16px;
}

.tool-search-input {
    width: 100%;
    max-width: 520px;
    padding: 12px 18px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.tool-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.tool-search-input::placeholder {
    color: var(--text-light);
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.category-tab {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.category-tab:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.category-tab.active {
    color: #fff;
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.no-results {
    text-align: center;
    padding: 28px 20px;
    color: var(--text-muted);
    font-size: 15px;
}

/* 首页九宫格 */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 0;
}

.tool-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    text-decoration: none;
}

.tool-card-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.tool-card-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.tool-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* 页脚 */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .hero {
        padding: 44px 0 52px;
    }

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

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-tags {
        font-size: 13px;
    }

    .hero-cta {
        padding: 12px 24px;
        font-size: 15px;
    }

    h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 20px;
    }

    .brand {
        font-size: 17px;
    }

    .nav-links {
        gap: 10px;
        font-size: 14px;
    }

    .upload-zone {
        padding: 36px 16px;
    }

    .btn {
        padding: 14px 22px;
        font-size: 16px;
    }
}


/* 动态表单字段提示与必填标识 */
.required {
    color: #ef4444;
    margin-left: 4px;
    font-weight: 700;
}

.field-hint {
    margin: -6px 0 10px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.checkbox-hint {
    margin-top: 4px;
    margin-left: 28px;
}


/* ============================================================
   登录 / 注册 / 个人中心
   ============================================================ */
/* 登录 / 注册页：紧凑居中，减少上下空白 */
.auth-page .page-main {
    padding-top: 24px;
    padding-bottom: 40px;
}

.auth-card {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.auth-card h1 {
    font-size: 26px;
    margin-bottom: 8px;
}

.auth-form {
    text-align: left;
    margin-top: 20px;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form .btn {
    width: 100%;
    margin-top: 4px;
}

.auth-extra {
    margin-top: 16px;
    font-size: 15px;
    color: var(--text-muted);
}

.auth-extra a {
    font-weight: 600;
}

/* 个人中心页：与登录/注册页保持一致的上下间距 */
.profile-page .page-main {
    padding-top: 24px;
    padding-bottom: 40px;
}

.profile-page .card {
    margin-bottom: 0;
}

/* ============================================================
   支付弹窗 / 套餐选择
   ============================================================ */
.plan-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.plan-option {
    position: relative;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plan-option:hover {
    border-color: var(--primary);
}

.plan-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.plan-option:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.plan-name {
    font-weight: 700;
    font-size: 16px;
}

.plan-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.plan-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.renew-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.renew-option input {
    width: 16px;
    height: 16px;
}

#qrImage {
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-sm);
}

#payStatus {
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
    min-height: 24px;
}


/* ============================================================
   首页最常用工具前置区
   ============================================================ */
.popular-section {
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
    border-color: #bfdbfe;
}

.popular-tool-grid {
    margin-top: 0;
}

.popular-tool-card {
    position: relative;
    border-color: #dbeafe;
    background: #fff;
    border-top: 3px solid var(--primary);
    overflow: hidden;
}

.popular-tool-card:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
}

.popular-tool-card .tool-card-title {
    color: var(--primary-hover);
}

/* 全部工具网格 */
.all-tool-grid {
    margin-top: 8px;
}
