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

:root {
    /* 颜色变量 */
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --secondary-color: #95a5a6;
    --secondary-hover: #7f8c8d;
    --success-color: #28a745;
    --error-color: #dc3545;
    --info-color: #17a2b8;
    --dark-bg: #2c3e50;
    --darker-bg: #34495e;
    --light-bg: #fafafa;
    --card-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #7f8c8d;
    --border-color: #ddd;
    --border-light: #e9ecef;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.12);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

body.no-scroll {
    height: 100vh;
    overflow: hidden;
}

body.no-scroll .container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    flex-direction: column;
}

/* 顶部标题栏 */
.header {
    background-color: var(--card-bg);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.header h1 {
    font-size: 32px;
    font-weight: 300;
    color: var(--dark-bg);
    margin-bottom: 10px;
}

.header p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 15px;
}

.main-nav {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 8px 16px;
    background: rgba(44, 62, 80, 0.1);
    border-radius: 20px;
    color: var(--dark-bg);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid rgba(44, 62, 80, 0.2);
}

.nav-link:hover {
    background: rgba(44, 62, 80, 0.15);
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(52, 152, 219, 0.2);
    border-color: var(--primary-color);
    font-weight: 600;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
    width: 100%;
}

/* 输入区域 */
.input-section {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.section-header h2 {
    font-size: 20px;
    font-weight: 400;
    color: var(--dark-bg);
}

.input-actions {
    display: flex;
    gap: 10px;
}

#json-input {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#json-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* 功能按钮区域 */
.function-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.function-btn {
    flex: 1;
    min-width: 120px;
    padding: 15px 20px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.function-btn:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.function-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 结果网格 */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* 结果卡片 */
.result-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.result-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

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

.result-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.result-header h3 .copy-btn {
    font-size: 12px;
    padding: 4px 8px;
    background: #f8f9fa;
    border: 1px solid var(--border-light);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.result-header h3 .copy-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.output-area {
    width: 100%;
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.4;
    background-color: #f8f9fa;
    transition: border-color 0.3s ease;
}

.output-area:focus {
    outline: none;
    border-color: var(--primary-color);
}

.output-area pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* URL参数表格样式 */
.params-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.params-table th,
.params-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.params-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.params-table tr:hover {
    background-color: #f8f9fa;
}

/* 消息提示样式 */
.message,
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.message { background: var(--success-color); }
.error-message { background: var(--error-color); }

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn.primary { background-color: var(--primary-color); color: white; }
.btn.primary:hover { background-color: var(--primary-hover); }
.btn.secondary { background-color: var(--secondary-color); color: white; }
.btn.secondary:hover { background-color: var(--secondary-hover); }
.btn.small { padding: 6px 12px; font-size: 12px; }

/* 结果样式 */
.success { color: var(--success-color); font-weight: bold; }
.error { color: var(--error-color); font-weight: bold; }
.info { color: var(--info-color); }

/* JSON树状视图样式 */
.json-tree {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.json-tree ul { list-style: none; padding-left: 15px; }
.json-tree li { margin: 3px 0; }

.json-key { color: #881391; font-weight: bold; }
.json-string { color: #032f62; }
.json-number { color: #098658; }
.json-boolean { color: #005cc5; }
.json-null { color: #6a737d; }

.toggle-btn {
    cursor: pointer;
    user-select: none;
    margin-right: 5px;
    font-size: 10px;
}

.toggle-btn::before {
    content: '▶';
    display: inline-block;
    transition: transform 0.2s ease;
}

.toggle-btn.expanded::before { transform: rotate(90deg); }
.collapsed { display: none; }

/* 浮动操作按钮 */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* 回到顶部按钮 */
.back-to-top {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    color: white;
    border: 2px solid #ffffff;
    cursor: pointer;
    font-size: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.back-to-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.back-to-top:hover::before { left: 100%; }

.back-to-top::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    border: 2px solid #ffffff;
    border-bottom: none;
    border-right: none;
    transform: translate(-50%, -40%) rotate(45deg);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    border-color: #f0f0f0;
    transform: translateY(-6px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.back-to-top:hover::after {
    border-color: #f0f0f0;
    transform: translate(-50%, -50%) rotate(45deg);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.back-to-top.dark-mode {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border-color: #2c2c2c;
}

.back-to-top.dark-mode::after { border-color: #2c2c2c; }

.back-to-top.minimal {
    background: transparent;
    border: 2px solid #2c2c2c;
    box-shadow: none;
}

.back-to-top.minimal::after { border-color: #2c2c2c; }

.back-to-top.minimal:hover {
    background: #2c2c2c;
    border-color: #2c2c2c;
}

.back-to-top.minimal:hover::after { border-color: #ffffff; }

.fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover { background-color: var(--primary-hover); transform: scale(1.1); }

/* 状态样式 */
#input-status {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

#input-status.success { color: var(--success-color); }
#input-status.error { color: var(--error-color); }

#input-stats {
    font-size: 12px;
    color: #666;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* 分析结果样式 */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.analysis-label { font-weight: bold; color: var(--dark-bg); }
.analysis-value { color: var(--text-secondary); }

/* 表格样式 */
.json-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.json-table th,
.json-table td {
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    text-align: left;
}

.json-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.json-table tr:nth-child(even) { background-color: #f8f9fa; }
.json-table tr:hover { background-color: #e9ecef; }

/* 查询区域样式 */
.path-query {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.path-query input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.path-query input:focus { outline: none; border-color: #007bff; }

.escape-options { display: flex; gap: 10px; margin-bottom: 10px; }

.query-result {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

.query-result pre {
    margin: 10px 0 0 0;
    background: white;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    overflow-x: auto;
}

/* 网站底部样式 */
.site-footer,
.footer {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    color: #ecf0f1;
    padding: 60px 0 20px;
    position: relative;
    overflow: hidden;
}

.site-footer::before,
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-border);
    background-size: 200% 100%;
    animation: gradientMove 3s ease-in-out infinite;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.footer .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.footer-section h4,
.footer .footer-section h4 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after,
.footer .footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient-border);
    border-radius: 2px;
}

.footer-section p { margin-bottom: 12px; line-height: 1.6; color: #bdc3c7; }

.footer-section ul { list-style: none; padding: 0; }

.footer-section ul li { margin-bottom: 10px; }

.footer-section ul li a,
.footer .footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding-left: 0;
}

.footer-section ul li a:hover,
.footer .footer-section ul li a:hover {
    color: #667eea;
    transform: translateX(5px);
}

.footer-section ul li a::before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: all 0.3s ease;
    color: #667eea;
}

.footer-section ul li a:hover::before {
    opacity: 1;
    left: -20px;
}

.footer-bottom,
.footer .footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 50px;
}

.footer-bottom p,
.footer .footer-bottom p {
    margin-bottom: 10px;
    color: #95a5a6;
    font-size: 14px;
}

.beian-link {
    color: #95a5a6;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0 5px;
}

.beian-link:hover { color: #667eea; transform: translateY(-1px); }

.beian-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
    margin-top: -2px;
}

.separator { margin: 0 10px; color: #7f8c8d; }

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

/* 深色主题 */
.dark-theme {
    background-color: #1e1e1e !important;
    color: #d4d4d4 !important;
}

.dark-theme .json-key { color: #9cdcfe !important; }
.dark-theme .json-string { color: #ce9178 !important; }
.dark-theme .json-number { color: #b5cea8 !important; }
.dark-theme .json-boolean { color: #569cd6 !important; }
.dark-theme .json-null { color: #569cd6 !important; }

/* 编辑器样式 */
.editor-container textarea {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
    width: 100%;
    min-height: 300px;
    padding: 10px;
    resize: vertical;
}

.editor-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* 代码生成器样式 */
.code-generator {
    max-height: 400px;
    overflow-y: auto;
}

.code-generator pre {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

/* 格式转换样式 */
.format-converter {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.format-converter .btn { margin: 2px; text-align: left; }

/* Excel处理样式 */
.excel-handler {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.excel-handler input[type="file"] {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 100%;
}

/* 排序信息 */
.sort-info {
    margin-top: 10px;
    padding: 8px;
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    color: #0056b3;
    font-size: 13px;
}

/* Favicon页面样式 */
#upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--light-bg);
    margin-bottom: 20px;
}

#upload-zone:hover {
    border-color: var(--primary-color);
    background-color: #f8f9ff;
}

#upload-zone.dragover {
    border-color: var(--primary-color);
    background-color: #e3f2fd;
    transform: scale(1.01);
}

.favicon-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.favicon-size {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.favicon-size img {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    image-rendering: pixelated;
    background: white;
}

/* 首页工具卡片样式 */
.hero-section {
    text-align: center;
    padding: 80px 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    margin-bottom: 60px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.hero-section h2 {
    font-size: 2.8em;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-section p {
    font-size: 1.3em;
    opacity: 0.95;
    font-weight: 300;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    margin-bottom: 60px;
    padding: 0 10px;
}

.tool-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.tool-card:hover::before { transform: scaleX(1); }

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.tool-icon {
    font-size: 3.5em;
    margin-bottom: 20px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon { transform: scale(1.1); }

.tool-card h3 {
    color: var(--dark-bg);
    margin-bottom: 15px;
    font-size: 1.6em;
    font-weight: 600;
}

.tool-card p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.7;
    font-size: 1.05em;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.feature-tag {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1976d2;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(25, 118, 210, 0.2);
    transition: all 0.3s ease;
}

.tool-card:hover .feature-tag { transform: translateY(-1px); }

.tool-btn {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 14px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.tool-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.tool-btn:hover:not(:disabled)::before { left: 100%; }

.tool-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.tool-btn:disabled {
    background: linear-gradient(135deg, #ccc, #bbb);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
    transform: none;
}

.tool-btn:disabled:hover { transform: none; box-shadow: none; }

/* 首页特定优化 */
.main-content { padding-top: 20px; }

/* 图片工具特有样式 */
#upload-icon { font-size: 48px; margin-bottom: 15px; }
#upload-input { display: none; }

.upload-tips { color: #666; font-size: 14px; margin-bottom: 5px; }
.upload-limit { color: #999; font-size: 12px; }

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.image-preview {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
}

.preview-image {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 10px;
}

.image-info { font-size: 12px; color: #666; margin-bottom: 8px; }

.remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255,255,255,0.8);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.remove-image:hover {
    background-color: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.settings-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.quality-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.quality-control label { min-width: 80px; font-weight: 500; }

.quality-control input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.quality-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quality-control input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.quality-value { min-width: 40px; font-weight: 500; color: var(--primary-color); }

.format-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.format-option { display: flex; align-items: center; gap: 5px; }

.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    font-size: 16px;
}

.compression-result {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.summary-item { text-align: center; }

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.summary-label { font-size: 12px; color: #666; }

/* 压缩进度条 */
.progress-container {
    width: 100%;
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text { font-size: 14px; color: #666; margin-bottom: 5px; }

/* 时间戳转换器专用样式 */
.current-timestamp {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
}

.timestamp-item { display: flex; flex-direction: column; align-items: center; text-align: center; }

.timestamp-label { font-size: 14px; color: #666; margin-bottom: 5px; }

.timestamp-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-bg);
    font-family: 'Courier New', monospace;
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark-bg);
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.input-hint { font-size: 12px; color: var(--text-secondary); margin-top: 5px; }

/* URL页面紧凑样式 */
body.compact {
    font-size: 14px;
}

body.compact .header {
    padding: 15px 30px;
    margin-bottom: 10px;
}

body.compact .header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

body.compact .header p {
    font-size: 14px;
    margin-bottom: 10px;
}

body.compact .main-nav {
    margin-top: 10px;
    gap: 10px;
}

body.compact .nav-link {
    padding: 6px 12px;
    font-size: 13px;
}

body.compact .input-section {
    padding: 15px;
    margin-bottom: 15px;
}

body.compact .section-header h2 {
    font-size: 18px;
}

body.compact #json-input,
body.compact #url-input {
    min-height: 120px;
    padding: 10px;
    font-size: 13px;
}

body.compact .function-bar {
    margin-bottom: 15px;
    gap: 8px;
}

body.compact .function-btn {
    padding: 10px 15px;
    font-size: 13px;
    min-width: 100px;
}

body.compact .results-grid {
    gap: 15px;
    margin-top: 15px;
}

body.compact .result-card {
    padding: 15px;
    margin-bottom: 15px;
}

body.compact .result-header h3 {
    font-size: 16px;
}

body.compact .output-area {
    min-height: 80px;
    max-height: 150px;
    font-size: 13px;
}

body.compact .tool-info {
    margin-top: 15px;
}

body.compact .tool-info h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

body.compact .info-grid {
    gap: 15px;
}

body.compact .info-card {
    padding: 15px;
}

body.compact .info-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

body.compact .info-card p {
    font-size: 13px;
}

body.compact .footer {
    padding: 15px 20px;
    margin-top: auto;
}

/* 动画效果 */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 响应式设计 - 统一的媒体查询 */
@media (max-width: 768px) {
    /* 基础响应式 */
    .main-nav { gap: 10px; }
    .nav-link { padding: 6px 12px; font-size: 13px; }
    
    /* 头部 */
    .header {
        padding: 15px 20px;
    }
    
    .header h1 { font-size: 24px; }
    
    /* 主要内容 */
    .main-content {
        padding: 0 15px 40px;
    }
    
    /* 输入区域 */
    .input-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    /* 功能栏 */
    .function-bar {
        margin-bottom: 15px;
        gap: 8px;
        flex-direction: column;
    }
    
    .function-btn {
        padding: 10px 15px;
        font-size: 13px;
        min-width: auto;
        text-align: center;
    }
    
    /* 结果 */
    .results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 15px;
    }
    
    .result-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .result-header h3 { font-size: 16px; }
    
    .output-area {
        min-height: 80px;
        font-size: 13px;
    }
    
    /* 浮动按钮 */
    .floating-actions {
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-top {
        width: 55px;
        height: 55px;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    }
    
    .back-to-top::after {
        width: 16px;
        height: 16px;
    }
    
    .back-to-top:hover {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    }
    
    .fab { width: 50px; height: 50px; font-size: 20px; }
    
    /* 查询区域 */
    .path-query,
    .escape-options {
        flex-direction: column;
    }
    
    /* 表格 */
    .json-table {
        font-size: 12px;
    }
    
    .json-table th,
    .json-table td {
        padding: 6px 8px;
    }
    
    /* 底部 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .footer-bottom {
        padding: 15px 20px 0;
    }
    
    .footer-bottom p {
        font-size: 13px;
    }
    
    .beian-link {
        display: block;
        margin: 5px 0;
    }
    
    .separator { display: none; }
    
    .site-footer {
        margin-top: 40px;
        padding: 30px 0 15px;
    }
    
    /* 编辑器 */
    .editor-actions { flex-direction: column; }
    
    .format-converter .btn {
        width: 100%;
        margin: 2px 0;
    }
    
    .code-generator pre { font-size: 11px; }
    
    .result-card .actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .result-card .actions .btn {
        margin: 2px 0;
        text-align: center;
    }
    
    /* 首页 */
    .hero-section {
        padding: 40px 20px;
        margin-bottom: 30px;
    }
    
    .hero-section h2 {
        font-size: 2em;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 5px;
    }
    
    .tool-card {
        padding: 20px;
        margin: 0 10px;
    }
    
    .tool-icon { font-size: 3em; }
    
    .tool-card h3 { font-size: 1.4em; }
    
    /* 图片工具 */
    #upload-zone { padding: 30px 15px; }
    
    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .preview-image { max-height: 100px; }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn { min-width: auto; }
    
    .result-summary {
        flex-direction: column;
        gap: 15px;
    }
    
    /* 时间戳工具 */
    .current-timestamp {
        grid-template-columns: 1fr;
    }
    
    .timestamp-value {
        font-size: 16px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    /* 浮动按钮 */
    .floating-actions {
        bottom: 15px;
        right: 15px;
    }
    
    .back-to-top {
        width: 50px;
        height: 50px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }
    
    .back-to-top::after {
        width: 14px;
        height: 14px;
    }
    
    .back-to-top:hover {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }
    
    /* 结果卡片 */
    .result-card h3 { font-size: 16px; }
    
    .result-card .actions .btn {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .result-card .output-area {
        font-size: 12px;
        padding: 10px;
    }
    
    /* 编辑器 */
    .editor-container textarea { font-size: 12px; }
    
    /* 首页 */
    .hero-section {
        padding: 50px 20px;
        margin-bottom: 30px;
    }
    
    .hero-section h2 { font-size: 1.8em; }
    
    .tools-grid { gap: 20px; }
    
    .tool-card {
        padding: 25px 20px;
        margin: 0 5px;
    }
}