/* 全局样式重置 */
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:微软雅黑,system-ui,-apple-system,sans-serif;background:#f4f6f8;padding:20px;color:#333}

/* 主容器 - 单独使用时 */
.box{
  max-width:900px;
  margin:0 auto;
  background:#fff;
  border-radius:12px;
  box-shadow:0 4px 20px rgba(0,0,0,0.08);
  overflow:hidden;
}

/* ============ 主页面布局 ============ */
.main-wrapper{
  display: flex;
  flex-direction: row;
  gap: 24px;
  max-width: 1300px;
  margin: 0 auto;
  align-items: flex-start;
  width: 100%;
}

/* 左侧工具区域 */
.main-wrapper .box{
  flex: 1;
  min-width: 0;
  max-width: none;
  margin: 0;
}

/* 右侧侧边栏 */
.main-wrapper .sidebar{
  flex: 0 0 360px;
  width: 360px;
}

/* 侧边栏 */
.sidebar{
  width:360px;
  flex-shrink:0;
  background:#fff;
  border-radius:12px;
  box-shadow:0 4px 20px rgba(0,0,0,0.08);
  overflow:hidden;
}
.sidebar-header{
  background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding:18px 22px;
}
.sidebar-header h3{
  margin:0;
  color:#fff;
  font-size:16px;
  font-weight:600;
}
.related-links{
  padding:16px;
}
.loading-text{
  text-align:center;
  color:#999;
  padding:24px;
  font-size:14px;
}
.related-link-item{
  display:flex;
  gap:12px;
  padding:12px;
  border-bottom:1px solid #f0f1f5;
  text-decoration:none;
  transition:all 0.2s;
  border-radius:8px;
}
.related-link-item:hover{
  background:#f8f9fa;
  transform:translateX(4px);
}
.related-link-item:last-child{
  border-bottom:none;
}
.related-link-item .link-img{
  width:70px;
  height:70px;
  flex-shrink:0;
  border-radius:6px;
  object-fit:cover;
  background:#f0f1f5;
}
.related-link-item .link-content{
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
}
.related-link-item .link-title{
  color:#333;
  font-size:14px;
  font-weight:500;
  line-height:1.4;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.related-link-item .link-url{
  color:#999;
  font-size:12px;
  margin-top:4px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* 头部区域 */
.header{background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);padding:28px;text-align:center;position:relative}
.header h1{color:#fff;font-size:28px;margin:0;display:flex;align-items:center;justify-content:center;gap:12px;font-weight:600}
.header-icon{font-size:36px}

/* 内容区域 */
.content{padding:28px}

/* 标题样式 */
h1{text-align:center;margin-bottom:22px;font-size:24px;color:#222;font-weight:600}

/* 表单元素 */
input, textarea, select{
  padding:13px 16px;
  border:1px solid #e5e6eb;
  border-radius:8px;
  font-size:14px;
  background:#fff;
  transition:all 0.25s;
}
input:focus, textarea:focus, select:focus{
  outline:none;
  border-color:#667eea;
  box-shadow:0 0 0 3px rgba(102,126,234,0.15)
}
textarea{resize:vertical;font-family:Consolas,Monaco,monospace}

/* 按钮样式 */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:13px 28px;
  background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color:#fff;
  border:none;
  border-radius:10px;
  cursor:pointer;
  font-size:15px;
  font-weight:500;
  transition:all 0.25s;
  box-shadow:0 4px 12px rgba(102,126,234,0.35)
}
.btn:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(102,126,234,0.45)
}
.btn:active{transform:translateY(0)}
.btn-secondary{
  background:#f0f1f5;
  color:#555;
  box-shadow:none
}
.btn-secondary:hover{
  background:#e4e6eb;
  box-shadow:none;
  transform:none
}

/* 居中容器 */
.content-center{text-align:center}

/* 按钮组 */
.btn-group{display:flex;gap:14px;justify-content:center;margin-top:20px;flex-wrap:wrap}

/* 结果区域 */
.result{margin-top:22px;padding:18px;background:#f8f9fa;border-radius:10px;border:1px solid #e9ecef}
.result pre{white-space:pre-wrap;font-family:Consolas,Monaco,monospace;font-size:14px;color:#333;line-height:1.6}

/* 工具介绍区域 */
.tool-desc-bottom{
  margin-top:28px;
  padding:22px;
  background:#fafbfc;
  border:1px solid #f0f1f5;
  border-radius:10px;
  color:#444;
  text-align:left;
}
.tool-desc-bottom h3{
  margin:0 0 14px 0;
  font-size:16px;
  color:#222;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:8px;
}
.tool-desc-bottom h4{
  margin:18px 0 10px 0;
  font-size:14px;
  color:#333;
  font-weight:600;
}
.tool-desc-bottom .intro{
  color:#555;
  line-height:1.8;
  font-size:14px;
}
.tool-desc-bottom .usage{
  color:#666;
  line-height:1.8;
  font-size:14px;
}

/* 表格样式 */
table{width:100%;border-collapse:collapse;margin-top:15px}
table th, table td{padding:12px;border:1px solid #e5e6eb;text-align:left;font-size:14px}
table th{background:#f8f9fa;font-weight:600;color:#333}

/* 列表样式 */
ul, ol{padding-left:22px;margin:12px 0}
li{margin:8px 0;font-size:14px;color:#444}

/* Tab标签样式 */
.tab-container {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.tab {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}
.tab.active {
    color: #2d8cf0;
    border-bottom-color: #2d8cf0;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* 响应式适配 */
@media(max-width:1200px){
  .main-wrapper{
    flex-direction:column;
  }
  .sidebar{
    width:100%;
  }
  .box{
    width:100%;
    max-width:100%;
  }
}
@media(max-width:600px){
  .box{margin:0 10px;border-radius:10px}
  .content{padding:20px}
  h1{font-size:20px}
  .header h1{font-size:22px}
  input, textarea, select{width:100%;margin-bottom:10px}
  .btn{width:100%;padding:14px}
  .btn-group{flex-direction:column}
}