/* 多功能工具站 —— 全站共享样式（暗色主题，桌面 / 手机自适应）
   设计沿用 video-cut 的配色与卡片/按钮体系，供首页与各工具页共用。 */

:root {
    --bg: #0b0d12;
    --bg2: #12151d;
    --panel: #151924;
    --panel2: #1a1f2d;
    --line: #262c3b;
    --line2: #333b4f;
    --text: #e8ebf2;
    --dim: #8b93a7;
    --accent: #f59e0b;
    --accent2: #fbbf24;
    --accent-dark: #b45309;
    --ok: #34d399;
    --warn: #fbbf24;
    --err: #f87171;
    --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
    background:
        radial-gradient(1200px 500px at 50% -100px, #1a2030 0%, transparent 60%),
        var(--bg);
    color: var(--text);
    font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    padding: 0 16px 40px;
}

.wrap {
    max-width: 1020px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---------------- 全站置顶导航栏 ---------------- */
.sitenav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11, 13, 18, .88);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
    margin: 0 -16px;
}
.sitenav-in {
    max-width: 1020px; margin: 0 auto;
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
}
.sitenav .nav-brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: inherit; margin-right: 8px; min-width: 0;
}
.sitenav .nav-logo {
    width: 34px; height: 34px; flex: none;
    display: grid; place-items: center; font-size: 17px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    box-shadow: 0 4px 14px rgba(245, 158, 11, .35);
}
.sitenav .nav-name { font-size: 16px; font-weight: 700; white-space: nowrap; letter-spacing: .3px; }
.sitenav .nav-links { display: flex; align-items: center; gap: 4px; margin-left: 12px; flex-wrap: wrap; }
.sitenav .nav-links a {
    color: var(--dim); text-decoration: none;
    font-size: 14px; padding: 7px 12px; border-radius: 8px;
    white-space: nowrap; transition: color .15s, background .15s;
}
.sitenav .nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.sitenav .nav-links a.active { color: var(--accent2); }
@media (max-width: 560px) {
    .sitenav-in { padding: 8px 12px; gap: 4px; flex-wrap: wrap; }
    .sitenav .nav-name { font-size: 15px; }
    .sitenav .nav-links a { padding: 6px 9px; font-size: 13px; }
}

/* ---------------- 顶栏 ---------------- */
.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 2px 6px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: inherit; }
.logo {
    width: 42px; height: 42px;
    flex: none;
    display: grid; place-items: center;
    font-size: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    box-shadow: 0 4px 18px rgba(245, 158, 11, .35);
}
.brand-text h1 { font-size: 19px; letter-spacing: .5px; white-space: nowrap; }
.brand-text p { font-size: 12.5px; color: var(--dim); white-space: nowrap; }
.topbar .grow { flex: 1; }

/* ---------------- 通用卡片 / 按钮 ---------------- */
.card {
    background: linear-gradient(180deg, var(--panel2) 0%, var(--panel) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.btn {
    appearance: none;
    border: 1px solid var(--line2);
    background: #1d2331;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    padding: 9px 16px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, transform .06s, box-shadow .15s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn:hover:not(:disabled) { background: #252c3e; border-color: #3d4660; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary {
    background: linear-gradient(135deg, var(--accent2) 0%, var(--accent) 55%, #e08b06 100%);
    border-color: var(--accent-dark);
    color: #241503;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(245, 158, 11, .28);
}
.btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #fcd34d 0%, var(--accent2) 55%, var(--accent) 100%);
    box-shadow: 0 6px 22px rgba(245, 158, 11, .4);
}
.btn.big { padding: 12px 26px; font-size: 15.5px; border-radius: 12px; }
.btn.danger { border-color: #7f1d1d; background: #2a1416; color: #fca5a5; }
.btn.danger:hover:not(:disabled) { background: #3b191c; border-color: #b91c1c; }
.grow { flex: 1; }

/* ---------------- 首页：工具网格 ---------------- */
.hero {
    text-align: center;
    padding: 26px 20px 6px;
}
.hero h1 { font-size: 26px; margin-bottom: 10px; }
.hero p { color: var(--dim); font-size: 14.5px; max-width: 640px; margin: 0 auto; line-height: 1.8; }

.cat-title {
    font-size: 17px;
    margin: 8px 2px 2px;
    padding-left: 11px;
    border-left: 4px solid var(--accent);
}
.tool-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.tool-grid a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(180deg, var(--panel2) 0%, var(--panel) 100%);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    color: var(--text);
    text-decoration: none;
    transition: border-color .15s, transform .08s, box-shadow .15s;
}
.tool-grid a:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.tool-ico {
    width: 40px; height: 40px;
    flex: none;
    display: grid; place-items: center;
    font-size: 21px;
    border-radius: 10px;
    background: #131722;
    border: 1px solid var(--line);
}
.tool-meta b { display: block; font-size: 15px; margin-bottom: 3px; }
.tool-meta span { font-size: 12.5px; color: var(--dim); line-height: 1.55; }

/* ---------------- 工具页：通用工作区 ---------------- */
.tool-head { padding: 22px 22px 6px; }
.tool-head h2 { font-size: 21px; margin-bottom: 8px; }
.tool-head p { color: var(--dim); font-size: 14px; line-height: 1.75; }

.pane { padding: 18px 20px; }
.pane + .pane { border-top: 1px solid var(--line); }

.dropzone {
    border: 2px dashed var(--line2);
    border-radius: 12px;
    padding: 44px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    background: #0d1017;
}
.dropzone:hover, .dropzone.dragging {
    border-color: var(--accent);
    background: #141926;
}
.dz-icon { font-size: 40px; margin-bottom: 10px; }
.dz-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.dz-sub { font-size: 12.5px; color: var(--dim); line-height: 1.6; }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row + .row { margin-top: 12px; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--dim); }
label.field.inline { flex-direction: row; align-items: center; gap: 8px; }

input[type="text"], input[type="number"], textarea, select {
    background: #0d1017;
    border: 1px solid var(--line2);
    border-radius: 10px;
    color: var(--text);
    font: inherit;
    padding: 10px 12px;
    width: 100%;
    outline: none;
    transition: border-color .15s;
}
input[type="text"]:focus, input[type="number"]:focus, textarea:focus, select:focus {
    border-color: var(--accent);
}
textarea {
    min-height: 150px;
    resize: vertical;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13.5px;
    line-height: 1.6;
}
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="color"] {
    width: 52px; height: 40px; padding: 2px;
    background: #0d1017; border: 1px solid var(--line2);
    border-radius: 10px; cursor: pointer;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }

.hint { font-size: 12.5px; color: var(--dim); }
.val { color: var(--accent2); font-variant-numeric: tabular-nums; font-weight: 600; }

.status {
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #131722;
    border: 1px solid var(--line);
}
.status.ok { color: var(--ok); border-color: rgba(52,211,153,.35); }
.status.warn { color: var(--warn); border-color: rgba(251,191,36,.35); }
.status.err { color: var(--err); border-color: rgba(248,113,113,.4); }

/* 结果文件 / 图片列表 */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.thumb {
    background: #0d1017;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    font-size: 12px;
    color: var(--dim);
}
.thumb img { width: 100%; border-radius: 6px; background: #000; display: block; margin-bottom: 8px; }
.thumb .fn { color: var(--text); word-break: break-all; margin-bottom: 4px; }

/* 代码/输出框 */
.output {
    background: #0d1017;
    border: 1px solid var(--line2);
    border-radius: 10px;
    padding: 12px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    min-height: 60px;
    max-height: 420px;
    overflow: auto;
}

/* ---------------- SEO / FAQ / 教程 区块 ---------------- */
.seo section { padding: 22px; }
.seo section + section { border-top: 1px solid var(--line); }
.seo h2 { font-size: 18px; margin-bottom: 14px; padding-left: 11px; border-left: 4px solid var(--accent); }
.seo h3 { font-size: 15px; margin: 16px 0 6px; }
.seo p { color: var(--dim); font-size: 14px; line-height: 1.85; margin: 8px 0; }
.steps { list-style: none; counter-reset: s; display: flex; gap: 14px; flex-wrap: wrap; }
.steps li {
    flex: 1; min-width: 180px;
    background: #131722; border: 1px solid var(--line);
    border-radius: 12px; padding: 14px 16px;
    font-size: 13px; color: var(--dim); line-height: 1.7;
    counter-increment: s;
}
.steps li b { display: block; color: var(--text); font-size: 14.5px; margin-bottom: 6px; }
.steps li b::before {
    content: counter(s);
    display: inline-grid; place-items: center;
    width: 22px; height: 22px; margin-right: 8px;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    color: #241503; font-weight: 800; font-size: 12px; border-radius: 7px;
    vertical-align: middle;
}
.features { list-style: none; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.features li {
    background: #131722; border: 1px solid var(--line);
    border-radius: 12px; padding: 13px 15px;
    font-size: 12.5px; color: var(--dim); line-height: 1.65;
}
.features li b { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }

.faq details { border-bottom: 1px dashed var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: none; }
.faq summary {
    cursor: pointer; font-size: 14.5px; font-weight: 600;
    padding: 9px 4px; list-style-position: inside; user-select: none;
}
.faq summary:hover { color: var(--accent2); }
.faq p { font-size: 13.5px; color: var(--dim); padding: 2px 4px 12px 22px; }

/* 相关工具推荐 */
.rel-tools { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rel-tools a {
    display: block; background: #131722; border: 1px solid var(--line);
    border-radius: 10px; padding: 11px 14px; color: var(--text);
    text-decoration: none; font-size: 13.5px;
    transition: border-color .15s, background .15s;
}
.rel-tools a:hover { border-color: var(--accent); background: #171c2a; }

.site-foot {
    text-align: center;
    font-size: 12.5px;
    color: #5b6377;
    padding: 22px 0 6px;
}
.site-foot a { color: #8b93a7; }

/* ---------------- 老浏览器拦截 ---------------- */
#oldBrowser {
    position: fixed; inset: 0; z-index: 999;
    background: rgba(8, 10, 14, .96);
    align-items: center; justify-content: center; padding: 24px;
}
.ob-box {
    max-width: 520px; text-align: center;
    background: #151924; border: 1px solid #333b4f;
    border-radius: 16px; padding: 40px 32px;
}
.ob-icon { font-size: 46px; margin-bottom: 14px; }
.ob-box h2 { font-size: 19px; margin-bottom: 12px; }
.ob-box p { font-size: 14px; color: #8b93a7; line-height: 1.9; }
.ob-box b { color: #f59e0b; }

/* ---------------- 手机端适配 ---------------- */
@media (max-width: 760px) {
    body { padding: 0 10px 32px; }
    .wrap { gap: 10px; }
    .topbar { padding: 12px 0 2px; gap: 10px; }
    .brand-text h1 { font-size: 17px; }
    .brand-text p { font-size: 11px; }
    .logo { width: 36px; height: 36px; font-size: 17px; border-radius: 10px; }
    .hero h1 { font-size: 21px; }
    .tool-grid { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr; }
    .steps { flex-direction: column; }
    .rel-tools { grid-template-columns: 1fr; }
    .seo section { padding: 16px; }
    .pane { padding: 14px; }
    .tool-head { padding: 16px 14px 4px; }
    .guides { grid-template-columns: 1fr; }
    .art-body { padding: 18px 16px; }
    .art-body h1 { font-size: 19px; }
    .art-rel { padding: 16px; }
}

/* ---------------- 教程列表（首页 + 文章页共用） ---------------- */
.guides { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.guides a {
    display: block;
    background: #131722;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 14px;
    color: var(--text);
    text-decoration: none;
    font-size: 13.5px;
    transition: border-color .15s, background .15s;
}
.guides a:hover { border-color: var(--accent); background: #171c2a; }
.guides a::before { content: "📖 "; }

/* ---------------- 教程文章页 ---------------- */
.crumb { font-size: 12.5px; color: var(--dim); padding: 0 2px; }
.crumb a { color: var(--dim); }
.crumb a:hover { color: var(--accent2); }
.art-body { padding: 26px 28px 22px; }
.art-body h1 { font-size: 23px; line-height: 1.45; margin-bottom: 12px; }
.art-lead {
    color: #b6bdcd;
    font-size: 14.5px;
    line-height: 1.8;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    margin: 14px 0 6px;
}
.art-body h2 {
    font-size: 17.5px;
    margin: 26px 0 10px;
    padding-left: 11px;
    border-left: 4px solid var(--accent);
}
.art-body p { font-size: 14px; color: #b6bdcd; line-height: 1.85; margin: 8px 0; }
.art-body p b, .art-steps li b { color: var(--text); }
.art-body a { color: var(--accent2); }
.art-steps { list-style: none; counter-reset: s; margin: 12px 0 4px; }
.art-steps li {
    position: relative;
    padding: 11px 0 11px 42px;
    font-size: 14px;
    color: #b6bdcd;
    line-height: 1.8;
    border-bottom: 1px dashed var(--line);
    counter-increment: s;
}
.art-steps li:last-child { border-bottom: none; }
.art-steps li::before {
    content: counter(s);
    position: absolute;
    left: 2px; top: 12px;
    width: 27px; height: 27px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    color: #241503;
    font-weight: 800;
    font-size: 13.5px;
    border-radius: 8px;
}
.cta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 24px 0 6px;
    padding: 16px;
    background: rgba(245, 158, 11, .07);
    border: 1px dashed rgba(245, 158, 11, .4);
    border-radius: 12px;
}
.cta .note { color: var(--dim); font-size: 12.5px; }
.art-rel { padding: 20px 22px; }
.art-rel h2 {
    font-size: 16px;
    margin-bottom: 12px;
    padding-left: 11px;
    border-left: 4px solid var(--accent);
}
