/* ========================================================
   PDF 在线工具（加密码 / 加权限 / 去密码 / 加水印）通用样式
   设计语言沿用 pdfcompress.css（hero + FAQ + 卡片）
   ======================================================== */

/* ============ Hero 区 ============ */
.ps-hero {
    position: relative;
    padding: 52px 0 68px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e 0%, #2563eb 55%, #6d28d9 100%);
    color: #fff;
}
.ps-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 16% 28%, rgba(255,255,255,.16) 0, transparent 36%),
        radial-gradient(circle at 84% 72%, rgba(255,255,255,.12) 0, transparent 32%);
    pointer-events: none;
}
.ps-hero .container-xl { position: relative; z-index: 1; }
.ps-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    font-size: 13px;
    margin-bottom: 18px;
    backdrop-filter: blur(8px);
}
.ps-pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: #4ade80;
    animation: ps-pulse 2s infinite;
}
@keyframes ps-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(74,222,128,.7); }
    70%  { box-shadow: 0 0 0 12px rgba(74,222,128,0); }
    100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.ps-hero-title { font-size: 40px; line-height: 1.18; font-weight: 800; margin: 0 0 14px; letter-spacing: -.5px; }
.ps-hero-subtitle { font-size: 16px; line-height: 1.75; color: rgba(255,255,255,.9); margin: 0 0 22px; }
.ps-hero-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: rgba(255,255,255,.86); }
.ps-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.ps-meta-item svg { color: #a7f3d0; }

/* ============ 上传卡 ============ */
.ps-upload-card {
    background: #fff;
    border-radius: 16px;
    padding: 34px 26px;
    text-align: center;
    color: #1e293b;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(15,23,42,.18);
    border: 2px dashed transparent;
    transition: border-color .2s, transform .2s;
}
.ps-upload-card:hover { transform: translateY(-2px); }
.ps-upload-card.dragover { border-color: #2563eb; background: #eff6ff; }
.ps-upload-icon-wrap { color: #2563eb; margin-bottom: 10px; }
.ps-upload-title { font-size: 19px; font-weight: 700; margin: 6px 0 6px; }
.ps-upload-desc { font-size: 13px; color: #64748b; margin-bottom: 18px; }
.ps-upload-btn { border-radius: 999px; padding-left: 22px; padding-right: 22px; }

/* ============ 通用区块 ============ */
.ps-section { padding: 52px 0; }
.ps-bg-soft { background: #f8fafc; }
.ps-section-head { text-align: center; margin-bottom: 32px; }
.ps-section-title { font-size: 28px; font-weight: 800; margin: 0 0 8px; color: #0f172a; }
.ps-section-subtitle { color: #64748b; margin: 0; }

/* ============ 步骤卡 ============ */
.ps-step-card {
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 26px 22px;
    height: 100%;
    transition: box-shadow .2s, transform .2s;
}
.ps-step-card:hover { box-shadow: 0 10px 28px rgba(15,23,42,.08); transform: translateY(-2px); }
.ps-step-card-featured { border-color: #2563eb; box-shadow: 0 8px 22px rgba(37,99,235,.12); }
.ps-step-num {
    position: absolute; top: -14px; left: 22px;
    width: 30px; height: 30px; border-radius: 50%;
    background: #2563eb; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
}
.ps-step-title { font-size: 17px; font-weight: 700; margin: 8px 0 8px; }
.ps-step-desc { color: #64748b; font-size: 14px; margin: 0; }

/* ============ 参数面板 ============ */
.ps-panel { border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 8px 24px rgba(15,23,42,.06); }
.ps-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ps-panel-header-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ps-step-badge {
    width: 24px; height: 24px; border-radius: 50%;
    background: #2563eb; color: #fff; font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center;
}
.ps-field { margin-bottom: 18px; }
.ps-field .form-label { font-weight: 600; font-size: 14px; }
.ps-required { color: #e11d48; }
.form-hint { display: block; margin-top: 6px; font-size: 12px; color: #94a3b8; }
.ps-check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 18px; }
.ps-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.ps-check .form-check-input { margin: 0; }
.ps-tip { font-size: 13px; }

/* ============ 醒目提醒（如「忘记密码」引导） ============ */
.ps-notice {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: 10px; border: 1px solid transparent;
}
.ps-notice-icon { flex: none; line-height: 0; margin-top: 1px; }
.ps-notice-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.ps-notice-text { font-size: 13px; line-height: 1.7; }
.ps-notice-link {
    display: inline-flex; align-items: center; gap: 3px;
    font-weight: 700; text-decoration: underline; text-underline-offset: 2px;
}
.ps-notice-link svg { flex: none; }
.ps-notice-warning {
    background: #fff7ed; border-color: #fdba74; color: #9a3412;
}
.ps-notice-warning .ps-notice-icon { color: #ea580c; }
.ps-notice-warning .ps-notice-link { color: #c2410c; }
.ps-notice-warning .ps-notice-link:hover { color: #9a3412; }
.ps-inline-link { color: #c2410c; text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }
.ps-run-btn { border-radius: 999px; padding-left: 28px; padding-right: 28px; }

/* ===== 底部吸底提交条 =====
   费用预览 + 提交按钮常驻视口底部，长表单也不会把按钮顶出屏幕；
   与去水印页 .pdw-price-dock 同一套观感（pdw 的样式作用在去水印页，互不干扰）。 */
.ps-price-box.ps-price-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    padding: 12px 0;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, .12);
}
.ps-price-dock-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    flex-wrap: wrap;
}
.ps-price-dock .ps-price-left {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
    min-width: 0;
}
.ps-price-dock .ps-price-left strong { font-size: 15px; }
.ps-price-main { display: flex; align-items: baseline; gap: 4px; }
.ps-price-currency { font-size: 18px; font-weight: 600; color: #206bc4; }
.ps-price-value { font-size: 26px; font-weight: 800; color: #206bc4; letter-spacing: -.5px; }
.ps-price-free { font-size: 22px; font-weight: 800; color: #16a34a; }
.ps-price-detail { font-size: 12px; color: #64748b; line-height: 1.5; }
.ps-price-dock .ps-price-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
@media (max-width: 575.98px) {
    .ps-price-box.ps-price-dock { padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); }
    .ps-price-dock-inner { gap: 8px 12px; }
    .ps-price-value { font-size: 22px; }
    .ps-price-free { font-size: 19px; }
    .ps-price-dock .ps-price-right { width: 100%; margin-left: 0; }
    .ps-price-dock .ps-run-btn { flex: 1 1 auto; justify-content: center; }
}

/* ============ 预览 ============ */
.ps-preview { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; }
.ps-preview-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: #334155; }
.ps-preview-img-wrap {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    min-height: 220px; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ps-preview-img-wrap img { max-width: 100%; max-height: 420px; display: block; }
.ps-preview-meta { display: flex; justify-content: space-between; font-size: 13px; color: #64748b; margin-top: 10px; }
.ps-preview-note { font-size: 12px; color: #94a3b8; margin-top: 6px; line-height: 1.6; }
.ps-preview-tag {
    display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
    background: #dbeafe; color: #1d4ed8; font-size: 11px; font-weight: 600;
}
.ps-preview-img-wrap .ps-preview-empty { font-size: 13px; color: #94a3b8; padding: 20px; text-align: center; }
#thumbCanvas { display: block; width: 100%; height: auto; }

/* ============ 水印类型切换 ============ */
.ps-type-tabs { display: flex; gap: 10px; }
.ps-type-tab {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px;
    background: #fff; color: #475569; font-size: 14px; cursor: pointer;
    transition: all .15s ease; user-select: none;
}
.ps-type-tab:hover { border-color: #93c5fd; color: #1d4ed8; }
.ps-type-tab input { position: absolute; opacity: 0; pointer-events: none; }
.ps-type-tab.is-active {
    border-color: #2563eb; background: #eff6ff; color: #1d4ed8; font-weight: 600;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

/* ============ 水印图片选择 ============ */
.ps-img-picker {
    border: 1px dashed #cbd5e1; border-radius: 10px; background: #f8fafc;
    padding: 16px; text-align: center; cursor: pointer; transition: all .15s ease;
}
.ps-img-picker:hover { border-color: #2563eb; background: #eff6ff; }
.ps-img-picker.has-file { border-style: solid; border-color: #86efac; background: #f0fdf4; }
.ps-img-picker-icon { color: #64748b; margin-bottom: 6px; }
.ps-img-picker.has-file .ps-img-picker-icon { color: #16a34a; }
.ps-img-picker-main { font-size: 14px; color: #334155; font-weight: 600; word-break: break-all; }
.ps-img-picker-sub { font-size: 12px; color: #94a3b8; margin-top: 4px; }

/* ============ 结果 ============ */
.ps-result { border-color: #86efac; }
.ps-result-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: #dcfce7; color: #16a34a;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.ps-result-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.ps-result-desc { color: #64748b; margin-bottom: 20px; }
.ps-download-btn { border-radius: 999px; padding-left: 28px; padding-right: 28px; }
.ps-result-tip { font-size: 12px; color: #94a3b8; }

/* ============ FAQ ============ */
.ps-faq-list { max-width: 860px; margin: 0 auto; }
.ps-faq-item { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 0 18px; margin-bottom: 12px; }
.ps-faq-q { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; }
.ps-faq-q::-webkit-details-marker { display: none; }
.ps-faq-a { padding: 0 0 16px; color: #475569; font-size: 14px; line-height: 1.8; }

/* ============ 遮罩 ============ */
.ps-loading {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(15,23,42,.45);
    display: flex; align-items: center; justify-content: center;
}
.ps-loading-modal {
    background: #fff; border-radius: 14px; padding: 30px 40px;
    display: flex; flex-direction: column; align-items: center;
    box-shadow: 0 20px 50px rgba(15,23,42,.25);
}

/* ============ 批量文件列表 ============ */
.ps-filelist {
    border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc;
    padding: 12px 14px; margin-bottom: 22px;
}
.ps-filelist-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; flex-wrap: wrap; margin-bottom: 8px;
}
.ps-filelist-title { font-size: 14px; font-weight: 600; color: #334155; }
.ps-filelist-title b { color: #2563eb; }
.ps-filelist-body {
    list-style: none; margin: 0; padding: 0;
    max-height: 260px; overflow-y: auto;
}
.ps-filelist-body li {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 8px 12px; margin-bottom: 8px;
}
.ps-filelist-body li:last-child { margin-bottom: 0; }
.ps-filelist-no { flex: none; width: 22px; height: 22px; line-height: 22px; text-align: center;
    border-radius: 50%; background: #eff6ff; color: #2563eb; font-size: 12px; font-weight: 700; }
.ps-filelist-name { flex: 1 1 220px; min-width: 0; font-size: 14px; color: #0f172a; word-break: break-all; }
.ps-filelist-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ps-filelist-tags .badge { font-weight: 500; }
.ps-filelist-del {
    flex: none; border: 0; background: none; color: #94a3b8; cursor: pointer;
    font-size: 13px; padding: 2px 4px; line-height: 1;
}
.ps-filelist-del:hover { color: #e11d48; }

/* ============ 批量结果：失败清单 ============ */
.ps-failbox {
    max-width: 640px; margin: 0 auto 20px; text-align: left;
    border: 1px solid #fecaca; background: #fef2f2; border-radius: 12px; padding: 12px 14px;
}
.ps-failbox-title { font-size: 14px; font-weight: 700; color: #b91c1c; margin-bottom: 8px; }
.ps-failbox-item {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 8px 0; border-top: 1px dashed #fecaca;
}
.ps-failbox-item:first-of-type { border-top: 0; }
.ps-failbox-name { flex: 1 1 200px; min-width: 0; font-size: 13px; color: #334155; word-break: break-all; }
.ps-failbox-msg { font-size: 12px; color: #b91c1c; }
.ps-failbox-item .form-control { flex: 0 0 auto; width: 160px; height: 32px; font-size: 13px; }
.ps-failbox-item .btn { height: 32px; line-height: 1; padding: 0 12px; }

/* ============ 响应式 ============ */
@media (max-width: 991.98px) {
    .ps-hero { padding: 36px 0 44px; }
    .ps-hero-title { font-size: 30px; }
    .ps-section { padding: 36px 0; }
    .ps-section-title { font-size: 22px; }
}
