/* ============================================================
   PDF转Word提取器 - 工具专属样式
   视觉体系与官网（drill.html）保持一致，使用全局 CSS 变量
   ============================================================ */

/* ===== 页面头部微调 ===== */
.page-header { padding: 120px 0 40px; }

.tool-notice-section { padding: 0 0 8px; }
.tool-notice {
    margin-bottom: 8px;
    background: linear-gradient(135deg, #e8f1ff 0%, #f0f5ff 100%);
    border: 1.5px solid rgba(26, 110, 255, 0.15);
}
.tool-notice h4 { color: var(--primary); }
.tool-notice-icon { background: var(--primary); }

/* ===== 工具主区域 ===== */
.tool-main { padding: 24px 0 80px; }

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.tool-card-header { margin-bottom: 24px; }
.tool-card-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
.tool-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.step-badge {
    width: 28px; height: 28px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(26, 110, 255, 0.3);
}

/* ===== 拖拽上传区 ===== */
.dropzone {
    border: 2px dashed rgba(26, 110, 255, 0.3);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}
.dropzone:hover, .dropzone:focus-visible {
    border-color: var(--primary);
    background: var(--primary-light);
}
.dropzone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: scale(1.01);
    box-shadow: 0 8px 32px rgba(26, 110, 255, 0.15);
}
.dropzone-icon {
    width: 56px; height: 56px;
    color: var(--primary);
    margin-bottom: 16px;
    opacity: 0.8;
}
.dropzone-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.dropzone-sub {
    font-size: 13px;
    color: var(--text-light);
}

/* ===== 文件信息条 ===== */
.file-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 14px 18px;
    background: var(--bg-warm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.file-meta-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
    min-width: 0;
}
.file-meta-info strong {
    display: block;
    font-size: 14px;
    color: var(--text);
    word-break: break-all;
}
.file-meta-info span {
    font-size: 12px;
    color: var(--text-light);
}

/* ===== 转换选项 ===== */
.option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.option-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    background: white;
}
.option-item:hover { border-color: rgba(26, 110, 255, 0.4); }
.option-item input[type="checkbox"] {
    width: 18px; height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}
.option-text strong { display: block; font-size: 14px; color: var(--text); }
.option-text em {
    display: block;
    font-style: normal;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
    line-height: 1.5;
}

/* ===== 按钮体系 ===== */
.action-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.action-hint { font-size: 13px; color: var(--text-light); }
.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}
.tool-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.tool-btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(26, 110, 255, 0.3);
}
.tool-btn-primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 110, 255, 0.4);
}
.tool-btn-ghost {
    background: white;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.tool-btn-ghost:hover { background: var(--primary-light); }

/* ===== 进度条 ===== */
.progress-wrap { margin-top: 20px; }
.progress-track {
    width: 100%;
    height: 8px;
    background: var(--bg-warm);
    border-radius: 100px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    border-radius: 100px;
    transition: width 0.25s ease;
}
.progress-text {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    font-family: monospace;
}

/* ===== 统计面板 ===== */
.tool-stats {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}
.tool-stats .stat-value {
    font-size: 30px;
    font-weight: 900;
    color: #ff6b35;
    line-height: 1;
}
.tool-stats .stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
}

/* ===== 导出按钮行 ===== */
.export-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* ===== 预览区 ===== */
.preview-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    max-height: 560px;
    overflow-y: auto;
    padding: 32px 36px;
    line-height: 1.9;
    color: var(--text);
}
.preview-wrap h1 { font-size: 24px; font-weight: 800; margin: 20px 0 12px; }
.preview-wrap h2 { font-size: 20px; font-weight: 700; margin: 18px 0 10px; }
.preview-wrap h3 { font-size: 17px; font-weight: 700; margin: 16px 0 8px; }
.preview-wrap p  { font-size: 14px; margin-bottom: 12px; color: var(--text-secondary); }
.preview-page-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 12px;
    border-radius: 100px;
    margin: 20px 0 4px;
}
.preview-empty {
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    padding: 32px 0;
}
.preview-note {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.7;
}

/* ===== 功能特点 ===== */
.feature-section { padding: 40px 0 8px; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}
.feature-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: rgba(26, 110, 255, 0.2);
}
.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }

/* ===== 帮助列表 ===== */
.help-list { list-style: none; }
.help-list li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    padding: 8px 0 8px 22px;
    position: relative;
    border-bottom: 1px dashed var(--border);
}
.help-list li:last-child { border-bottom: none; }
.help-list li::before {
    content: '';
    position: absolute;
    left: 2px; top: 17px;
    width: 6px; height: 6px;
    background: var(--primary);
    border-radius: 50%;
}
.help-list strong { color: var(--text); }

/* ===== 提示浮层（轻量 toast） ===== */
.toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%) translateY(20px);
    background: var(--text);
    color: white;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 100px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    max-width: calc(100vw - 48px);
    text-align: center;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.toast.toast-error { background: var(--danger); }
.toast.toast-success { background: var(--success); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .option-grid { grid-template-columns: 1fr; }
    .tool-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .page-header { padding: 104px 0 32px; }
    .tool-main { padding: 16px 0 56px; }
    .tool-card { padding: 20px; margin-bottom: 16px; }
    .tool-card-header h2 { font-size: 17px; }
    .dropzone { padding: 36px 16px; }
    .dropzone-title { font-size: 14px; }
    .file-meta { flex-direction: column; align-items: stretch; }
    .file-meta .tool-btn { width: 100%; justify-content: center; }
    .action-row { flex-direction: column; align-items: stretch; }
    .action-row .tool-btn { width: 100%; justify-content: center; }
    .action-hint { text-align: center; }
    .export-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .export-row .tool-btn { justify-content: center; padding: 11px 10px; font-size: 13px; }
    .preview-wrap { padding: 20px 16px; max-height: 480px; }
    .tool-stats { padding: 20px; gap: 14px; }
    .tool-stats .stat-value { font-size: 24px; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-section { padding: 28px 0 4px; }
    .section-header { margin-bottom: 32px; }
}

@media (max-width: 480px) {
    .export-row { grid-template-columns: 1fr; }
    .tool-stats { grid-template-columns: 1fr 1fr; }
}

/* ===== 官网同款提示横幅（基础样式，照抄 drill.html 内联规则） ===== */
.warning-banner {
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
    border: 1.5px solid rgba(220, 38, 38, 0.15);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 40px;
}
.warning-banner .warning-icon {
    width: 40px; height: 40px;
    background: var(--danger);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.warning-banner .warning-icon svg {
    width: 22px; height: 22px;
    color: white;
}
.warning-banner h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 6px;
}
.warning-banner p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}
@media (max-width: 768px) {
    .warning-banner { flex-direction: column; gap: 12px; padding: 20px; }
}
