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

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

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

header {
    background: #fff;
    padding: 16px 24px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 14px;
}

.github-link:hover {
    background: #f0f0f0;
}

.github-link svg {
    fill: currentColor;
}

.nav-tabs {
    background: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-tabs a {
    color: #555;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 400;
    font-size: 14px;
}

.nav-tabs a:hover {
    background: #f0f0f0;
}

.nav-tabs a.active {
    background: #2196F3;
    color: white;
}

main {
    background: #fff;
    padding: 24px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.tool-section {
    margin-bottom: 20px;
    padding: 16px;
    background: #fafafa;
    border-radius: 4px;
    border-left: 3px solid #2196F3;
}

.tool-section h2 {
    color: #333;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

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

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

.input-group label {
    display: block;
    color: #555;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
}

.input-group textarea,
.input-group input[type="text"],
.input-group input[type="password"],
.input-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: border-color 0.2s;
    resize: vertical;
}

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

.input-group textarea:focus,
.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #2196F3;
}

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

button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s;
    color: white;
}

button.primary {
    background: #2196F3;
}

button.primary:hover {
    background: #1976D2;
}

button.secondary {
    background: #757575;
}

button.secondary:hover {
    background: #616161;
}

button.success {
    background: #4CAF50;
}

button.success:hover {
    background: #45a049;
}

.output-box {
    background: white;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #d0d0d0;
    min-height: 100px;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #333;
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-info {
    background: #E3F2FD;
    color: #1565C0;
    border-left: 3px solid #2196F3;
}

.alert-warning {
    background: #FFF8E1;
    color: #F57F17;
    border-left: 3px solid #FFC107;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border-left: 3px solid #4CAF50;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border-left: 3px solid #F44336;
}

footer {
    background: #fff;
    padding: 16px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    margin-top: 20px;
    text-align: center;
}

footer p {
    color: #666;
    margin: 4px 0;
    font-size: 13px;
}

footer a {
    color: #2196F3;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

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

.input-section h2,
.output-section h2 {
    color: #333;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

#json-input {
    width: 100%;
    min-height: 300px;
    padding: 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
}

#json-input:focus {
    outline: none;
    border-color: #2196F3;
}

pre {
    background: #282c34;
    padding: 16px;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 12px;
    border: 1px solid #1e2229;
}

pre code {
    color: #abb2bf;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* 代码对比页面特定样式 */
.diff-controls {
    background: #fafafa;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    border: 1px solid #e8e8e8;
}

.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: 6px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 140px;
}

.control-group select:focus {
    outline: none;
    border-color: #2196F3;
}

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

.diff-stats {
    background: #fafafa;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    border: 1px solid #e8e8e8;
}

.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: 1px solid #d0d0d0;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.panel-header {
    background: #2196F3;
    color: white;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.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: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    margin-left: 6px;
}

.panel-header button:hover {
    background: rgba(255, 255, 255, 0.25);
}

.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: 12px;
    border: none;
    resize: none;
    font-family: 'Courier New', Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
    background: #282c34;
    color: #abb2bf;
}

.code-input:focus {
    outline: none;
}

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

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

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

.diff-line {
    display: flex;
    padding: 2px 12px;
    min-height: 20px;
    align-items: center;
    border-left: 3px solid transparent;
}

.diff-line.diff-empty {
    background: #2a2e36;
}

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

.diff-line.diff-added {
    background: rgba(46, 125, 50, 0.12);
    border-left-color: #4CAF50;
}

.diff-line.diff-removed {
    background: rgba(198, 40, 40, 0.12);
    border-left-color: #F44336;
}

.diff-line.diff-changed {
    background: rgba(245, 127, 23, 0.12);
    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: 12px;
    }

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

    header h1 {
        font-size: 18px;
    }

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

    main {
        padding: 16px;
    }

    .button-group {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .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{
	 position: absolute; bottom: 0; color: #fff;
 }
 .footer a{
	 color: #999;
 }

