.json-sticky-headers-container {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
}
.interactive-json-container {
    height: 100%;
    width: 100%;
    overflow: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    background-color: #ffffff;
    color: #333333;
    position: relative;
}

.json-lines {
    display: flex;
    flex-direction: column;
}

.json-lines-virtual {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.json-line {
    display: flex;
    min-height: 22px;
    height: 24px;
    transition: background-color 0.1s ease;
}

.json-line:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.json-line-hidden {
    display: none;
}

/* Sticky行样式 */
.json-line-sticky-candidate {
    position: sticky;
    z-index: 10;
}

.json-line-sticky-candidate.stuck-cancel {
    position: static !important;
    z-index: auto !important;
}

/* 多级sticky的top位置和z-index层级 */
.json-line-sticky-candidate[data-indent="0"] {
    top: 0;
    z-index: 50;
}

.json-line-sticky-candidate[data-indent="1"] {
    top: 24px;
    z-index: 49;
}

.json-line-sticky-candidate[data-indent="2"] {
    top: 48px;
    z-index: 48;
}

.json-line-sticky-candidate[data-indent="3"] {
    top: 72px;
    z-index: 47;
}

.json-line-sticky-candidate[data-indent="4"] {
    top: 96px;
    z-index: 46;
}

.json-line-sticky-candidate[data-indent="5"] {
    top: 120px;
    z-index: 45;
}

.json-line-sticky-candidate[data-indent="6"] {
    top: 144px;
    z-index: 44;
}

.json-line-sticky-candidate[data-indent="7"] {
    top: 168px;
    z-index: 43;
}

.json-line-sticky-candidate[data-indent="8"] {
    top: 192px;
    z-index: 42;
}

.json-line-sticky-candidate[data-indent="9"] {
    top: 216px;
    z-index: 41;
}

.json-line-sticky-candidate[data-indent="10"] {
    top: 240px;
    z-index: 40;
}

.json-line-sticky-candidate[data-indent="11"] {
    top: 264px;
    z-index: 39;
}

.json-line-sticky-candidate[data-indent="12"] {
    top: 288px;
    z-index: 38;
}

.json-line-sticky-candidate[data-indent="13"] {
    top: 312px;
    z-index: 37;
}

.json-line-sticky-candidate[data-indent="14"] {
    top: 336px;
    z-index: 36;
}

.json-line-sticky-candidate[data-indent="15"] {
    top: 360px;
    z-index: 35;
}

/* 确保sticky行的内容区域也有背景 */
.json-line-sticky-candidate.stuck .line-content {
    background-color: #ffffff;
}

/* 最下面的吸顶元素添加特殊阴影 */
.json-line-sticky-candidate.stuck.last-stuck {
    box-shadow: 0 0px 10px #ccc;
}


.line-number {
    width: 60px;
    min-width: 60px;
    padding: 2px 4px;
    text-align: right;
    color: #666666;
    font-size: 12px;
    user-select: none;
    background-color: #f8f8f8;
    border-right: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

.line-number-text {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.fold-toggle {
    cursor: pointer;
    color: #666666;
    font-size: 10px;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: background-color 0.1s ease;
}

.fold-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.line-content {
    flex: 1;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    position: relative;
    white-space: pre;
}

/* JSON语法高亮 - 白色背景风格 */
.json-null {
    color: #0066cc;
}

.json-boolean {
    color: #0066cc;
}

.json-number {
    color: #008000;
}

.json-string {
    color: #cc6600;
}

.json-key {
    color: #0066cc;
}

.json-index {
    color: #0066cc;
    user-select: none;
}

.json-bracket {
    color: #333333;
}

.json-bracket-text {
    color: #333333;
}

.json-comma {
    color: #333333;
}

.json-count {
    color: #666666;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .interactive-json-container {
        font-size: 12px;
    }
    
    .line-number {
        width: 40px;
        min-width: 40px;
        font-size: 10px;
    }
    
    .line-content {
        padding: 2px 4px;
    }
    
    .fold-toggle {
        width: 10px;
        height: 10px;
        font-size: 8px;
    }
}

/* 滚动条样式 */
.interactive-json-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.interactive-json-container::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.interactive-json-container::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 4px;
}

.interactive-json-container::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

/* 选择文本时的样式 */
.json-line::selection {
    background-color: #b3d4fc;
}

.line-number::selection {
    background-color: transparent;
}

/* 截断提示样式 */
.json-comment {
    color: #888;
    font-style: italic;
    background-color: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #ffeaa7;
    font-size: 12px;
    user-select: none;
}

/* 虚拟滚动模式下的sticky行样式 */
.json-line-sticky-virtual .line-number {
    background-color: #f8f8f8;
}

.json-line-sticky-virtual .line-content {
    background-color: #ffffff;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    .json-sticky-headers-container {
        display: none;
    }
}
.json-formatter {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
}

.json-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e1e4e8;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.json-header h1 {
  margin: 0;
  color: #24292e;
  font-size: 24px;
}

.json-content {
  display: flex;
  flex: 1;
  height: 100%;
  min-height: 500px;
  overflow: hidden;
}

.json-input-section,
.json-output-section {
  display: flex;
  flex-direction: column;
  padding: 0;
  min-width: 0; /* 防止flex子元素溢出 */
  will-change: width; /* 提示浏览器优化宽度变化 */
}

.json-resizer {
  width: 4px;
  background: #e1e4e8;
  cursor: col-resize;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
  will-change: background-color; /* 提示浏览器优化背景色变化 */
  user-select: none; /* 防止选中文本 */
}

.json-resizer:hover {
  background: #0366d6;
}

.json-input-section {
  border: 1px solid #e1e4e8;
  border-radius: 8px 0 0 8px;
  background: white;
  overflow: hidden;
}

.json-output-section {
  border: 1px solid #e1e4e8;
  border-left: none;
  border-radius: 0 8px 8px 0;
  background: white;
  overflow: hidden;
  position: relative;
}

.json-output-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: white;
  border-bottom: 1px solid #e1e4e8;
  position: sticky;
  top: 0;
  z-index: 10;
}

.json-output-toolbar-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.json-output-toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.json-input-section h3 {
  margin: 0;
  color: #24292e;
  font-size: 18px;
  padding: 20px 20px 15px 20px;
  border-bottom: 1px solid #e1e4e8;
  background: white;
  display: none;
}

.json-input {
  flex: 1;
  height: 100%;
  padding: 15px;
  border: none;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  outline: none;
  background: #fafbfc;
  overflow-y: auto;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.json-input:focus {
  border-color: #0366d6;
  box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

.json-output-container {
  flex: 1;
  height: 100%;
  width: 100%;
  border: none;
  background: #fafbfc;
  display: flex;
  position: relative;
  overflow: hidden;
}

.json-text-container {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: auto;
}

.line-numbers {
  background: #f6f8fa;
  border-right: 1px solid #d1d5db;
  padding: 15px 8px 15px 8px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.4;
  color: #6a737d;
  user-select: none;
  min-width: 50px;
  text-align: right;
  flex-shrink: 0;
  box-sizing: border-box;
}

.json-output {
  flex: 1;
  padding: 15px 15px 15px 8px;
  margin: 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre;
  word-wrap: break-word;
  box-sizing: border-box;
}

.json-output.collapsed {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-x: auto;
  overflow-y: hidden;
}

.json-code {
  color: #24292e;
}

.json-error {
  color: #d73a49;
  font-weight: bold;
}

.json-error-container {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* JSON语法高亮 */
.json-string {
  color: #3ab54a;
}

.json-number {
  color: #25aae2;
}

.json-boolean {
  color: #e36209;
  font-weight: bold;
}

.json-null {
  color: #f1592a;
  font-weight: bold;
}

.json-key {
  color: #92278f;
}



/* JSON占位符样式 */
.json-placeholder {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999999;
  font-size: 14px;
  background-color: #f8f8f8;
  border: 1px dashed #cccccc;
  border-radius: 4px;
  margin: 10px;
}

.json-placeholder p {
  margin: 0;
  text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .json-header {
    padding: 15px;
  }

  .json-header h1 {
    font-size: 20px;
  }

  .json-content {
    flex-direction: column;
    height: 100%;
  }

  .json-input-section,
  .json-output-section {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
  }

  .json-input-section {
    border-right: none;
    border-bottom: 1px solid #e1e4e8;
  }

  .json-input {
    height: 100%;
  }

  .json-output-container {
    height: 100%;
  }

  .json-output-toolbar {
    padding: 8px 15px;
  }

  .json-output-toolbar-left,
  .json-output-toolbar-right {
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .json-header h1 {
    font-size: 18px;
  }

  .json-content {
    height: 100%;
  }

  .json-input {
    height: 100%;
  }

  .json-output-container {
    height: 100%;
  }

  .json-output-toolbar {
    padding: 6px 12px;
  }
}

/* ============================================
   移动端响应式样式
   ============================================ */

/* 平板和移动设备 (768px 及以下) */
@media (max-width: 768px) {
    /* 头部标题 */
    .json-header {
        padding: 10px 15px;
    }

    .json-header h1 {
        font-size: 18px;
    }

    /* 主体内容区域 - 改为垂直布局 */
    .json-content {
        flex-direction: column;
        min-height: auto;
    }

    /* 输入输出区域 */
    .json-input-section,
    .json-output-section {
        width: 100% !important;
        min-height: 300px;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .json-output-section {
        border-left: 1px solid #e1e4e8;
    }

    /* 隐藏拖动条 */
    .json-resizer {
        display: none;
    }

    /* 工具栏按钮 */
    .json-output-toolbar {
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .json-output-toolbar-left,
    .json-output-toolbar-right {
        gap: 6px;
        flex-wrap: wrap;
    }

    /* 时间戳显示 */
    .timestamp-display {
        padding: 3px 8px;
        font-size: 11px;
        margin-right: 0;
        width: 100%;
        justify-content: center;
    }

    /* 输入输出标题 */
    .json-input-section h3 {
        padding: 12px 15px 10px 15px;
        font-size: 16px;
    }

    /* 文本区域和输出容器 */
    .json-input,
    .json-output-container {
        font-size: 12px;
        padding: 10px;
    }

    .json-input {
        min-height: 200px;
    }
}

/* 小屏幕移动设备 (480px 及以下) */
@media (max-width: 480px) {
    .json-header h1 {
        font-size: 16px;
    }

    .json-input-section,
    .json-output-section {
        min-height: 250px;
    }

    /* 输入输出区域 */
    .json-input,
    .json-output-container {
        font-size: 11px;
        padding: 8px;
    }

    .json-input {
        min-height: 180px;
    }
}

/* 全局样式重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue',
    'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC',
    'WenQuanYi Micro Hei', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

/* 响应式设计 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: calc(100vh - 80px);
  height: calc(100vh - 80px);
}

.container.full-width {
  max-width: none;
  padding: 0 30px;
  margin: 0;
  min-height: calc(100vh - 80px);
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .container.full-width {
    padding: 0;
  }
}

/* 工具卡片样式 */
.tool-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.tool-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.tool-description {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .tool-card {
    padding: 16px;
  }

  .tool-title {
    font-size: 16px;
  }

  .tool-description {
    font-size: 13px;
  }
}

/* 工具网格布局 */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

@media (max-width: 768px) {
  .tool-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px 0;
  }
}

/* 页面标题 */
.page-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin: 40px 0 20px;
  color: #1a1a1a;
}

@media (max-width: 768px) {
  .page-title {
    font-size: 24px;
    margin: 30px 0 16px;
  }
}

/* 导航栏 */
.navbar {
  background: white;
  padding: 16px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-container.full-width {
  max-width: none;
  padding: 0 30px;
  margin: 0;
}

.nav-brand {
  font-size: 24px;
  font-weight: 700;
  color: #007bff;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-link {
  color: #666;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #007bff;
}

.nav-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 15px;
  }

  .nav-brand {
    font-size: 20px;
  }

  .nav-title {
    display: none;
  }

  .nav-links {
    gap: 16px;
  }
}


/* 按钮基础样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #374151;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  user-select: none;
  white-space: nowrap;
  min-height: 32px;
  line-height: 1;
  vertical-align: middle;
}

.btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

/* 输入框切换按钮特殊样式 */
.btn-input-toggle {
  background: #0fd59d !important;
  border-color: #0fd59d !important;
  color: white !important;
}

.btn-input-toggle:hover {
  background: #0bc085 !important;
  border-color: #0bc085 !important;
  color: white !important;
}

.btn-input-toggle svg path {
  fill: white !important;
}

/* 时间戳显示样式 */
.timestamp-display {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0f9ff;
  border: 1px solid #0ea5e9;
  border-radius: 6px;
  padding: 4px 10px;
  margin-right: 8px;
  font-size: 12px;
}

.timestamp-label {
  color: #0369a1;
  font-weight: 500;
}

.timestamp-value {
  color: #0c4a6e;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-weight: 600;
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background: #0366d6;
  color: white;
  border-color: #0366d6;
}

.btn-primary:hover {
  background: #0256cc;
  border-color: #0256cc;
}

.btn-danger {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

.btn-danger:hover {
  background: #c82333;
  border-color: #c82333;
}

.btn-success {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

.btn-success:hover {
  background: #218838;
  border-color: #1e7e34;
}

.btn-warning {
  background: #fbbf24;
  color: white;
  border-color: #fbbf24;
}

.btn-warning:hover {
  background: #f59e0b;
  border-color: #f59e0b;
}

.btn-warning svg {
  fill: white !important;
}

.btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
  vertical-align: middle;
}

.btn span {
  font-size: 11px;
  line-height: 12px;
  vertical-align: middle;
}

/* 复选框样式 */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #374151;
  margin: 0;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
}

/* 工具详情页 */
.tool-detail {
  background: white;
  border-radius: 12px;
  padding: 32px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tool-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.tool-name {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.tool-summary {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
}

.tool-content {
  margin-top: 24px;
}

@media (max-width: 768px) {
  .tool-detail {
    padding: 20px;
    margin: 16px 0;
  }

  .tool-name {
    font-size: 24px;
  }

  .tool-summary {
    font-size: 15px;
  }
}


/* 响应式设计 */
@media (max-width: 768px) {

  .btn {
    padding: 4px 8px;
    font-size: 11px;
    min-height: 28px;
  }

  .btn svg {
    width: 12px;
    height: 12px;
  }

  .btn span {
    font-size: 10px;
  }
}

@media (max-width: 480px) {

  .btn {
    padding: 3px 6px;
    font-size: 10px;
    min-height: 24px;
  }

  .btn svg {
    width: 10px;
    height: 10px;
  }

  .btn span {
    font-size: 9px;
  }

  .checkbox-label {
    font-size: 12px;
  }
}

/* ============================================
   移动端响应式样式
   ============================================ */

/* 平板和移动设备 (768px 及以下) */
@media (max-width: 768px) {
    /* 按钮样式调整 */
    .btn {
        padding: 5px 8px;
        font-size: 11px;
        min-height: 28px;
        gap: 3px;
    }

    .btn svg {
        width: 12px;
        height: 12px;
    }

    .btn span {
        font-size: 10px;
    }
}

/* 小屏幕移动设备 (480px 及以下) */
@media (max-width: 480px) {

    /* 进一步缩小按钮 */
    .btn {
        padding: 4px 6px;
        font-size: 10px;
        min-height: 26px;
    }

    .btn svg {
        width: 11px;
        height: 11px;
    }

    .btn span {
        font-size: 9px;
    }
}

