/* === 全局重置与字体 === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f5f7fa;
  color: #2c3e50;
  line-height: 1.6;
  min-height: 100vh;
}

/* === 主容器 === */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* === 头部 === */
header {
  text-align: center;
  padding: 30px 0 20px;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: white;
  border-radius: 0 0 24px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

header h1 {
  font-size: 2.2rem;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

header p {
  font-size: 0.95rem;
  opacity: 0.85;
}

/* === 面包屑导航 === */
.breadcrumb {
  font-size: 0.9rem;
  margin-bottom: 18px;
  color: #555;
  background: white;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.breadcrumb a {
  color: #007BFF;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* === 工具卡片与区域 === */
.tool-box {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}

textarea {
  width: 100%;
  height: 120px;
  border: 1px solid #dcdfe6;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  resize: vertical;
  background: #fafbfc;
  transition: border 0.2s;
}

textarea:focus {
  outline: none;
  border-color: #007BFF;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.15);
}

button {
  background: linear-gradient(135deg, #007BFF, #0056b3);
  color: white;
  border: none;
  padding: 10px 24px;
  margin: 12px 0;
  border-radius: 30px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,123,255,0.25);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,123,255,0.35);
}

pre#out {
  background: #f8f9fa;
  padding: 14px;
  border-radius: 10px;
  white-space: pre-wrap;
  border: 1px solid #eee;
  min-height: 60px;
  font-family: 'Courier New', monospace;
}

/* === 广告位 === */
.ad {
  text-align: center;
  margin: 20px 0;
  padding: 18px;
  background: #fff;
  border-radius: 16px;
  border: 2px dashed #007BFF;
  color: #007BFF;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

/* === 相关工具推荐 === */
.related {
  background: white;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  margin-top: 20px;
}

.related h3 {
  margin-bottom: 12px;
  color: #333;
}

.related ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.related li a {
  display: inline-block;
  background: #eef2ff;
  color: #1e3a8a;
  padding: 6px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.related li a:hover {
  background: #dbeafe;
}

/* === 工具列表（首页） === */
#tools-list li {
  margin-bottom: 8px;
}

#tools-list a {
  color: #1e3a8a;
  text-decoration: none;
  font-weight: 500;
}

#tools-list a:hover {
  text-decoration: underline;
}

/* === 搜索框 / 分类按钮（首页） === */
#search-box {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #dcdfe6;
  border-radius: 30px;
  font-size: 0.95rem;
  margin-bottom: 16px;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

#category-nav button {
  background: white;
  color: #007BFF;
  border: 1px solid #007BFF;
  margin-right: 8px;
  box-shadow: none;
}

#category-nav button:hover {
  background: #eef2ff;
}

#category-nav button.active {
  background: #007BFF;
  color: white;
}

/* === 热门工具列表 === */
#hot-tools li {
  margin-bottom: 6px;
}

#hot-tools a {
  color: #e67e22;
  font-weight: 600;
  text-decoration: none;
}

/* === 响应式 === */
@media (max-width: 600px) {
  header h1 { font-size: 1.6rem; }
  .related ul { flex-direction: column; }
}
