* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f2f4f7;
    min-height: 100vh;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    background: rgba(102, 126, 234, 0.1);
}

.github-link:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.github-link svg {
    fill: currentColor;
}

.nav-tabs {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-tabs a {
    color: #666;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    position: relative;
}

.nav-tabs a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateY(-2px);
}

.nav-tabs a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

main {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tool-section {
    margin-bottom: 24px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.tool-section h2 {
    color: #333;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.tool-section p {
    color: #666;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.7;
}

.input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    color: #444;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
}

.input-group textarea,
.input-group input[type="text"],
.input-group input[type="password"],
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    resize: vertical;
    background: white;
}

.input-group textarea {
    min-height: 100px;
}

.input-group textarea:focus,
.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

button:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

button.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

button.primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

button.secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

button.secondary:hover {
    background: linear-gradient(135deg, #839496 0%, #6c7a7b 100%);
}

button:disabled,
button:disabled:hover {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

button.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

button.success:hover {
    background: linear-gradient(135deg, #0f8579 0%, #2fd469 100%);
}

.output-box {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    min-height: 100px;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #1f2937;
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.04);
}

.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.7;
    border-left: 4px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.alert-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #1565C0;
    border-left-color: #667eea;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
    color: #F57F17;
    border-left-color: #FFC107;
}

.alert-success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(56, 142, 60, 0.1) 100%);
    color: #2E7D32;
    border-left-color: #4CAF50;
}

.alert-error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1) 0%, rgba(198, 40, 40, 0.1) 100%);
    color: #C62828;
    border-left-color: #F44336;
}

footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 24px auto 0;
    max-width: 1200px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

footer p {
    color: #666;
    margin: 6px 0;
    font-size: 14px;
}

footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* JSON格式化页面特定样式 */
.input-section,
.output-section {
    margin-bottom: 32px;
}

.input-section h2,
.output-section h2 {
    color: #333;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

#json-input {
    width: 100%;
    min-height: 300px;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    background: white;
    transition: all 0.3s ease;
}

#json-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

pre {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 16px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

pre code {
    color: #24292e;
    font-family: 'Courier New', Monaco, Consolas, monospace;
    font-size: 14px;
    line-height: 1.6;
}

/* 代码对比页面特定样式 */
.diff-controls {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.control-group label {
    margin-bottom: 0;
    color: #555;
    font-weight: 400;
    white-space: nowrap;
    font-size: 14px;
}

.control-group select {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 140px;
    transition: all 0.3s ease;
}

.control-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.control-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.diff-stats {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-label {
    color: #666;
    font-weight: 400;
    font-size: 14px;
}

.stat-value {
    font-weight: 600;
    font-size: 16px;
    padding: 2px 8px;
    border-radius: 3px;
}

.stat-value.added {
    color: #2E7D32;
    background: #E8F5E9;
}

.stat-value.removed {
    color: #C62828;
    background: #FFEBEE;
}

.stat-value.changed {
    color: #F57F17;
    background: #FFF8E1;
}

.stat-value.unchanged {
    color: #616161;
    background: #F5F5F5;
}

.diff-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.diff-panel {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.diff-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.panel-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
}

.panel-header button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-left: 8px;
    backdrop-filter: blur(10px);
}

.panel-header button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.upload-btn {
    position: relative;
    overflow: hidden;
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.panel-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.code-input {
    width: 100%;
    height: 100%;
    min-height: 500px;
    padding: 16px;
    border: none;
    resize: none;
    font-family: 'Courier New', Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    background: #ffffff;
    color: #1d2939;
    transition: background 0.3s ease;
}

.code-input:focus {
    outline: none;
    background: #f8fafc;
}

.diff-viewer {
    display: none;
    height: 100%;
    overflow: auto;
    background: #ffffff;
    font-family: 'Courier New', Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
}

.diff-viewer pre {
    margin: 0;
    padding: 0;
    background: transparent;
}

.diff-viewer code {
    background: transparent;
    padding: 0;
}

.diff-line {
    display: flex;
    padding: 4px 16px;
    min-height: 24px;
    align-items: center;
    border-left: 4px solid transparent;
    transition: background 0.2s ease;
}

.diff-line.diff-empty {
    background: #f1f5f9;
}

.diff-line.diff-equal {
    background: #ffffff;
    border-left-color: transparent;
}

.diff-line.diff-added {
    background: rgba(76, 175, 80, 0.15);
    border-left-color: #4CAF50;
}

.diff-line.diff-removed {
    background: rgba(244, 67, 54, 0.15);
    border-left-color: #F44336;
}

.diff-line.diff-changed {
    background: rgba(255, 193, 7, 0.15);
    border-left-color: #FFC107;
}

.line-number {
    display: inline-block;
    min-width: 45px;
    text-align: right;
    padding-right: 12px;
    color: #6c757d;
    user-select: none;
    font-size: 11px;
}

.line-content {
    flex: 1;
    white-space: pre;
    word-break: break-all;
    color: #abb2bf;
}

.diff-viewer .hljs {
    background: transparent;
    padding: 0;
}

@media (max-width: 768px) {
    body {
        padding: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .container {
        padding: 12px;
    }

    header {
        margin-left: 12px;
        margin-right: 12px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 16px 20px;
    }

    header h1 {
        font-size: 20px;
    }

    .nav-tabs {
        justify-content: center;
        padding: 8px;
    }

    main {
        padding: 20px;
    }

    .button-group {
        flex-direction: column;
        gap: 10px;
    }

    button {
        width: 100%;
        padding: 14px 24px;
    }

    .diff-container {
        grid-template-columns: 1fr;
    }

    .diff-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }

    .control-group {
        width: 100%;
        justify-content: space-between;
    }

    .control-group select {
        flex: 1;
    }

    .diff-stats {
        flex-direction: column;
        gap: 12px;
        padding: 10px 12px;
    }

    .stat-item {
        justify-content: space-between;
    }

    footer {
        margin: 24px 12px 0 12px;
    }
}

/* 工具箱首页与新版工具页 */
body.home-page,
body.tool-page {
    background: #f5f7fb;
    color: #172033;
}

.site-header {
    display: flex;
    align-items: baseline;
    width: 100%;
    margin: 0;
    min-height: 64px;
    padding: 18px 24px 0;
    border-radius: 0;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: none;
    justify-content: flex-start;
}

.header-note {
    display: inline-block;
    margin-left: 18px;
    vertical-align: middle;
    color: #2563eb;
    font-size: 14px;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 2px;
    margin-left: auto;
    padding: 3px;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    background: #f8fafc;
    white-space: nowrap;
}

.language-switch a,
.language-switch span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 28px;
    padding: 0 8px;
    border-radius: 5px;
    color: #475467;
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
}

.language-switch span[aria-current="page"] {
    color: #175cd3;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.language-switch a:hover {
    color: #175cd3;
    background: #eff6ff;
}

.language-switch a:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}


.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    color: #1f2937;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 6px;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.brand:hover {
    opacity: 0.82;
}

.brand:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.24);
}

.brand-dev {
    color: #2563eb;
}

.site-nav {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-left: 28px;
}

.nav-item {
    position: relative;
}

.nav-label {
    display: inline-block;
    padding: 8px 14px;
    color: #344054;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    border-radius: 6px;
    white-space: nowrap;
    user-select: none;
}

.nav-item:hover .nav-label,
.nav-item:focus-within .nav-label {
    color: #175cd3;
    background: #eff6ff;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 172px;
    padding: 6px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    display: none;
    z-index: 60;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
    display: block;
}

.nav-dropdown a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: #344054;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown a:hover {
    background: #eff6ff;
    color: #175cd3;
}

.brand-name {
    color: #374151;
}

.top-nav {
    display: none;
}

.top-nav a {
    color: #475467;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
}

.top-nav a:hover,
.top-nav a.active {
    color: #175cd3;
    background: #eff6ff;
}

@media (max-width: 640px) {
    .site-header {
        min-height: 56px;
        margin: 0;
        padding: 16px 14px 0;
    }

    .brand {
        max-width: 100%;
        font-size: 24px;
        letter-spacing: -0.8px;
    }
}

.home-shell,
.tool-shell {
    max-width: none;
    margin: 0 auto;
    padding: 14px 16px 0;
}

.page-title {
    margin: 2px 0 14px;
    color: #172033;
    font-size: 22px;
    font-weight: 750;
    line-height: 1.3;
    letter-spacing: -0.25px;
}

.hero-panel,
.tool-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: 24px;
    align-items: center;
    padding: 34px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e6eaf2;
    box-shadow: 0 12px 34px rgba(22, 34, 51, 0.08);
}

.tool-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.tool-hero strong {
    padding: 10px 12px;
    border-radius: 8px;
    color: #047857;
    background: #ecfdf3;
    border: 1px solid #abefc6;
    font-size: 13px;
    white-space: nowrap;
}

.eyebrow {
    color: #175cd3;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-panel h1,
.tool-hero h1 {
    color: #101828;
    font-size: 42px;
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: 0;
}

.tool-hero h1 {
    font-size: 32px;
}

.hero-desc,
.tool-hero p {
    color: #475467;
    font-size: 17px;
    max-width: 720px;
}

.tool-search {
    padding: 18px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e6eaf2;
}

.tool-search label {
    display: block;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tool-search input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #101828;
    background: #fff;
    font-size: 15px;
}

.tool-search input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-count {
    margin-top: 10px;
    color: #667085;
    font-size: 13px;
}

.section-block {
    margin-top: 22px;
    padding: 26px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e6eaf2;
    box-shadow: 0 10px 28px rgba(22, 34, 51, 0.06);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.section-heading h2,
.seo-content h2 {
    color: #101828;
    font-size: 22px;
    margin: 0;
}

.section-heading p,
.seo-content p {
    color: #667085;
    font-size: 14px;
    margin: 0;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.tool-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 16px;
    border-radius: 8px;
    color: #172033;
    text-decoration: none;
    background: #fbfcfe;
    border: 1px solid #e6eaf2;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.tool-card h3 {
    color: #101828;
    font-size: 16px;
    margin: 0;
}

.tool-card p {
    color: #667085;
    font-size: 13px;
    line-height: 1.55;
    margin: 0;
}

.tool-badge {
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #175cd3;
    font-size: 12px;
    font-weight: 700;
}

.tool-card.is-soon {
    background: #f8fafc;
}

.tool-card.is-soon::after,
.link-list span::after {
    content: '规划中';
    width: fit-content;
    margin-top: auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #667085;
    font-size: 12px;
}

.empty-results {
    margin-top: 14px;
    padding: 14px;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.category-panel {
    padding: 18px;
    border-radius: 8px;
    background: #fbfcfe;
    border: 1px solid #e6eaf2;
}

.category-panel h3 {
    margin: 0 0 12px;
    color: #101828;
    font-size: 17px;
}

.link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.link-list a,
.link-list span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 7px;
    color: #344054;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e6eaf2;
    font-size: 13px;
}

.link-list a:hover {
    color: #175cd3;
    border-color: #93c5fd;
}

.trust-strip {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 10px;
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #047857;
}

.trust-strip span {
    color: #344054;
}

.site-footer {
    width: 100%;
    max-width: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    text-align: left;
    border-radius: 0;
    border: 0;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    padding: 18px 24px;
    margin-top: 24px;
    box-sizing: border-box;
}

.site-footer p {
    margin-top: 6px;
}

.footer-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-links a,
.footer-links span {
    color: #475467;
    font-size: 14px;
}

.json-workbench {
    margin-top: 22px;
    padding: 18px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e6eaf2;
    box-shadow: 0 10px 28px rgba(22, 34, 51, 0.06);
}

.json-workbench.is-fullscreen {
    position: fixed;
    inset: 12px;
    z-index: 20;
    margin: 0;
    overflow: auto;
}

.json-workbench:fullscreen {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: 0;
    background: #fff;
    overflow: auto;
}

.json-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.json-toolbar button {
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 13px;
}

.json-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.editor-panel {
    min-width: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d0d5dd;
    background: #ffffff;
}

.editor-header {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e6eaf2;
}

.editor-header h2 {
    color: #1d2939;
    margin: 0;
    font-size: 14px;
}

.editor-header span {
    color: #667085;
    font-size: 12px;
}

.editor-header select {
    max-width: 180px;
    padding: 6px 8px;
    border-radius: 6px;
    color: #1d2939;
    background: #ffffff;
    border: 1px solid #cbd5e1;
}

.json-layout #json-input,
.json-layout pre {
    min-height: 520px;
    height: 520px;
    margin: 0;
    border: 0;
    border-radius: 0;
}

.json-layout #json-input {
    color: #1d2939;
    background: #ffffff;
    font-size: 13px;
    line-height: 1.65;
}

.json-layout pre {
    overflow: auto;
    background: #ffffff;
    box-shadow: none;
}

.json-layout pre code {
    font-size: 13px;
}

.status-panel {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e6eaf2;
}

.json-message {
    color: #475467;
    font-size: 14px;
}

.json-message.success {
    color: #047857;
}

.json-message.error {
    color: #b42318;
}

.json-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    color: #667085;
    font-size: 13px;
}

.seo-content {
    line-height: 1.75;
}

.related-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.related-tools a {
    padding: 8px 10px;
    border-radius: 7px;
    color: #175cd3;
    text-decoration: none;
    background: #eff6ff;
}

.utility-workbench {
    margin-top: 22px;
    padding: 18px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e6eaf2;
    box-shadow: 0 10px 28px rgba(22, 34, 51, 0.06);
}

.utility-grid {
    display: grid;
    gap: 14px;
}

.utility-grid.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.utility-panel {
    min-width: 0;
    padding: 18px;
    border-radius: 10px;
    background: #fbfcfe;
    border: 1px solid #e6eaf2;
}

.utility-panel.wide-panel {
    grid-column: 1 / -1;
}

.utility-panel h2 {
    margin: 0 0 14px;
    color: #101828;
    font-size: 18px;
}

.utility-panel p {
    color: #475467;
    font-size: 14px;
    line-height: 1.7;
}

.utility-panel label {
    display: block;
    margin-bottom: 8px;
    color: #344054;
    font-size: 14px;
    font-weight: 700;
}

.utility-panel input[type="text"],
.utility-panel input[type="number"],
.utility-panel input[type="datetime-local"],
.utility-panel input[type="password"],
.utility-panel select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    color: #101828;
    background: #fff;
    font-size: 14px;
}

.utility-panel input:focus,
.utility-panel select:focus,
.utility-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.utility-textarea {
    width: 100%;
    min-height: 170px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    resize: vertical;
    color: #101828;
    background: #fff;
    font-family: 'Courier New', Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
}

.utility-textarea.output {
    min-height: 330px;
    background: #f8fafc;
    color: #1d2939;
}

.utility-textarea.small-output {
    min-height: 120px;
}

.quick-paths {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 6px;
}

.quick-paths button {
    width: auto;
    padding: 7px 10px;
    border-radius: 999px;
    color: #175cd3;
    background: #eff6ff;
    box-shadow: none;
    font-size: 12px;
}

.quick-paths button:hover {
    color: #fff;
    background: #2563eb;
    transform: translateY(-1px);
}

.path-help {
    margin-top: 12px;
    color: #667085;
    font-size: 13px;
    line-height: 1.7;
}

.path-help code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #f2f4f7;
    color: #101828;
    font-family: 'Courier New', monospace;
}

.json-path-output-panel {
    margin-top: 14px;
}

.result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.result-heading h2 {
    margin: 0;
}

#json-path-count {
    color: #175cd3;
    font-size: 13px;
    font-weight: 700;
}

.path-result-list {
    display: grid;
    gap: 10px;
}

.path-result-item,
.path-empty {
    border: 1px solid #e6eaf2;
    border-radius: 8px;
    background: #fbfcfe;
}

.path-result-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #e6eaf2;
}

.path-result-meta strong {
    color: #175cd3;
}

.path-result-meta code {
    color: #475467;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
}

.path-result-item pre {
    min-height: auto;
    margin: 0;
    border: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: none;
}

.path-empty {
    padding: 18px;
    color: #667085;
    font-size: 14px;
}

.utility-textarea.key-area {
    min-height: 110px;
}

.button-group.compact {
    margin-top: 12px;
    gap: 8px;
}

.button-group.compact button {
    width: auto;
    padding: 10px 13px;
    border-radius: 7px;
    font-size: 13px;
}

.current-time-card {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6eaf2;
}

.current-time-card span,
.result-row span {
    color: #667085;
    font-size: 13px;
}

.current-time-card strong,
.result-row strong {
    color: #101828;
    font-family: 'Courier New', Monaco, Consolas, monospace;
    font-size: 14px;
    word-break: break-all;
}

.result-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.result-row {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6eaf2;
}

.image-debug-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: 14px;
    margin-top: 14px;
}

.image-preview {
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6eaf2;
    color: #667085;
    text-align: center;
    overflow: hidden;
}

.image-preview img {
    max-width: 100%;
    max-height: 520px;
    border-radius: 8px;
    object-fit: contain;
}

.image-compress-layout {
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
}

.image-drop-zone {
    position: relative;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px;
    border: 2px dashed #98a2b3;
    border-radius: 10px;
    background: #fff;
    color: #475467;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.image-drop-zone input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-drop-zone strong {
    color: #101828;
    font-size: 16px;
}

.image-drop-zone span {
    color: #667085;
    font-size: 13px;
}

.image-drop-zone.is-dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

.image-quality-slider {
    width: 100%;
    accent-color: #2563eb;
}

.image-metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin-bottom: 14px;
}

.image-metric-grid .metric-card strong {
    font-size: 18px;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.image-local-preview {
    min-height: 280px;
    max-height: 420px;
}

.image-local-preview img {
    max-height: 390px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 14px 0;
    color: #344054;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.gif-frame-list {
    display: grid;
    gap: 8px;
    max-height: 360px;
    overflow: auto;
    padding-right: 2px;
}

.gif-frame-item {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid #e6eaf2;
    border-radius: 8px;
    background: #fff;
}

.gif-frame-item img {
    width: 62px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    background: #f2f4f7;
}

.gif-frame-name {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.gif-frame-name strong { color: #101828; font-size: 13px; }
.gif-frame-name span { overflow: hidden; color: #667085; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.gif-frame-actions { display: flex; gap: 5px; }
.gif-frame-actions button { padding: 5px 7px; font-size: 12px; }
.gif-result { margin-top: 14px; }
.gif-result .image-preview { min-height: 220px; }

.gif-delay-custom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gif-delay-custom label {
    font-size: 13px;
    font-weight: 400;
}

.gif-delay-custom input {
    width: 96px;
    padding: 7px 8px;
}

.gif-delay-custom.is-hidden { display: none; }

.muted {
    color: #667085;
    font-size: 13px;
}

.utility-code {
    min-height: 220px;
    margin: 0;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    box-shadow: none;
}

.utility-code code {
    color: #24292e;
    font-size: 13px;
}

.token-fragment {
    min-height: 120px;
    padding: 12px;
    border-radius: 8px;
    color: #101828;
    background: #fff;
    border: 1px solid #e6eaf2;
    font-family: 'Courier New', Monaco, Consolas, monospace;
    word-break: break-all;
}

.option-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.option-row label,
.regex-input-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #344054;
    font-weight: 600;
}

.option-row select {
    width: auto;
    min-width: 110px;
}

.regex-input-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto repeat(5, auto);
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}

.regex-input-row > span {
    color: #667085;
    font-family: 'Courier New', Monaco, Consolas, monospace;
    font-size: 18px;
}

.highlight-box {
    min-height: 220px;
    max-height: 420px;
    overflow: auto;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6eaf2;
    color: #101828;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Courier New', Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.65;
}

.highlight-box mark {
    padding: 1px 2px;
    border-radius: 3px;
    color: #713f12;
    background: #fde68a;
}

.match-list {
    display: grid;
    gap: 10px;
    max-height: 420px;
    overflow: auto;
}

.match-item {
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6eaf2;
}

.match-item h3 {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 8px;
    color: #101828;
    font-size: 14px;
}

.match-item h3 span,
.match-item div span {
    color: #667085;
    font-size: 12px;
}

.match-item p,
.match-item div strong {
    color: #101828;
    font-family: 'Courier New', Monaco, Consolas, monospace;
    word-break: break-all;
}

.match-item p {
    margin: 0 0 8px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.metric-card {
    min-height: 86px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    padding: 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6eaf2;
}

.metric-card span {
    color: #667085;
    font-size: 13px;
}

.metric-card strong {
    color: #101828;
    font-size: 22px;
    line-height: 1.1;
}

.money-result {
    min-height: 132px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    border-radius: 10px;
    color: #344054;
    background: #f8fafc;
    border: 1px solid #e6eaf2;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.5;
    word-break: break-all;
}

.money-result.success {
    color: #047857;
    background: #ecfdf3;
    border-color: #abefc6;
}

.money-result.error {
    color: #b42318;
    background: #fef3f2;
    border-color: #fecdca;
}

.money-reference-wrap {
    overflow-x: auto;
    margin-top: 16px;
}

.money-reference-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6eaf2;
}

.money-reference-table th,
.money-reference-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e6eaf2;
    text-align: center;
}

.money-reference-table th {
    color: #fff;
    background: #2563eb;
    font-weight: 700;
}

.money-reference-table td:nth-child(2) {
    color: #175cd3;
    font-weight: 800;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.status-card {
    padding: 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6eaf2;
}

.status-card strong {
    color: #175cd3;
    font-size: 26px;
    line-height: 1;
}

.status-card h3 {
    margin: 8px 0 4px;
    color: #101828;
    font-size: 15px;
}

.status-card span {
    color: #344054;
    font-weight: 700;
    font-size: 13px;
}

.status-card p {
    margin: 8px 0 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.6;
}

.markdown-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    margin-top: 14px;
}

.markdown-editor,
.markdown-preview {
    min-height: 520px;
}

.markdown-preview {
    overflow: auto;
    padding: 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6eaf2;
    color: #101828;
    line-height: 1.75;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3 {
    margin: 0 0 12px;
    color: #101828;
}

.markdown-preview p,
.markdown-preview ul,
.markdown-preview blockquote,
.markdown-preview table,
.markdown-preview pre {
    margin: 0 0 14px;
}

.markdown-preview ul {
    padding-left: 22px;
}

.markdown-preview blockquote {
    padding: 10px 14px;
    border-left: 4px solid #2563eb;
    background: #eff6ff;
    color: #344054;
}

.markdown-preview code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #f2f4f7;
    color: #101828;
}

.markdown-preview pre {
    padding: 14px;
    border-radius: 8px;
    background: #f6f8fa;
    overflow: auto;
}

.markdown-preview pre code {
    padding: 0;
    background: transparent;
    color: #24292e;
}

.markdown-preview table {
    width: 100%;
    border-collapse: collapse;
}

.markdown-preview th,
.markdown-preview td {
    padding: 8px 10px;
    border: 1px solid #e6eaf2;
    text-align: left;
}

.markdown-preview th {
    background: #f8fafc;
}

@media (max-width: 980px) {
    .hero-panel,
    .tool-hero,
    .json-layout,
    .utility-grid.two-column,
    .image-compress-layout,
    .image-debug-layout {
        grid-template-columns: 1fr;
    }

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

    .category-grid {
        grid-template-columns: 1fr;
    }

    .tool-hero strong {
        width: fit-content;
    }
}

@media (max-width: 768px) {
    .site-header {
        margin: 0;
        align-items: baseline;
    }

    .top-nav {
        justify-content: center;
    }

    .hero-panel,
    .tool-hero,
    .section-block {
        padding: 20px;
    }

    .hero-panel h1,
    .tool-hero h1 {
        font-size: 28px;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .trust-strip,
    .site-footer,
    .status-panel {
        flex-direction: column;
    }

    .footer-links,
    .json-stats {
        justify-content: flex-start;
    }

    .json-toolbar button {
        width: auto;
    }

    .json-layout #json-input,
    .json-layout pre {
        height: 380px;
        min-height: 380px;
    }

    .regex-input-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .regex-input-row label {
        width: fit-content;
    }

    .result-row {
        grid-template-columns: 1fr;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .status-grid,
    .markdown-layout,
    .image-metric-grid,
    .image-preview-grid {
        grid-template-columns: 1fr;
    }

    .gif-frame-item { grid-template-columns: 54px minmax(0, 1fr); }
    .gif-frame-item img { width: 54px; }
    .gif-frame-actions { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    .site-nav,
    .header-note {
        display: none;
    }

    .language-switch {
        margin-left: auto;
    }
}

@media (max-width: 640px) {
    .language-switch a,
    .language-switch span {
        min-width: 32px;
        min-height: 26px;
        padding: 0 7px;
        font-size: 12px;
    }

    .page-title {
        margin-bottom: 12px;
        font-size: 19px;
    }
}

/* 浅色代码高亮（覆盖 atom-one-dark 深色主题，pre 前缀提升优先级） */
pre code.hljs {
    background: transparent;
    color: #24292e;
}

pre .hljs-comment,
pre .hljs-quote {
    color: #6a737d;
}

pre .hljs-keyword,
pre .hljs-selector-tag,
pre .hljs-subst,
pre .hljs-doctag,
pre .hljs-formula {
    color: #d73a49;
}

pre .hljs-string,
pre .hljs-regexp,
pre .hljs-addition,
pre .hljs-meta .hljs-string {
    color: #032f62;
}

pre .hljs-number,
pre .hljs-literal,
pre .hljs-variable,
pre .hljs-template-variable,
pre .hljs-type,
pre .hljs-selector-attr,
pre .hljs-selector-pseudo,
pre .hljs-link {
    color: #005cc5;
}

pre .hljs-title,
pre .hljs-title.class_,
pre .hljs-title.function_ {
    color: #6f42c1;
}

pre .hljs-built_in,
pre .hljs-builtin-name,
pre .hljs-symbol,
pre .hljs-bullet {
    color: #e36209;
}

pre .hljs-attr,
pre .hljs-attribute {
    color: #005cc5;
}

pre .hljs-section,
pre .hljs-name,
pre .hljs-selector-id,
pre .hljs-selector-class {
    color: #22863a;
}

pre .hljs-meta {
    color: #6a737d;
}

pre .hljs-deletion {
    color: #b31d28;
}

/* JSON 页满屏通铺布局：工作台占满首屏剩余高度 */
.json-page {
    background: #f2f4f7;
}

.json-page .tool-shell {
    max-width: none;
    padding: 14px 16px 0;
}

.json-page .json-workbench {
    display: flex;
    flex-direction: column;
    margin-top: 0;
    min-height: calc(100vh - 64px - 14px);
}

.json-page .json-workbench.is-fullscreen {
    min-height: 0;
}

.json-page .json-toolbar {
    flex: 0 0 auto;
    margin-bottom: 12px;
}

.json-page .json-layout {
    flex: 1 1 auto;
    min-height: 420px;
}

.json-page .editor-panel {
    display: flex;
    flex-direction: column;
}

.json-page .editor-header {
    flex: 0 0 auto;
}

.json-page .json-layout #json-input,
.json-page .json-layout pre {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
}
