* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 20px;
    width: 100%;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.tab-nav {
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: white;
    color: #667eea;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.tab-btn:hover {
    background: #f8f9ff;
    color: #764ba2;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none;
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.tool-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* JSON 专用布局样式 */
.json-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 200px);
    min-height: 600px;
}

.json-history-panel {
    width: 250px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.json-main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.json-main-panel h2 {
    margin: 0 0 20px 0;
    color: var(--header-color);
}

.json-work-area {
    display: flex;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

.json-input-panel {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
}

.json-output-panel {
    flex: 0 0 70%;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--card-border);
    flex-shrink: 0;
}

.panel-header label {
    margin: 0;
    font-weight: 600;
    color: var(--label-color);
}

.panel-header .button-group {
    margin: 0;
    gap: 8px;
}

.panel-header button {
    padding: 6px 12px;
    font-size: 0.9em;
    margin: 0;
}

#json-input {
    flex: 1;
    border: none;
    border-radius: 0;
    resize: none;
    padding: 20px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    background: var(--input-bg);
    color: var(--text-color);
}

.json-result-area {
    flex: 1;
    overflow: auto;
    background: #fafbfc;
    border-radius: 0;
    border: none;
    margin: 0;
    padding: 8px;
}

/* 历史记录样式 */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--card-border);
}

.history-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: var(--header-color);
}

.clear-history-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s;
}

.clear-history-btn:hover {
    background: #e9ecef;
    color: #dc3545;
}

.history-list {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding: 10px;
}

.history-empty {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

.history-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.history-item:hover {
    background: #e9ecef;
    border-color: var(--button-bg);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-item-time {
    font-size: 0.8em;
    color: #666;
}

.history-item-delete {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    opacity: 0.7;
    transition: all 0.2s;
}

.history-item-delete:hover {
    opacity: 1;
    background: #dc3545;
    color: white;
}

.history-item-preview {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
    color: #333;
    max-height: 60px;
    overflow: hidden;
    line-height: 1.3;
    word-break: break-all;
}

.fullscreen-btn {
    background: var(--button-bg);
    position: relative;
    font-weight: 600;
    padding: 10px 20px;
    font-size: 1em;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.fullscreen-btn::before {
    content: "🖥️ ";
    font-size: 1.1em;
    margin-right: 4px;
}

.fullscreen-btn:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

/* 不同主题下的全屏按钮颜色 */
body.theme-default .fullscreen-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

body.theme-default .fullscreen-btn:hover {
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.6);
}

body.theme-white .fullscreen-btn {
    background: #4a6cf7;
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.3);
}

body.theme-white .fullscreen-btn:hover {
    background: #3a56d4;
    box-shadow: 0 4px 16px rgba(74, 108, 247, 0.5);
}

body.theme-sunset .fullscreen-btn {
    background: linear-gradient(135deg, #ff7b89 0%, #ff5252 100%);
    box-shadow: 0 2px 8px rgba(255, 123, 137, 0.4);
}

body.theme-sunset .fullscreen-btn:hover {
    box-shadow: 0 4px 16px rgba(255, 123, 137, 0.6);
}

body.theme-ocean .fullscreen-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.4);
}

body.theme-ocean .fullscreen-btn:hover {
    box-shadow: 0 4px 16px rgba(79, 172, 254, 0.6);
}

body.theme-forest .fullscreen-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

body.theme-forest .fullscreen-btn:hover {
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.6);
}

body.theme-galaxy .fullscreen-btn {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.4);
}

body.theme-galaxy .fullscreen-btn:hover {
    box-shadow: 0 4px 16px rgba(156, 39, 176, 0.6);
}

body.theme-dark .fullscreen-btn {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    box-shadow: 0 2px 8px rgba(52, 73, 94, 0.4);
}

body.theme-dark .fullscreen-btn:hover {
    box-shadow: 0 4px 16px rgba(52, 73, 94, 0.6);
}

body.theme-aurora .fullscreen-btn {
    background: linear-gradient(135deg, #0077be 0%, #005f9e 100%);
    box-shadow: 0 2px 8px rgba(0, 119, 190, 0.4);
}

body.theme-aurora .fullscreen-btn:hover {
    box-shadow: 0 4px 16px rgba(0, 119, 190, 0.6);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .json-history-panel {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .json-layout {
        flex-direction: column;
        height: auto;
    }
    
    .json-history-panel {
        width: 100%;
        order: 2;
        max-height: 300px;
    }
    
    .json-main-panel {
        order: 1;
    }
    
    .json-work-area {
        flex-direction: column;
    }
    
    .json-input-panel,
    .json-output-panel {
        flex: none;
    }
    
    /* 移动端调整输入输出框高度比例 */
    .json-input-panel {
        min-height: 200px;
    }
    
    .json-output-panel {
        min-height: 400px;
    }
    
    .panel-header {
        padding: 10px 15px;
    }
    
    .panel-header .button-group {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .panel-header button {
        padding: 4px 8px;
        font-size: 0.8em;
    }
}

/* 垂直布局工具区域 */
.tool-section-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-section,
.output-section,
.input-section-full,
.output-section-full {
    display: flex;
    flex-direction: column;
}

.input-section-full {
    margin-bottom: 20px;
}

.output-section-full {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

textarea,
input[type="text"],
input[type="number"],
input[type="datetime-local"],
select {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    resize: vertical;
    min-height: 100px;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    word-break: break-all;
    word-wrap: break-word;
    white-space: pre-wrap;
    width: 100%;
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

/* JSON 输入框特殊样式 */
#json-input {
    min-height: 300px;
    font-size: 14px;
    line-height: 1.5;
}

button {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease;
    margin: 5px;
}

button:hover {
    background: #764ba2;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e1e5e9;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
}

.current-time {
    background: #f8f9ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.current-time span {
    display: block;
    margin: 5px 0;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
}

#timestamp-result,
#jwt-header,
#jwt-payload,
#jwt-signature {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e1e5e9;
    margin-bottom: 10px;
    word-break: break-all;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    min-height: 50px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .tool-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tab-nav {
        flex-direction: column;
    }
    
    .tab-btn {
        border-radius: 0;
        border-bottom: 1px solid #e1e5e9;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    button {
        margin: 2px 0;
    }
}

.error {
    color: #e74c3c;
    background: #fdf2f2;
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid #e74c3c;
    margin: 10px 0;
}

.success {
    color: #27ae60;
    background: #f0f9f0;
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid #27ae60;
    margin: 10px 0;
}

.copy-btn {
    background: #95a5a6;
    margin-top: 10px;
}

.copy-btn:hover {
    background: #7f8c8d;
}

#jwt-signature {
    font-size: 0.9em;
    color: #7f8c8d;
}

/* JSON语法高亮样式 */
.json-container {
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
}

.json-key {
    color: #881391;
    font-weight: bold;
}

.json-string {
    color: #032f62;
}

.json-number {
    color: #098658;
}

.json-boolean {
    color: #0000ff;
    font-weight: bold;
}

.json-null {
    color: #808080;
    font-style: italic;
}

.json-brace,
.json-bracket {
    color: #333;
    font-weight: bold;
}

.json-comma {
    color: #333;
}

.json-colon {
    color: #333;
}

/* 高亮容器样式 */
.highlighted-json {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 12px;
    margin: 4px 0;
    overflow-x: auto;
    overflow-y: auto;
    min-height: 500px;
    max-height: 600px;
    position: relative;
    word-break: break-all;
    word-wrap: break-word;
}

/* 提示信息样式 */
.message-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    max-width: 300px;
}

.message {
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

.message.error {
    background: #fdf2f2;
    color: #e74c3c;
    border-left: 3px solid #e74c3c;
}

.message.success {
    background: #f0f9f0;
    color: #27ae60;
    border-left: 3px solid #27ae60;
}

.message.info {
    background: #f0f8ff;
    color: #0066cc;
    border-left: 3px solid #0066cc;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 结果容器样式 */
.result-container {
    position: relative;
    min-height: 100px;
}

.result-content {
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* 背景切换样式 */
.background-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.theme-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.theme-menu.show {
    display: flex;
}

.theme-option {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.theme-option:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 主题颜色变量 */
:root {
    --text-color: #333333;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(0, 0, 0, 0.1);
    --button-bg: #667eea;
    --button-hover: #764ba2;
    --label-color: #555555;
    --input-bg: #ffffff;
    --input-border: #e1e5e9;
    --header-color: #667eea;
    --hint-color: #666666;
}

/* 主题背景 */
body {
    transition: background 0.5s ease, color 0.5s ease;
}

body.theme-default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-color: #333333;
    --card-bg: rgba(255, 255, 255, 0.95);
    --button-bg: #667eea;
    --h2-color: #667eea;
    --button-hover: #764ba2;
    --header-color: #667eea;
}

body.theme-white {
    background: #ffffff;
    --text-color: #333333;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(0, 0, 0, 0.1);
    --button-bg: #4a6cf7;
    --button-hover: #3a56d4;
    --header-color: #4a6cf7;
    --label-color: #555555;
    --hint-color: #666666;
    --input-bg: #ffffff;
    --input-border: #e1e5e9;
}

body.theme-sunset {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    --text-color: #8b4513;
    --card-bg: rgba(255, 255, 255, 0.95);
    --button-bg: #ff7b89;
    --button-hover: #ff5252;
    --header-color: #ff7b89;
}

body.theme-ocean {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --text-color: #2c5aa0;
    --card-bg: rgba(255, 255, 255, 0.95);
    --button-bg: #4facfe;
    --button-hover: #00f2fe;
    --header-color: #4facfe;
}

body.theme-forest {
    background: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 100%);
    --text-color: #1a472a;
    --card-bg: rgba(255, 255, 255, 0.95);
    --button-bg: #4caf50;
    --h2-color: #4caf50;
    --button-hover: #45a049;
    --header-color: #4caf50;
}

body.theme-galaxy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --text-color: #000000;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(0, 0, 0, 0.1);
    --button-bg: #9c27b0;
    --button-hover: #7b1fa2;
    --header-color: #9c27b0;
    --label-color: #333333;
    --hint-color: #666666;
}

body.theme-dark {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --text-color: #000000;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(0, 0, 0, 0.1);
    --button-bg: #34495e;
    --button-hover: #2c3e50;
    --header-color: #34495e;
    --label-color: #333333;
    --hint-color: #666666;
    --input-bg: #ffffff;
    --input-border: #cccccc;
}

body.theme-aurora {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    --text-color: #000000;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(0, 0, 0, 0.1);
    --button-bg: #0077be;
    --button-hover: #005f9e;
    --header-color: #0077be;
    --label-color: #333333;
    --hint-color: #666666;
    --input-bg: #ffffff;
    --input-border: #cccccc;
}

/* 应用主题颜色 */
body {
    color: var(--text-color);
    transition: background 0.5s ease, color 0.5s ease;
}

.container {
    color: var(--text-color);
    transition: color 0.5s ease;
}

header h1,
header p {
    color: inherit;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 白色主题下的标题颜色特殊处理 */
body.theme-white header h1,
body.theme-white header p {
    color: #4a6cf7;
    text-shadow: none;
}

.tab-content,
.time-info-card,
.conversion-card,
.result-card,
.highlighted-json {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.tab-btn {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(var(--button-bg), 0.1);
    color: var(--button-bg);
}

.tab-btn.active {
    background: var(--button-bg);
    color: #ffffff;
}

body.theme-sunset .tab-btn.active,
body.theme-ocean .tab-btn.active,
body.theme-forest .tab-btn.active {
    color: #ffffff;
}

h1, h2, h3 {
    color: var(--header-color);
    transition: color 0.3s ease;
}

label,
.control-group label {
    color: var(--label-color);
    transition: color 0.3s ease;
}

.hint {
    color: var(--hint-color);
    transition: color 0.3s ease;
}

textarea,
input[type="text"],
input[type="number"],
input[type="datetime-local"],
select {
    background: var(--input-bg, #ffffff);
    color: var(--text-color);
    border: 1px solid var(--input-border, #e1e5e9);
    transition: all 0.3s ease;
}

button {
    background: var(--button-bg);
    color: #ffffff;
    border: none;
    transition: all 0.3s ease;
}

button:hover {
    background: var(--button-hover);
}

/* 暗色主题特殊处理 */
body.theme-dark .theme-btn,
body.theme-galaxy .theme-btn,
body.theme-aurora .theme-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.theme-dark .theme-btn:hover,
body.theme-galaxy .theme-btn:hover,
body.theme-aurora .theme-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

body.theme-dark .theme-menu,
body.theme-galaxy .theme-menu,
body.theme-aurora .theme-menu {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* JSON语法高亮主题适配 */
body.theme-dark .json-key {
    color: #ff79c6;
}

body.theme-dark .json-string {
    color: #8be9fd;
}

body.theme-dark .json-number {
    color: #bd93f9;
}

body.theme-dark .json-boolean {
    color: #50fa7b;
}

body.theme-dark .json-null {
    color: #f8f8f2;
}

body.theme-dark .json-brace,
body.theme-dark .json-bracket,
body.theme-dark .json-comma,
body.theme-dark .json-colon {
    color: #f8f8f2;
}

/* 消息样式主题适配 */
body.theme-dark .message.error {
    background: rgba(231, 76, 60, 0.2);
    color: #ff7979;
    border-left: 3px solid #ff7979;
}

body.theme-dark .message.success {
    background: rgba(39, 174, 96, 0.2);
    color: #2ecc71;
    border-left: 3px solid #2ecc71;
}

body.theme-dark .message.info {
    background: rgba(52, 152, 219, 0.2);
    color: #74b9ff;
    border-left: 3px solid #74b9ff;
}

/* 时间戳转换样式 - 重新设计 */
.timestamp-tool-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 当前时间卡片 */
.current-time-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.current-time-card h3 {
    margin: 0 0 16px 0;
    color: #667eea;
    font-size: 1.2em;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.current-time-display {
    display: flex;
    gap: 20px;
}

.time-row {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.time-row .time-label {
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
    white-space: nowrap;
}

.time-row .time-value {
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    color: #333;
    font-size: 1em;
    font-weight: 500;
}

/* 时间戳转换主卡片 */
.timestamp-converter-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.timestamp-converter-card h3 {
    margin: 0 0 16px 0;
    color: #667eea;
    font-size: 1.2em;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.converter-content {
    display: flex;
    gap: 24px;
}

.input-area {
    flex: 0 0 35%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-area label {
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
}

.timestamp-input-main {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1.05em;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    transition: all 0.3s ease;
}

.timestamp-input-main:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.result-area {
    flex: 1;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-area .empty-state {
    color: #999;
    font-style: italic;
    text-align: center;
}

.result-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e5e9;
}

.result-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.result-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 4px;
}

.result-value {
    font-size: 1.05em;
    color: #333;
    font-weight: 500;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
}

/* 批量转换卡片 */
.batch-converter-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.batch-header h3 {
    margin: 0;
    color: #667eea;
    font-size: 1.2em;
    font-weight: 600;
}

.add-batch-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.add-batch-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.batch-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.batch-container .empty-state {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
    grid-column: 1 / -1;
}

.batch-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #f8f9fb 100%);
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.batch-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 0 0 12px;
}

.batch-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.06);
    border-color: #667eea;
}

.batch-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.batch-item-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.current-time-label {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.current-time-label::before {
    content: "🕐 ";
    margin-right: 4px;
    font-size: 1.1em;
}

.batch-edit-btn {
    padding: 6px 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s ease;
    font-weight: 500;
    min-width: 50px;
}

.batch-edit-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.batch-edit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.batch-item input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 0.95em;
    background: white;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.batch-item input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.batch-item-result {
    font-size: 0.9em;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e8ecef;
}

.batch-item-result.empty {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px 12px;
}

.time-result-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 8px;
    background: #f8f9fb;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.time-result-row:hover {
    background: #eef1f5;
}

.time-result-row:first-child {
    background: #fff4e6;
    border-left: 3px solid #ff9800;
}

.time-result-row:first-child:hover {
    background: #ffe8cc;
}

.time-result-row:nth-child(2) {
    border-left: 3px solid #667eea;
}

.time-result-row:nth-child(3) {
    border-left: 3px solid #4caf50;
}

.time-result-row.relative {
    margin-top: 0;
    border-left: 3px solid #9c27b0;
}

.time-label-inline {
    color: #555;
    font-size: 0.85em;
    font-weight: 700;
    min-width: 65px;
    display: inline-block;
    text-align: right;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', '微软雅黑', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.time-result-row.relative .time-label-inline {
    color: #666;
}

.time-value-inline {
    color: #1a1a1a;
    font-weight: 600;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 0.95em;
    flex: 1;
}

.time-result-row.relative .time-value-inline {
    color: #555;
    font-size: 0.9em;
}

.batch-delete-btn {
    padding: 6px 10px;
    background: #ff5252;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s ease;
    font-weight: 500;
    min-width: 50px;
}

.batch-delete-btn:hover {
    background: #d32f2f;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

.batch-delete-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 当前时间项特殊样式 */
.batch-item.current-time-item {
    border-left-color: #4caf50;
}

.batch-item.current-time-item::before {
    background: linear-gradient(180deg, #4caf50 0%, #45a049 100%);
}

.batch-item.current-time-item input {
    display: none !important;
    margin-bottom: 0;
}

.batch-item.current-time-item .batch-item-result {
    margin-top: 0;
}

.hint {
    font-size: 0.85em;
    color: #6c757d;
    font-style: italic;
}

.error-message {
    color: #e74c3c;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .current-time-display {
        flex-direction: column;
        gap: 10px;
    }

    .converter-content {
        flex-direction: column;
    }

    .input-area {
        flex: none;
    }

    .batch-container {
        grid-template-columns: 1fr;
    }

    .batch-item {
        padding: 14px;
    }

    .batch-item input {
        font-size: 0.9em;
    }

    .time-result-row {
        padding: 8px 6px;
    }

    .time-label-inline {
        min-width: 55px;
        font-size: 0.8em;
    }

    .time-value-inline {
        font-size: 0.85em;
    }
}

/* 结果卡片标题栏样式 */
.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

.result-card-header h3,
.result-card-header label {
    margin: 0;
    padding: 0;
    border-bottom: none;
    font-weight: 600;
    color: #555;
}

.result-card-header button {
    margin: 0;
    padding: 8px 16px;
    font-size: 0.9em;
}

.result-card-header .button-group {
    margin-top: 0;
    display: flex;
    align-items: center;
}

/* JSON 可折叠树形视图样式 - bejson风格 */
.json-tree-container {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    background: #ffffff;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    padding: 12px 8px;
    max-height: none;
    overflow: auto;
    position: relative;
    word-wrap: normal;
    white-space: nowrap;
}

/* 优化JSON内容和项的布局 */
.json-tree-container .json-content {
    margin: 0;
    padding: 0;
}

.json-tree-container .json-item {
    margin: 0;
    padding: 0;
}

.json-line {
    display: flex;
    align-items: center;
    min-height: 26px;
    padding: 2px 4px;
    margin: 1px 0;
    border-radius: 3px;
    position: relative;
    transition: background-color 0.15s ease;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.json-line:hover {
    background-color: #f6f8fa;
}


.json-toggle {
    cursor: pointer;
    user-select: none;
    color: #586069;
    font-weight: bold;
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    text-align: center;
    line-height: 1;
    border: 1px solid #d1d5da;
    border-radius: 3px;
    background: #ffffff;
    font-size: 11px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.json-toggle:hover {
    background-color: #f3f4f6;
    border-color: #0969da;
    color: #0969da;
    transform: scale(1.1);
}

.json-toggle.collapsed {
    background-color: #f6f8fa;
}

.json-content {
    width: 100%;
}

.json-item {
    width: 100%;
}

.json-summary {
    color: #6a737d;
    font-style: italic;
    font-size: 12px;
    margin-left: 8px;
    opacity: 0.8;
}

/* 专业JSON语法高亮颜色 - 优化的配色方案 */
.json-key {
    color: #0550ae;
    font-weight: 600;
    white-space: nowrap;
    word-break: keep-all;
}

.json-string {
    color: #0a3069;
    font-weight: 400;
    word-wrap: break-word;
    word-break: break-word;
}

.json-number {
    color: #116329;
    font-weight: 500;
    white-space: nowrap;
}

.json-boolean {
    color: #953800;
    font-weight: 600;
    white-space: nowrap;
}

.json-null {
    color: #6e7781;
    font-weight: 600;
    font-style: italic;
    white-space: nowrap;
}

.json-brace,
.json-bracket {
    color: #24292f;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
}

.json-colon {
    color: #57606a;
    margin: 0 4px;
    font-weight: 400;
    white-space: nowrap;
}

.json-comma {
    color: #57606a;
    font-weight: 400;
    white-space: nowrap;
}

/* 深色主题下的JSON样式 */
.theme-dark .json-tree-container {
    background: #0d1117;
    border-color: #30363d;
    color: #e6edf3;
}

.theme-dark .json-line:hover {
    background-color: #161b22;
}

.theme-dark .line-number {
    background-color: #161b22;
    border-color: #30363d;
    color: #7d8590;
}

.theme-dark .json-toggle {
    background: #21262d;
    border-color: #30363d;
    color: #7d8590;
}

.theme-dark .json-toggle:hover {
    background-color: #30363d;
    border-color: #58a6ff;
    color: #58a6ff;
}

.theme-dark .json-key {
    color: #58a6ff;
}

.theme-dark .json-string {
    color: #a5d6ff;
}

.theme-dark .json-number {
    color: #79c0ff;
}

.theme-dark .json-boolean {
    color: #d2a8ff;
}

.theme-dark .json-null {
    color: #7d8590;
}

.theme-dark .json-brace,
.theme-dark .json-bracket,
.theme-dark .json-colon,
.theme-dark .json-comma {
    color: #e6edf3;
}

.theme-dark .json-summary {
    color: #7d8590;
}

/* JSON提取信息样式 */
.extraction-info {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 15px;
    color: #1976d2;
    font-weight: 500;
    font-size: 14px;
}

.theme-dark .extraction-info {
    background: rgba(33, 150, 243, 0.1);
    border-color: #2196f3;
    color: #64b5f6;
}

/* ==================== 智能指派分析样式 ==================== */

/* 单个输入框样式 */
.dispatch-single-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.dispatch-single-input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dispatch-single-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* 表格容器 */
.dispatch-table-container {
    max-height: 600px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
}

/* 空状态 */
.dispatch-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
}

/* 智能指派分析表格 */
.dispatch-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.dispatch-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.dispatch-table th {
    padding: 12px 15px;
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.dispatch-table th:last-child {
    border-right: none;
    text-align: center;
}

/* 备注信息列左对齐 */
.dispatch-table th:nth-last-child(2) {
    text-align: left;
}

.dispatch-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.dispatch-table tbody tr:hover {
    background-color: #f5f5f5;
}

.dispatch-table tbody tr:last-child {
    border-bottom: none;
}

.dispatch-table td {
    padding: 10px 15px;
    color: #333;
    text-align: right;
    border-right: 1px solid #e0e0e0;
}

.dispatch-table td:last-child {
    border-right: none;
}

/* 高亮重要列（综合权重、实时权重） */
.dispatch-table th.highlight-column {
    background: linear-gradient(135deg, #5a67d8 0%, #6b4fa2 100%);
    font-weight: 700;
    position: relative;
}

.dispatch-table th.highlight-column::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
}

.dispatch-table td.highlight-column {
    background: rgba(102, 126, 234, 0.08);
    font-weight: 600;
    color: #5a67d8;
}

/* 备注信息列左对齐 */
.dispatch-table td:nth-last-child(2) {
    text-align: left;
}

/* 操作列样式 */
.dispatch-actions {
    text-align: center !important;
    white-space: nowrap;
}

.dispatch-delete-btn-table {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.dispatch-delete-btn-table:hover {
    background: rgba(255, 70, 70, 0.1);
    transform: scale(1.1);
}

/* 滚动条样式 */
.dispatch-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dispatch-table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.dispatch-table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.dispatch-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* 白色主题下的样式调整 */
.theme-white .dispatch-single-input {
    background: white;
    border-color: #d1d5db;
    color: #333;
}

.theme-white .dispatch-single-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.theme-white .dispatch-single-input::placeholder {
    color: #9ca3af;
}

.theme-white .dispatch-table {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-white .dispatch-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-white .dispatch-table tbody tr:hover {
    background-color: #f8f9fa;
}

.theme-white .dispatch-table th.highlight-column {
    background: linear-gradient(135deg, #5a67d8 0%, #6b4fa2 100%);
}

.theme-white .dispatch-table td.highlight-column {
    background: rgba(102, 126, 234, 0.12);
    color: #5a67d8;
}

.theme-white .dispatch-table-container {
    background: #f9fafb;
}

.theme-white .dispatch-empty-state {
    color: #9ca3af;
}

/* 计算公式说明样式 */
.dispatch-formula-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.dispatch-formula-title {
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.dispatch-formula-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.dispatch-formula-item:last-child {
    padding-bottom: 0;
}

.dispatch-formula-label {
    font-weight: 600;
    color: #667eea;
    min-width: 80px;
    flex-shrink: 0;
}

.dispatch-formula-eq {
    margin: 0 10px;
    color: #666;
    font-weight: 500;
}

.dispatch-formula-value {
    color: #555;
    font-weight: 500;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* 白色主题下的公式样式 */
.theme-white .dispatch-formula-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-color: rgba(102, 126, 234, 0.15);
}

.theme-white .dispatch-formula-title {
    color: #667eea;
}

.theme-white .dispatch-formula-label {
    color: #667eea;
}

.theme-white .dispatch-formula-eq {
    color: #666;
}

.theme-white .dispatch-formula-value {
    color: #444;
}