/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --bg-color: #f5f7fa;
    --sidebar-bg: #ffffff;
    --content-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e1e4e8;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* 夜间模式颜色变量 */
body.dark-theme {
    --primary-color: #5ba3ff;
    --primary-hover: #4a90e2;
    --bg-color: #1a1a1a;
    --sidebar-bg: #2d2d2d;
    --content-bg: #252525;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: #404040;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* 夜间模式下的移动端菜单按钮 */
body.dark-theme .mobile-menu-toggle span {
    background-color: #e0e0e0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
        'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
    -webkit-touch-callout: none; /* 禁用长按弹出菜单 */
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    padding-top: 0; /* PC端不需要顶部间距 */
}

/* 左侧菜单栏 */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.logo {
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.logo h1 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 控制按钮区域 */
.controls {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    justify-content: center;
}

.control-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 20px;
}

.control-btn:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.control-btn .icon {
    display: block;
}

/* 语言选择器 */
.language-selector {
    position: relative;
}

.language-menu {
    position: absolute;
    top: 45px;
    left: 0;
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    padding: 5px 0;
    min-width: 120px;
    display: none;
    z-index: 1000;
}

.language-menu.show {
    display: block;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-option {
    width: 100%;
    padding: 8px 15px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    transition: background 0.2s ease;
}

.lang-option:hover {
    background: var(--bg-color);
}

.lang-option:active {
    background: var(--border-color);
}

.menu {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.menu-item:hover {
    background-color: var(--bg-color);
    border-left-color: var(--primary-color);
}

.menu-item.active {
    background-color: #e8f4ff;
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.menu-item .icon {
    font-size: 18px;
}

.footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-secondary);
}

/* 右侧内容区 */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

.tool-container {
    max-width: 1000px;
    margin: 0 auto;
}

.tool-header {
    margin-bottom: 30px;
}

.tool-header h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.tool-header .description {
    color: var(--text-secondary);
    font-size: 15px;
}

.tool-body {
    background-color: var(--content-bg);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}

/* 表单元素 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group .form-control {
    flex: 1;
}

/* 按钮 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 结果显示 */
.result-box {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.result-box.success {
    background-color: #e8f5e9;
    border-color: #4caf50;
}

.result-item {
    margin-bottom: 15px;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 500;
}

.result-value {
    font-size: 16px;
    color: var(--text-primary);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    padding: 8px;
    background-color: white;
    border-radius: 4px;
    word-break: break-all;
}

/* 代码块 */
.code-block {
    position: relative;
    margin-top: 20px;
}

.code-block pre {
    margin: 0;
    padding: 20px;
    background-color: #f6f8fa;
    border-radius: 6px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.code-block code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 12px;
}

/* 文件上传 */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload:hover {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.file-upload-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 实时时间显示 */
.current-time-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.current-time-display .time {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.current-time-display .timestamp {
    font-size: 18px;
    opacity: 0.9;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* 选项卡 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab:hover {
    color: var(--primary-color);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .menu {
        display: flex;
        overflow-x: auto;
        padding: 0;
    }

    .menu-item {
        white-space: nowrap;
    }

    .content {
        padding: 20px;
    }

    .logo h1 {
        font-size: 20px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #999;
}

/* 工具提示 */
.info-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* 分割线 */
.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 30px 0;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 14px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== 游戏更新公告样式 ==================== */

/* 统计信息 */
.announcement-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
}

.stat-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
}

/* 公告列表 */
.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.announcement-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.announcement-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.announcement-header {
    margin-bottom: 16px;
}

.announcement-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.announcement-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.version-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.announcement-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.announcement-date,
.announcement-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.announcement-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
}

.announcement-content li {
    list-style: none;
    padding-left: 0;
    margin: 8px 0;
}

/* 无数据提示 */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 15px;
}

/* 错误提示 */
.error-message {
    text-align: center;
    padding: 60px 20px;
}

.error-message p {
    margin: 10px 0;
    color: var(--text-secondary);
}

.error-detail {
    font-size: 13px;
}

.error-message .btn {
    margin-top: 20px;
}

/* 公告预览卡片（列表项）- 紧凑版 */
.announcement-item-preview {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.announcement-item-preview:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
    border-color: var(--primary-color);
    background: #fafbfc;
}

/* 紧凑型头部 */
.announcement-compact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.announcement-title-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.announcement-title-compact {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.version-badge-compact {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 紧凑型元信息 */
.announcement-meta-compact {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.announcement-date-compact,
.announcement-author-compact {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 紧凑型摘要 */
.announcement-summary-compact {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-left: 0;
}

/* 公告详情 */
.announcement-detail {
    width: 100%;
}

.back-btn {
    margin-bottom: 20px;
}

.announcement-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.back-btn-inline {
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 14px;
}

.announcement-item-detail {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 20px 0;
    box-shadow: none;
}

.announcement-item-detail .announcement-title {
    font-size: 24px;
    margin: 0;
    flex: 1;
}

.announcement-content-full {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    margin-top: 20px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border-left: none;
}

/* ==================== 移动端头部栏 ==================== */

/* 默认隐藏移动端头部（PC端） */
.mobile-header {
    display: none;
    visibility: hidden;
    position: absolute;
    top: -9999px;
    left: -9999px;
}

.mobile-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
}

.mobile-logo h1 {
    font-size: 20px;
    color: var(--text-primary);
    margin: 0;
}

/* 汉堡菜单按钮 */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    transition: var(--transition);
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* 汉堡菜单激活状态（变成X） */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==================== PC端样式确保 ==================== */

@media (min-width: 769px) {
    /* 确保PC端移动端元素不显示 */
    .mobile-header {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* 确保PC端遮罩层不显示 */
    .sidebar-overlay {
        display: none !important;
    }
    
    /* 确保PC端侧边栏保持原样 */
    .sidebar {
        position: static !important;
        width: 260px !important;
        height: auto !important;
        left: auto !important;
        top: auto !important;
    }
    
    /* 确保PC端容器保持原样 */
    .container {
        padding-top: 0 !important;
    }
}

/* ==================== 移动端适配优化 ==================== */

@media (max-width: 768px) {
    /* 显示移动端头部 */
    .mobile-header {
        display: block !important;
        visibility: visible !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0;
        z-index: 1000;
        background-color: var(--sidebar-bg);
    }

    /* 整体容器 */
    .container {
        flex-direction: column;
        padding-top: 52px !important; /* 为顶部栏留出空间 */
    }
    
    /* 侧边栏在移动端变为抽屉式 */
    .sidebar {
        position: fixed;
        top: 52px;
        left: -280px; /* 默认隐藏在左侧 */
        width: 280px;
        height: calc(100vh - 52px);
        border-right: 1px solid var(--border-color);
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }

    /* 侧边栏显示状态 */
    .sidebar.active {
        left: 0;
    }

    /* 遮罩层（仅移动端） */
    .sidebar-overlay {
        display: none !important;
        position: fixed;
        top: 52px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block !important;
    }
    
    .logo {
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .subtitle {
        font-size: 12px;
    }
    
    /* 控制按钮 */
    .controls {
        padding: 15px 20px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    /* 菜单恢复为垂直布局 */
    .menu {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 10px 0;
    }
    
    .menu-item {
        flex-shrink: 0;
        min-width: auto;
        padding: 12px 20px;
        font-size: 15px;
        border-left: 3px solid transparent;
    }

    .menu-item:hover {
        background-color: var(--bg-color);
        border-left-color: var(--primary-color);
    }

    .menu-item.active {
        background-color: #e8f4ff;
        border-left-color: var(--primary-color);
        color: var(--primary-color);
    }
    
    .menu-item .icon {
        font-size: 18px;
    }
    
    /* 内容区域 */
    .content {
        width: 100%;
        height: calc(100vh - 52px);
        margin-top: 0;
    }
    
    /* 工具容器 */
    .tool-container {
        padding: 15px;
    }
    
    .tool-header h2 {
        font-size: 20px;
    }
    
    .tool-header .description {
        font-size: 13px;
    }
    
    /* 表单控件 */
    .form-control {
        font-size: 14px;
    }
    
    textarea.form-control {
        min-height: 120px;
    }
    
    /* 按钮 */
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .btn-group {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    /* 时间戳显示 */
    .current-time-display .time {
        font-size: 32px;
    }
    
    .current-time-display .timestamp {
        font-size: 12px;
    }
    
    /* 页脚 */
    .footer {
        padding: 10px;
        font-size: 11px;
    }
    
    /* 公告相关 */
    .announcement-stats {
        flex-direction: column;
        gap: 12px;
    }

    .stat-item {
        padding: 16px;
    }
    
    .announcement-item,
    .announcement-item-preview,
    .announcement-item-detail {
        padding: 16px;
    }
    
    .announcement-title {
        font-size: 18px;
    }
    
    .announcement-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .back-btn-inline {
        width: 100%;
        text-align: center;
    }
    
    .announcement-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    /* 移动端公告卡片优化 */
    .announcement-compact-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .announcement-title-section {
        width: 100%;
    }
    
    .announcement-title-compact {
        font-size: 15px;
        white-space: normal;
    }

    .announcement-meta-compact {
        font-size: 11px;
        width: 100%;
    }
    
    .announcement-summary-compact {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    /* JSON 工具 */
    .json-stats {
        flex-direction: column;
        gap: 10px;
    }
}

/* 超小屏幕适配 (手机竖屏) */
@media (max-width: 480px) {
    /* 移动端头部 */
    .mobile-logo h1 {
        font-size: 18px;
    }

    .mobile-menu-toggle {
        width: 24px;
        height: 24px;
    }

    .mobile-menu-toggle span {
        width: 24px;
        height: 2.5px;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* 侧边栏 */
    .sidebar {
        width: 260px;
        left: -260px;
    }

    .logo h1 {
        font-size: 18px;
    }
    
    .menu {
        padding: 8px 0;
    }
    
    .menu-item {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .tool-header h2 {
        font-size: 18px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .current-time-display .time {
        font-size: 28px;
    }
    
    .result-value {
        font-size: 14px;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 移动端侧边栏滚动优化 */
.sidebar {
    -webkit-overflow-scrolling: touch;
}

/* ==================== JSON 格式化工具样式 ==================== */

.json-info {
    margin-top: 20px;
}

.json-stats {
    display: flex;
    gap: 30px;
    padding: 15px 20px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.json-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.json-stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.json-stat-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.error-text {
    color: #e74c3c;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* ==================== 新工具样式 ==================== */

/* 货币换算器样式 */
.currency-exchange-container {
    width: 100%;
}

/* 实时汇率展示 */
.exchange-rates-display {
    margin-bottom: 30px;
}

.rates-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.rate-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.rate-card:hover {
    transform: translateY(-5px);
}

.rate-flag {
    font-size: 32px;
    margin-bottom: 10px;
}

.rate-name {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.rate-code {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.rate-value {
    font-size: 18px;
    font-weight: bold;
}

.currency-selector-group {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: end;
    margin: 20px 0;
}

.currency-swap-btn {
    display: flex;
    align-items: flex-end;
    padding-bottom: 0;
    margin-bottom: 0;
}

.currency-swap-btn .btn {
    width: 50px;
    height: 50px;
    font-size: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* 计算器样式 */
.calculator-display {
    margin-bottom: 20px;
}

.calculator-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calc-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.calc-btn {
    height: 60px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.calc-btn:active {
    transform: translateY(0);
}

.calc-operator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    font-size: 24px;
}

.calc-operator:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

/* 特殊符号样式 */
.symbol-category {
    margin-bottom: 30px;
}

.symbol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 8px;
}

.symbol-item {
    width: 100%;
    height: 50px;
    border: 1px solid var(--border-color);
    background: var(--content-bg);
    border-radius: 6px;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.symbol-item:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .rates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .rate-card {
        padding: 15px;
    }
    
    .rate-flag {
        font-size: 24px;
    }
    
    .currency-selector-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .currency-swap-btn {
        order: -1;
        padding-bottom: 0;
        justify-content: center;
        margin: 10px 0;
    }
    
    .currency-swap-btn .btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .calc-row {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .calc-btn {
        height: 50px;
        font-size: 16px;
    }
    
    .calc-operator {
        font-size: 20px;
    }
    
    .symbol-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 6px;
    }
    
    .symbol-item {
        height: 40px;
        font-size: 20px;
    }
}


