/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background:
        radial-gradient(circle at 18% 8%, rgba(24, 144, 255, 0.10), transparent 34%),
        radial-gradient(circle at 88% 18%, rgba(82, 196, 26, 0.08), transparent 30%),
        linear-gradient(180deg, #f7fbff 0%, #f4f7fb 48%, #eef4fa 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 32px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.contact-card {
    position: fixed;
    top: 20px;
    right: 22px;
    z-index: 50;
    width: 128px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(24, 144, 255, 0.18);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 35, 60, 0.12);
    backdrop-filter: blur(12px);
    text-align: center;
}

.contact-card .contact-title {
    color: #1f1f1f;
    font-size: 0.78rem;
    line-height: 1.35;
    font-weight: 600;
    margin-bottom: 8px;
}

.contact-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.feedback-trigger {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 7px;
    padding: 0 15px;
    color: #fff;
    background: #1677ff;
    border: none;
    border-radius: 21px;
    box-shadow: 0 8px 22px rgba(22, 119, 255, 0.26);
    cursor: pointer;
}

.feedback-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(20, 35, 52, 0.42);
}

.feedback-overlay[hidden] {
    display: none;
}

.feedback-sheet {
    width: min(100%, 430px);
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 18px 52px rgba(15, 35, 60, 0.22);
}

.feedback-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.feedback-heading h2 {
    color: #25364c;
    font-size: 1.05rem;
}

.feedback-heading p {
    margin-top: 4px;
    color: #8491a2;
    font-size: 0.78rem;
}

.feedback-heading button {
    width: 34px;
    height: 34px;
    color: #738094;
    background: transparent;
    border: none;
    cursor: pointer;
}

.feedback-types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 18px 0 12px;
}

.feedback-types button {
    padding: 8px 4px;
    color: #617087;
    background: #f2f5f8;
    border: 1px solid transparent;
    border-radius: 5px;
    cursor: pointer;
}

.feedback-types button.active {
    color: #1677ff;
    background: #edf6ff;
    border-color: #a6cfff;
}

.feedback-sheet textarea {
    width: 100%;
    height: 120px;
    padding: 11px;
    resize: vertical;
    color: #34445a;
    border: 1px solid #ccd7e3;
    border-radius: 6px;
    font-family: inherit;
    outline: none;
}

.feedback-sheet textarea:focus {
    border-color: #1677ff;
}

.feedback-submit {
    width: 100%;
    height: 44px;
    margin-top: 12px;
    color: #fff;
    background: #1677ff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 42px 0 34px;
}

.header.tool-header {
    text-align: left;
    padding: 20px 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1890ff;
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #40a9ff;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.tool-header .logo {
    justify-content: flex-start;
}

.logo i {
    font-size: 2.5rem;
    color: #1677ff;
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #1f1f1f;
}

.subtitle {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
}

.free-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 8px 14px;
    color: #0f7a43;
    background: #ecfff4;
    border: 1px solid #b7ebc8;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
}

.free-badge i {
    color: #18a058;
}

.beta-label {
    margin-top: 6px;
    color: #1677ff;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0;
}

/* 主内容区 */
.main-content {
    flex: 1;
}

/* 工具区块 */
.tool-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.3rem;
    color: #1f1f1f;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #1890ff;
}

/* 工具网格 */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.tool-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid rgba(24, 144, 255, 0.10);
    box-shadow: 0 10px 28px rgba(15, 35, 60, 0.07);
    backdrop-filter: blur(10px);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(24, 144, 255, 0.14);
    border-color: #1890ff;
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tool-icon i {
    transition: color 0.3s;
}

.tool-icon.pdf2word i:first-child { color: #ff4d4f; }
.tool-icon.pdf2word i:last-child { color: #1890ff; }
.tool-icon.word2pdf i:first-child { color: #1890ff; }
.tool-icon.word2pdf i:last-child { color: #ff4d4f; }
.tool-icon.pdf2image i:first-child { color: #ff4d4f; }
.tool-icon.pdf2image i:last-child { color: #52c41a; }
.tool-icon.image2pdf i:first-child { color: #52c41a; }
.tool-icon.image2pdf i:last-child { color: #ff4d4f; }
.tool-icon.merge i { color: #722ed1; }
.tool-icon.split i { color: #fa8c16; }
.tool-icon.extract-pages i { color: #1677ff; }
.tool-icon.compress i { color: #13c2c2; }
.tool-icon.watermark i { color: #2f54eb; }

.tool-card h3 {
    font-size: 1.1rem;
    color: #1f1f1f;
    margin-bottom: 8px;
    font-weight: 600;
}

.tool-card p {
    font-size: 0.85rem;
    color: #999;
}

/* 上传区域 */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    background: rgba(255, 255, 255, 0.94);
    border: 2px dashed #d9d9d9;
    border-radius: 10px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #1890ff;
    background: #f0f7ff;
}

.upload-area.dragover {
    border-color: #1890ff;
    background: #e6f7ff;
    transform: scale(1.01);
}

.upload-icon {
    font-size: 3.5rem;
    color: #bfbfbf;
    margin-bottom: 20px;
}

.upload-area:hover .upload-icon {
    color: #1890ff;
}

.upload-area h3 {
    font-size: 1.3rem;
    color: #262626;
    margin-bottom: 10px;
    font-weight: 500;
}

.upload-area p {
    color: #8c8c8c;
    font-size: 1rem;
}

.browse-link {
    color: #1890ff;
    font-weight: 500;
    text-decoration: none;
}

#fileInput {
    display: none;
}

.supported-formats {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    color: #8c8c8c;
    font-size: 0.9rem;
}

/* 文件列表 */
.file-list-section {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 28px rgba(15, 35, 60, 0.07);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.section-header h3 {
    color: #262626;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.section-header h3 i {
    color: #1890ff;
}

.btn-clear {
    background: #fff1f0;
    color: #ff4d4f;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-clear:hover {
    background: #ff4d4f;
    color: white;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s;
}

.file-item:hover {
    background: #f5f5f5;
    border-color: #d9d9d9;
}

.file-icon {
    font-size: 2rem;
    margin-right: 15px;
    color: #1890ff;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #262626;
    margin-bottom: 4px;
    word-break: break-all;
}

.file-size {
    font-size: 0.85rem;
    color: #8c8c8c;
}

.file-remove {
    background: none;
    border: none;
    color: #bfbfbf;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: color 0.2s;
}

.file-remove:hover {
    color: #ff4d4f;
}

/* 设置区域 */
.split-settings, .compress-settings, .extract-settings, .watermark-settings, .delete-settings {
    background: white;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.split-settings label, .compress-settings label, .extract-settings label, .watermark-settings label, .delete-settings label {
    font-weight: 500;
    color: #262626;
    margin-right: 10px;
}

.split-settings select, .compress-settings select, .extract-settings select,
.split-settings input, .extract-settings input, .watermark-settings input, .delete-settings input {
    padding: 10px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 0.95rem;
    min-width: 200px;
}

.split-settings input, .extract-settings input, .watermark-settings input, .delete-settings input {
    width: 100%;
    margin-top: 10px;
}

.split-settings small, .extract-settings small, .watermark-settings small, .delete-settings small {
    color: #8c8c8c;
    display: block;
    margin-top: 5px;
}

.setting-field {
    margin-top: 12px;
}

.watermark-settings .setting-field:first-child {
    margin-top: 0;
}

.watermark-layout-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.watermark-layout-options label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    margin: 0;
    padding: 8px 10px;
    color: #31405a;
    font-size: 0.92rem;
    border: 1px solid #d9e3f2;
    border-radius: 8px;
    background: #f8fbff;
    cursor: pointer;
}

.watermark-layout-options label:has(input:checked) {
    color: #1e88ff;
    border-color: #1e88ff;
    background: #eef6ff;
    box-shadow: 0 8px 18px rgba(30, 136, 255, 0.12);
}

.watermark-layout-options input {
    width: auto;
    min-width: 0;
    margin: 0;
}

.watermark-settings input[type="range"] {
    width: 100%;
    min-width: 0;
}

.watermark-preview-card {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #e8eef7;
    border-radius: 12px;
    background: #fbfdff;
}

.watermark-preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #1f2d3d;
    font-weight: 700;
}

.watermark-preview-paper {
    position: relative;
    width: min(100%, 360px);
    aspect-ratio: 0.72;
    margin: 0 auto 10px;
    overflow: hidden;
    border: 1px solid #dce6f2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(31, 45, 61, 0.10);
}

.watermark-preview-content {
    position: absolute;
    inset: 28px;
    display: grid;
    gap: 12px;
}

.watermark-preview-content div {
    border-radius: 999px;
    background: #edf2f8;
}

.watermark-preview-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.watermark-preview-item {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 70%;
    color: #45546b;
    font-weight: 800;
    white-space: nowrap;
    transform: translate(-50%, -50%) rotate(-28deg);
}

.watermark-preview-item img {
    max-width: 92px;
    max-height: 52px;
    object-fit: contain;
}

.watermark-preview-card small {
    color: #8c8c8c;
    text-align: center;
}

.compress-settings small {
    color: #8c8c8c;
    display: block;
    margin-top: 10px;
}

.compression-estimate {
    display: none;
    color: #1890ff;
    font-weight: 600;
    margin-left: 12px;
    white-space: nowrap;
}

.compression-estimate.show {
    display: inline-block;
}

/* 操作按钮 */
.action-section {
    text-align: center;
    margin-bottom: 30px;
}

.btn-convert {
    padding: 15px 50px;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.btn-convert:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 144, 255, 0.4);
}

.btn-convert:disabled {
    background: #bfbfbf;
    cursor: not-allowed;
    box-shadow: none;
}

/* 进度条 */
.progress-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-header h3 {
    color: #262626;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.progress-header h3 i {
    color: #1890ff;
}

.progress-text {
    font-weight: 600;
    color: #1890ff;
}

.progress-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1890ff 0%, #096dd9 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* 结果区域 */
.results-section {
    background: #f6ffed;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #b7eb8f;
}

.results-section .section-header h3 i {
    color: #52c41a;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #b7eb8f;
}

.result-item.success {
    border-left: 4px solid #52c41a;
}

.result-item.error {
    border-left: 4px solid #ff4d4f;
    background: #fff1f0;
    border-color: #ffa39e;
}

.result-icon {
    font-size: 1.8rem;
    margin-right: 15px;
}

.result-item.success .result-icon {
    color: #52c41a;
}

.result-item.error .result-icon {
    color: #ff4d4f;
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: 500;
    color: #262626;
    margin-bottom: 4px;
}

.result-status {
    font-size: 0.85rem;
}

.result-item.success .result-status {
    color: #52c41a;
}

.result-item.error .result-status {
    color: #ff4d4f;
}

.btn-download {
    background: #1890ff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-download:hover {
    background: #40a9ff;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 0;
    color: #8c8c8c;
}

.footer p {
    margin-bottom: 5px;
}

.footer-note {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #262626;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast i {
    color: #52c41a;
}

.toast.error i {
    color: #ff4d4f;
}

/* 三大入口样式 */
.tool-grid.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.home-tool-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-card.main-entry {
    position: relative;
    padding: 40px 30px;
    text-align: center;
}

.tool-card.main-entry .tool-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.tool-card.main-entry .tool-icon.primary {
    background: linear-gradient(135deg, #1890ff, #36cfc9);
    color: white;
}

.tool-card.main-entry .tool-icon.secondary {
    background: linear-gradient(135deg, #722ed1, #eb2f96);
    color: white;
}

.tool-card.main-entry .tool-icon.tertiary {
    background: linear-gradient(135deg, #fa8c16, #fadb14);
    color: white;
}

.tool-card.main-entry .tool-icon.quaternary {
    background: linear-gradient(135deg, #16a085, #2ecc71);
    color: white;
}

.tool-card.main-entry h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.tool-card.main-entry p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.entry-badge {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.mini-badge {
    padding: 3px 9px;
    color: #6b7280;
    background: #f5f7fa;
    border: 1px solid #e1e7ef;
    font-size: 0.68rem;
    font-weight: 600;
}

.minor-tools {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.minor-tools a {
    display: grid;
    grid-template-columns: 22px auto;
    grid-template-areas:
        "icon title"
        "icon badge";
    column-gap: 9px;
    row-gap: 2px;
    align-items: center;
    color: #38465c;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #dbe7f6;
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 0.96rem;
    font-weight: 600;
    box-shadow: 0 8px 22px rgba(31, 99, 178, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.minor-tools a:hover {
    border-color: #9cc8ff;
    box-shadow: 0 12px 26px rgba(31, 99, 178, 0.12);
    transform: translateY(-1px);
}

.minor-tools i {
    grid-area: icon;
    color: #5b21b6;
    font-size: 1.05rem;
}

.minor-tools span {
    grid-area: title;
}

.minor-tools em {
    grid-area: badge;
    display: block;
    font-style: normal;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 500;
}

.utility-container {
    max-width: 920px;
}

.utility-card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(15, 35, 60, 0.08);
    margin-bottom: 24px;
}

.simple-upload {
    border: 2px dashed #c7d7ea;
    border-radius: 8px;
    padding: 32px 20px;
    text-align: center;
    background: #f8fbff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.simple-upload.dragover {
    border-color: #1890ff;
    background: #eef7ff;
}

.simple-upload > i {
    color: #1890ff;
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.simple-upload h2 {
    color: #1f2f46;
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.simple-upload p {
    color: #718096;
    margin-bottom: 18px;
}

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

.btn-secondary {
    border: 1px solid #bdd0e8;
    border-radius: 8px;
    background: white;
    color: #2b4a6f;
    padding: 11px 18px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.selected-file {
    min-height: 22px;
    margin-top: 14px;
    color: #1890ff;
    font-weight: 600;
}

.utility-settings {
    margin: 22px 0;
    display: grid;
    gap: 18px;
}

.setting-row label {
    display: block;
    color: #1f2f46;
    font-weight: 700;
    margin-bottom: 8px;
}

.setting-row input,
.setting-row select {
    width: 100%;
    border: 1px solid #d5e0ee;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 1rem;
    background: white;
}

.setting-row small {
    display: block;
    color: #8a97a8;
    margin-top: 6px;
}

.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-unit input {
    flex: 1;
}

.input-with-unit span {
    color: #718096;
    white-space: nowrap;
}

.full-width {
    width: 100%;
    justify-content: center;
}

.utility-result {
    margin-top: 18px;
}

.signature-live-preview {
    margin: 18px 0;
}

.signature-live-preview small {
    display: block;
    color: #718096;
    font-size: 0.88rem;
    line-height: 1.7;
    text-align: center;
}

.signature-eraser-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    color: #276749;
    font-size: 0.9rem;
    font-weight: 700;
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
}

.signature-eraser-hint i {
    color: #2f855a;
}

.checkerboard {
    background-color: #f4f7fb;
    background-image:
        linear-gradient(45deg, #dfe6ef 25%, transparent 25%),
        linear-gradient(-45deg, #dfe6ef 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #dfe6ef 75%),
        linear-gradient(-45deg, transparent 75%, #dfe6ef 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

.signature-preview {
    position: relative;
    border-radius: 8px;
    padding: 22px;
    margin-bottom: 14px;
    text-align: center;
    overflow: hidden;
}

.signature-preview img {
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
}

.signature-preview canvas {
    display: block;
    width: 100%;
    max-width: 520px;
    max-height: 260px;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.signature-live-preview .signature-preview canvas {
    max-width: 680px;
    max-height: none;
    touch-action: none;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='38' height='38' viewBox='0 0 38 38'%3E%3Ccircle cx='19' cy='19' r='15' fill='rgba(255,77,79,0.16)' stroke='%23ff4d4f' stroke-width='3'/%3E%3Ccircle cx='19' cy='19' r='2.5' fill='%23ff4d4f'/%3E%3C/svg%3E") 19 19, crosshair;
}

.signature-eraser-cursor {
    position: fixed;
    z-index: 9999;
    display: none;
    border: 3px solid #ff4d4f;
    border-radius: 999px;
    background: rgba(255, 77, 79, 0.12);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.98), 0 8px 22px rgba(255, 77, 79, 0.28);
    pointer-events: none;
}

.signature-eraser-cursor.visible {
    display: block !important;
}

.signature-editor .signature-preview canvas {
    max-height: 360px;
    touch-action: none;
    cursor: crosshair;
}

.signature-editor-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #1f2d3d;
    font-weight: 800;
}

.signature-editor-title i {
    color: #1890ff;
}

.signature-editor-tools {
    display: grid;
    grid-template-columns: auto minmax(120px, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    margin: 12px 0 6px;
}

.signature-editor-tools label {
    color: #2d3748;
    font-weight: 700;
    white-space: nowrap;
}

.signature-editor-tools input[type="range"] {
    width: 100%;
}

.btn-secondary.compact {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 0.9rem;
}

.signature-editor-tip {
    display: block;
    color: #718096;
    font-size: 0.88rem;
    line-height: 1.7;
    text-align: center;
}

.seo-section {
    margin-top: 26px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(24, 144, 255, 0.10);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 35, 60, 0.06);
}

.seo-section h2 {
    margin-bottom: 10px;
    color: #1f2d3d;
    font-size: 1.15rem;
}

.seo-section > p {
    max-width: 920px;
    color: #637083;
    font-size: 0.9rem;
    line-height: 1.8;
}

.seo-faq-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.seo-faq-grid article {
    padding: 14px;
    background: #f8fbff;
    border: 1px solid #e6edf5;
    border-radius: 8px;
}

.seo-faq-grid h3 {
    margin-bottom: 7px;
    color: #21324a;
    font-size: 0.9rem;
}

.seo-faq-grid p {
    color: #68778c;
    font-size: 0.82rem;
    line-height: 1.7;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 96px 15px 18px;
    }

    .contact-card {
        top: 12px;
        right: 12px;
        width: 86px;
        padding: 7px;
        border-radius: 8px;
    }

    .contact-card .contact-title {
        font-size: 0.66rem;
        margin-bottom: 5px;
    }

    .feedback-trigger {
        right: 14px;
        bottom: max(14px, env(safe-area-inset-bottom));
        min-width: 44px;
        height: 44px;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
    }

    .feedback-trigger span {
        display: none;
    }

    .feedback-overlay {
        place-items: end center;
        padding: 0;
    }

    .feedback-sheet {
        width: 100%;
        padding: 20px 16px max(20px, env(safe-area-inset-bottom));
        border-radius: 8px 8px 0 0;
    }
    
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .home-tool-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .tool-grid.three-cols {
        grid-template-columns: 1fr;
    }
    
    .tool-card {
        padding: 20px 15px;
    }

    .seo-section {
        padding: 18px;
    }

    .seo-faq-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-icon {
        font-size: 2rem;
    }
    
    .logo h1 {
        font-size: 1.6rem;
    }
    
    .upload-area {
        padding: 40px 25px;
    }

    .utility-card {
        padding: 18px;
    }

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

    .watermark-preview-paper {
        width: min(100%, 300px);
    }

    .signature-editor-tools {
        grid-template-columns: 1fr;
    }

    .signature-editor-tools label {
        white-space: normal;
    }

    .two-cols {
        grid-template-columns: 1fr;
    }
}

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

    .header {
        padding-top: 16px;
    }

    .contact-card {
        width: 78px;
    }
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-item, .result-item {
    animation: fadeIn 0.3s ease;
}
