/* ========== 全局 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "宋体", sans-serif;
  background-color: #f5f5f5;
  color: #333;
  min-height: 100vh;
}

/* ========== 导航栏 ========== */
.nav-bar {
  background-color: #8b0000;
  color: #fff;
  text-align: center;
  padding: 14px 0;
  font-size: 18px;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ========== 容器 ========== */
.container {
  max-width: 500px;
  margin: 0 auto;
  padding: 12px;
}

/* ========== 时间信息区 ========== */
.time-section {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.time-item {
  font-size: 13px;
  line-height: 1.9;
  color: #555;
}

.time-item .label {
  color: #8b0000;
  font-weight: bold;
}

/* ========== 模式切换 ========== */
.mode-section {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.mode-btn {
  flex: 1;
  padding: 10px 0;
  border: 2px solid #8b0000;
  background: #fff;
  color: #8b0000;
  font-size: 15px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn.active {
  background: #8b0000;
  color: #fff;
}

.mode-btn:hover {
  opacity: 0.85;
}

/* ========== 输入区 ========== */
.input-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.input-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.input-row label {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  min-width: 48px;
  white-space: nowrap;
}

.input-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.input-row input:focus {
  border-color: #8b0000;
}

.start-btn {
  width: 100%;
  padding: 12px 0;
  background: #8b0000;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s;
}

.start-btn:hover {
  background: #a00000;
}

.start-btn:active {
  background: #6b0000;
}

/* ========== 当前时辰显示栏 ========== */
.current-shichen-row {
  transition: all 0.3s;
}

.shichen-display {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  background-color: #f9f9f9;
  color: #8b0000;
  font-weight: bold;
  letter-spacing: 1px;
}

/* ========== 六宫排盘区 ========== */
.gong-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.section-title {
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  color: #8b0000;
  margin-bottom: 14px;
  letter-spacing: 4px;
}

.gong-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gong-card {
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  transition: all 0.25s;
  position: relative;
  min-height: 120px;
}

.gong-card.active-day {
  border-color: #1a73e8;
  background: #e8f0fe;
}

.gong-card.active-hour {
  border-color: #d93025;
  background: #fce8e6;
}

.gong-card.active-both {
  border-color: #8b0000;
  background: #fff3e0;
  box-shadow: 0 0 8px rgba(139,0,0,0.3);
}

.gong-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
}

.gong-wuxing {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}

.gong-tiangan, .gong-dizhi {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}

.gong-liushen {
  font-size: 12px;
  color: #6a1b9a;
  margin-top: 2px;
}

.gong-liuqin {
  font-size: 12px;
  color: #e65100;
  font-weight: bold;
  margin-top: 2px;
}

.gong-star {
  font-size: 12px;
  color: #0277bd;
  margin-top: 2px;
}

.gong-mark {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 4px;
  color: #fff;
}

.mark-day {
  background: #1a73e8;
}

.mark-hour {
  background: #d93025;
}

.mark-both {
  background: #8b0000;
}

/* 五行颜色 */
.wx-wood { color: #2e7d32; }
.wx-fire  { color: #c62828; }
.wx-earth { color: #795548; }
.wx-metal { color: #f9a825; }
.wx-water { color: #1565c0; }

/* ========== 结果区 ========== */
.result-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.result-content {
  font-size: 14px;
  line-height: 2;
  color: #333;
}

.result-content .highlight {
  color: #8b0000;
  font-weight: bold;
  font-size: 16px;
}

.result-content .info-line {
  padding: 2px 0;
  border-bottom: 1px dashed #eee;
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  text-align: center;
  max-width: 80%;
}

/* ========== 底部说明样式 ========== */
.footer-tips {
    margin-top: 60rpx;
    padding: 20rpx 20rpx 60rpx; /* 底部留白多一点，防止被手机底部的横条挡住 */
    text-align: center;
    border-top: 1rpx solid #eee; /* 顶部加一条淡淡的分割线 */
  }
  
  .footer-line {
    font-size: 22rpx;
    color: #999999;
    line-height: 1.8;
    letter-spacing: 1rpx;
  }