/* Tool page styles — extracted from the design mockup. */

:root {
    --tp-bg: #F8F9FC;
    --tp-surface: #FFFFFF;
    --tp-text: #1A1D26;
    --tp-text-secondary: #5B6178;
    --tp-text-muted: #6E7490;
    --tp-text-light: #9198AE;
    --tp-accent: #3B5BDB;
    --tp-accent-dark: #2E4BB0;
    --tp-accent-light: #EBF0FF;
    --tp-accent-hover: #3350C4;
    --tp-border: #E2E5F0;
    --tp-border-light: #ECEEF5;
    --tp-radius: 12px;
    --tp-radius-sm: 8px;
}

.breadcrumb-nav {
    max-width: 1400px; margin: 0 auto; padding: 16px 32px 0;
    font-size: 13px; color: var(--tp-text-light);
}
.breadcrumb-nav a { color: var(--tp-text-secondary); text-decoration: none; }
.breadcrumb-nav a:hover { color: var(--tp-accent); text-decoration: underline; }
.breadcrumb-nav .sep { margin: 0 6px; color: var(--tp-text-light); }

.page-layout {
    max-width: 1400px; margin: 0 auto; padding: 24px 32px 80px;
    display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start;
}
.page-main { min-width: 0; }

.tool-hero {
    background: var(--tp-surface);
    border: 1.5px solid var(--tp-border);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 48px;
    box-shadow: 0 4px 20px rgba(59,91,219,0.10);
}
.tool-hero-header { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.tool-hero-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0;
}
.tool-hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; color: var(--tp-text); }
.tool-hero-subtitle { font-size: 15px; color: var(--tp-text-secondary); margin-bottom: 32px; margin-top: 4px; }
.tool-hero-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.action-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
    font-family: inherit; font-size: 13px; font-weight: 600;
    border: 1.5px solid var(--tp-border); border-radius: var(--tp-radius-sm);
    background: transparent; color: var(--tp-text-secondary); cursor: pointer; transition: all 0.2s;
}
.action-btn:hover { border-color: var(--tp-accent); color: var(--tp-accent); background: var(--tp-accent-light); }
.action-btn svg { width: 16px; height: 16px; }

.upload-zone {
    border: 2.5px dashed var(--tp-border);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    background: var(--tp-bg);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--tp-accent);
    background: var(--tp-accent-light);
}
.upload-zone-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    background: var(--tp-accent-light); border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
}
.upload-zone-icon svg { width: 28px; height: 28px; color: var(--tp-accent); }
.upload-zone h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--tp-text); }
.upload-zone p { font-size: 14px; color: var(--tp-text-secondary); margin-bottom: 16px; }
.upload-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--tp-accent); color: #fff; border: none;
    padding: 12px 28px; border-radius: 50px;
    font-family: inherit; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: all 0.2s;
}
.upload-btn:hover { background: var(--tp-accent-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(59,91,219,0.3); }
.upload-limits { font-size: 12px; color: var(--tp-text-light); margin-top: 12px; }

.page-sidebar { position: sticky; top: 88px; }
.sidebar-card {
    background: var(--tp-surface); border: 1.5px solid var(--tp-border);
    border-radius: var(--tp-radius); padding: 24px; margin-bottom: 20px;
}
.sidebar-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; color: var(--tp-text); }
.sidebar-toc a {
    display: block; padding: 7px 0; font-size: 13px; color: var(--tp-text-secondary);
    text-decoration: none; border-bottom: 1px solid var(--tp-border-light); transition: color 0.2s;
}
.sidebar-toc a:last-child { border-bottom: none; }
.sidebar-toc a:hover { color: var(--tp-accent); }
.related-list a {
    display: flex; align-items: center; gap: 10px; padding: 10px 0;
    font-size: 14px; color: var(--tp-text); text-decoration: none;
    border-bottom: 1px solid var(--tp-border-light); transition: color 0.2s; font-weight: 600;
}
.related-list a:last-child { border-bottom: none; }
.related-list a:hover { color: var(--tp-accent); }
.related-icon {
    width: 34px; height: 34px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}

.article h2 {
    font-size: 24px; font-weight: 800; letter-spacing: -0.3px;
    color: var(--tp-text); margin-bottom: 16px; margin-top: 48px;
    padding-top: 32px; border-top: 1.5px solid var(--tp-border-light);
}
.article h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.article h3 { font-size: 18px; font-weight: 700; color: var(--tp-text); margin-bottom: 10px; margin-top: 28px; }
.article p { font-size: 16px; line-height: 1.75; color: var(--tp-text-secondary); margin-bottom: 16px; }
.article ul, .article ol { margin-bottom: 16px; padding-left: 24px; }
.article li { font-size: 16px; line-height: 1.75; color: var(--tp-text-secondary); margin-bottom: 6px; }
.article strong { color: var(--tp-text); font-weight: 700; }
.info-box {
    background: var(--tp-accent-light); border-left: 4px solid var(--tp-accent);
    border-radius: 0 var(--tp-radius-sm) var(--tp-radius-sm) 0; padding: 18px 22px; margin: 24px 0;
}
.info-box p { font-size: 14px; color: var(--tp-accent-dark); margin-bottom: 0; }
.steps-box {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0;
}
.step-item {
    background: var(--tp-surface); border: 1.5px solid var(--tp-border); border-radius: var(--tp-radius);
    padding: 24px 20px; text-align: center;
}
.step-num {
    width: 36px; height: 36px; background: var(--tp-accent); color: #fff;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 800; margin-bottom: 12px;
}
.step-item h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--tp-text); }
.step-item p { font-size: 13px; color: var(--tp-text-secondary); margin: 0; line-height: 1.5; }

.faq-section { margin-bottom: 48px; }
.faq-section h2 {
    font-size: 24px; font-weight: 800; margin-bottom: 20px;
    padding-top: 32px; border-top: 1.5px solid var(--tp-border-light); color: var(--tp-text);
}
.faq-item {
    background: var(--tp-surface); border: 1.5px solid var(--tp-border);
    border-radius: var(--tp-radius); margin-bottom: 12px; overflow: hidden;
}
.faq-question {
    width: 100%; padding: 18px 22px; font-family: inherit;
    font-size: 15px; font-weight: 700; color: var(--tp-text); background: transparent;
    border: none; cursor: pointer; text-align: left;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    transition: background 0.2s;
}
.faq-question:hover { background: var(--tp-bg); }
.faq-arrow { flex-shrink: 0; width: 20px; height: 20px; color: var(--tp-text-light); transition: transform 0.2s; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer-inner { padding: 0 22px 18px; font-size: 15px; line-height: 1.7; color: var(--tp-text-secondary); }

#fileList { margin-top: 24px; }
#fileList .fl-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--tp-text); }
#fileItems { display: flex; flex-direction: column; gap: 8px; }
.fl-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; background: var(--tp-bg);
    border: 1.5px solid var(--tp-border-light); border-radius: var(--tp-radius-sm);
}
.fl-item .fl-name { flex: 1; min-width: 0; }
.fl-item .fl-name b { font-size: 14px; font-weight: 600; color: var(--tp-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.fl-item .fl-name span { font-size: 12px; color: var(--tp-text-light); }
.fl-item .fl-remove { background: none; border: none; color: var(--tp-text-light); cursor: pointer; font-size: 18px; padding: 4px; }
#mergeBtn, .tool-action-btn {
    width: 100%; padding: 14px; margin-top: 16px;
    background: var(--tp-accent); color: #fff; border: none;
    border-radius: var(--tp-radius-sm);
    font-family: inherit; font-size: 16px; font-weight: 700;
    cursor: pointer; transition: all 0.2s;
}
#mergeBtn:hover, .tool-action-btn:hover { background: var(--tp-accent-hover); transform: translateY(-1px); }

@media (max-width: 1024px) {
    .page-layout { grid-template-columns: 1fr; }
    .page-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .sidebar-card { margin-bottom: 0; }
    .steps-box { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .breadcrumb-nav { padding: 12px 20px 0; }
    .page-layout { padding: 20px 20px 60px; gap: 32px; }
    .tool-hero { padding: 24px 18px; }
    .tool-hero h1 { font-size: 22px; }
    .tool-hero-header { flex-wrap: wrap; }
    .tool-hero-actions { width: 100%; margin-left: 0; margin-top: 12px; }
    .action-btn { flex: 1; justify-content: center; }
    .page-sidebar { grid-template-columns: 1fr; }
}
