/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "微软雅黑", sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: auto;
}

body {
  background: #f9fcff;
  color: #333;
  min-height: 100vh;
  position: relative;
}

/* 顶部栏 */
.top-bar {
  background: #ffa91c;
  padding: 12px 20px;
}

.top-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-inner h1 {
  font-size: 18px;
  color: #fff;
}

.status {
  font-size: 14px;
  color: #fff;
  opacity: 0.9;
}

.menu-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: none;
}

/* 运行时长通用样式 */
.running-time {
  color: #fff;
  margin: 0 10px;
  font-size: 14px;
  white-space: nowrap;
}

/* PC 端布局优化 */
@media (min-width: 768px) {
  .top-inner {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .running-time {
    order: 1;
    margin-right: auto;
  }
  h1 {
    order: 2;
  }
  .status {
    order: 3;
    margin-left: auto;
  }
  .menu-btn {
    order: 4;
  }
}

/* 手机端适配 */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    margin-bottom: 20px;
    display: block;
  }
  .menu-btn {
    display: none;
  }
  .tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  .top-inner {
    flex-wrap: wrap;
    gap: 4px;
    flex-direction: column;
    align-items: flex-start;
    flex-direction: column;
  }
  .top-inner h1 {
    align-self: flex-start;
  }
  .running-time, h1, .status {
    align-self: flex-start;
    margin: 0;
    /*margin-bottom: 5px;*/
  }
  .status {
    order: 3;
    width: 100%;
  }
}

/* 主体容器 */
.container {
  max-width: 1200px;
  margin: 20px auto;
  display: flex;
  gap: 20px;
  padding: 0 20px;
  flex-direction: column;
  min-height: calc(100vh - 60px);
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding-bottom: 60px;
  box-sizing: border-box;
}

/* 侧边栏 */
.sidebar {
  width: 220px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar h3 {
  font-size: 16px;
  color: #2c3e50;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.category-list {
  list-style: none;
}

.category-list li {
  padding: 8px 0;
  color: #3498db;
  cursor: pointer;
  transition: 0.2s;
  border-bottom: 2px solid transparent;
}

.category-list li:hover {
  color: #2980b9;
  border-bottom-color: #2980b9;
}

.category-list li.active {
  color: #2980b9;
  font-weight: 600;
  border-bottom-color: #2980b9;
}

.about-txt {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* 内容区 */
.content {
  flex: 1;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tools-header {
  margin-bottom: 20px;
}

.tools-header h2 {
  font-size: 20px;
  color: #2c3e50;
  margin-bottom: 8px;
}

.tools-header p {
  font-size: 14px;
  color: #666;
}

/* 工具卡片（核心修复区） */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.tool-card {
  text-decoration: none;
  z-index: 10;
}

.card-inner {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: 0.3s;
  cursor: pointer;
}

.card-inner:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-inner img {
  width: 60px;
  height: 60px;
  margin-bottom: 12px;
  border-radius: 8px;
}

.card-inner span {
  display: block;
  font-size: 14px;
  color: #2c3e50;
  font-weight: 500;
}

/* 开发中提示 */
.coming-soon .card-inner {
  cursor: not-allowed;
  opacity: 0.8;
}

/* 页脚 */
.site-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #eee;
  z-index: 99;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 20px;
  text-align: center;
  font-size: 14px;
  color: #666;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: row;
    gap: 10px;
    padding: 8px 15px;
  }
}
