/* ========== 六壬样式 ========== */
/* 注意：公共样式已在 common-style.css 中定义 */

/* 六壬独立页面容器 */
.container {
  width: 380px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: none;
  overflow-x: hidden;
}

.display-section {
  padding: 10px;
  margin: 5px auto;
  max-width: 360px;
  box-sizing: border-box;
}

#display {
  font-size: 14px;
  white-space: pre;
  color: #000000;
  padding: 0;
  text-align: center;
  line-height: 1.5;
}

#display h2 {
  font-size: 14px;
  margin: 10px 0 6px 0;
  color: #000000;
  font-weight: 400;
  text-align: center;
  letter-spacing: 1px;
}

#display table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px auto;
  font-size: 15px;
}

#display table th,
#display table td {
  padding: 5px 5px;
  text-align: center;
}

#display table th {
  font-weight: 400;
  color: #000000;
}

/* Vue 组件样式 */
.liuren-result {
  text-align: center;
}

.datetime-card {
  margin-bottom: 15px;
  padding: 12px;
  background: none;
  border: 1px solid #222;
  border-radius: 0;
  color: #111;
}

.datetime-text {
  font-size: 15px;
  color: #000000;
  font-weight: 500;
}

.info-row {
  display: flex;
  justify-content: flex-start;
  gap: 15px;
  margin-bottom: 0px;
  margin-top: 0px;
}

.info-item {
  font-size: 10px;
  padding: 2px 4px;
  color: #333;
  text-align: left;
}

.info-item .label {
  color: #333;
  font-weight: 400;
}

.info-item .value {
  color: #333;
  font-weight: 500;
  letter-spacing: 0px;
}

.section {
  margin-bottom: 5px;
  padding: 5px;
  background: none;
  border-radius: 0;
  border: 1px dashed #ccc;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 15px;
  margin: 0 0 12px 0;
  color: #8b7355;
  font-weight: 600;
  text-align: center;
  letter-spacing: 1px;
  text-transform: none;
}

.basic-section {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  border: none;
  border-radius: 4px;
  padding: 0 10px;
  gap: 35px;
}

.basic-info {
  text-align: center;
  margin-top: 0;
  padding-top: 0;
}

.basic-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 360px;
  margin: 0 auto;
  padding: 0 20px;
}

.sizhu-section {
  flex: 0 0 40%;
  text-align: left;
  border: none;
  border-radius: 4px;
  padding: 0 5px 0 15px;
}

.info-section {
  flex: 0 0 60%;
  border: none;
  border-radius: 4px;
  padding: 0 0 0 5px;
  height: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.basic-info .info-row {
  margin-bottom: 2px;
}

.basic-info .sizhu-grid {
  margin-bottom: 0;
}

.xunkong-info {
  text-align: center;
  margin-bottom: 0;
  font-size: 11px;
  color: #333;
  padding: 2px 4px;
  font-weight: 400;
}

.course-type {
  text-align: center;
  font-size: 19px;
  color: #000000;
  margin-bottom: 8px;
  font-weight: 600;
  text-shadow: none;
  position: relative;
}

.sizhu-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 1px;
  margin-top: 0;
  padding-top: 0;
}

.sizhu-label {
  text-align: center;
  font-size: 14px;
  color: #333;
  font-weight: 400;
}

.sizhu-grid {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1px;
}

.sizhu-grid .tiangan,
.sizhu-grid .dizhi {
  width: 25%;
  text-align: center;
}

.sizhu-item {
  font-size: 13px;
  text-align: center;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  border-radius: 0;
}

.sizhu-item .tiangan,
.sizhu-item .dizhi {
  color: #000000;
  font-weight: 600;
  font-size: 14px;
  font-family: 'HuiwenMingchao', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.sanchuan-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
  align-items: center;
}

.sanchuan-item {
  font-size: 12px;
  text-align: center;
  padding: 4px 2px;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  gap: 1px;
  width: 180px;
  background: none;
  border-radius: 0;
  border: none;
}

.sanchuan-item > div {
  margin-bottom: 0;
}

.transmission {
  color: #000000;
  font-size: 11px;
  font-weight: 500;
}

.sike-number {
  color: #000000;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}

.liuqin {
  color: #000000;
  font-weight: 600;
  line-height: 1;
}

.ganzhi {
  color: #000000;
  font-weight: 600;
  font-size: 14px;
  font-family: 'HuiwenMingchao', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1;
}

.shenjiang {
  color: #000000;
  font-weight: 500;
  line-height: 1;
}

/* 四课中的神将字体小一号 */
.sike-item .shenjiang {
  font-size: 12px;
}

.sike-grid {
  display: grid;
  grid-template-columns: repeat(4, 70px);
  gap: 2px;
  justify-content: center;
  align-items: stretch;
}

.sike-item {
  font-size: 13px;
  text-align: center;
  padding: 1px 0px;
  background: none;
  border-radius: 0;
  border: none;
  height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sike-item > div {
  margin-bottom: 2px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sike-item .tianpan,
.sike-item .dipan {
  color: #000000;
  font-weight: 600;
  font-size: 14px;
  font-family: 'HuiwenMingchao', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1;
}

.tiandipan-container {
  margin-bottom: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.course-type-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #FFFCF5;
  padding: 10px 15px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  color: #000000;
  text-align: center;
  z-index: 10;
}

.course-type-overlay .course-info {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 2px;
}

.course-type-overlay .course-type {
  font-size: 14px;
  font-weight: 400;
}

/* 天地盘外围下侧：昼贵 / 夜贵 / 昼夜 切换
   不依赖相邻兄弟，避免弹窗挂载后样式失效 */
.liuren-result .helpman-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 6px auto 2px;
  width: 280px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.liuren-result .helpman-switch button {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  padding: 2px 4px;
  font-size: 10px;
  line-height: 1.2;
  color: #999;
  cursor: pointer;
  font-weight: 400;
}

.liuren-result .helpman-switch button:hover {
  color: #333;
}

.liuren-result .helpman-switch button.active {
  color: #c0392b;
  font-weight: 600;
}

.tiandipan-grid {
  display: grid;
  grid-template-columns: repeat(4, 70px);
  grid-template-rows: repeat(4, 70px);
  gap: 1px;
  background: none;
  padding: 1px;
  border-radius: 0;
  overflow: hidden;
  border: none;
  position: relative;
}

/* 三传四课天地盘虚线框：右上角内侧隐形热区（九宗门） */
.sanchuan-tiandi-section {
  position: relative;
}
.jiuzong-open-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 6;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  color: transparent;
  font-size: 0;
  line-height: 0;
}
.jiuzong-open-btn.visible {
  color: #8a6d3b;
  font-size: 12px;
  font-weight: 600;
  line-height: 28px;
  text-align: center;
}
.jiuzong-open-btn.visible:hover {
  color: #5a4522;
}

/* 四课发三传 · 九宗门 */
.lingqi-lookup-modal .lingqi-lookup-content.jiuzong-content {
  width: min(96vw, 680px);
  max-width: 680px;
  height: min(94dvh, 760px);
  padding: 14px 12px 8px;
}
.jiuzong-title {
  flex: none;
  margin-bottom: 8px;
  color: #4a3a2b;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .1em;
  text-align: center;
}
.jiuzong-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  width: 100%;
  padding: 5px 14px 20px;
  border: 1px solid #e5dccd;
  border-radius: 6px;
  background: #fff;
  text-align: left;
}
.jiuzong-status {
  padding: 42px 0;
  color: #999;
  font-size: 12px;
  text-align: center;
}
.use-huiwen .jiuzong-body,
.use-huiwen .jiuzong-body * {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif !important;
}
.jiuzong-trace {
  padding-top: 8px;
  color: #332b24;
  font-size: 12px;
}
.trace-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 4px;
}
.trace-day-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 110px;
}
.trace-day-labels,
.trace-day-values {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  width: 100%;
  align-items: center;
  text-align: center;
}
.trace-day-labels {
  color: #9a9085;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .04em;
}
.trace-day-values {
  color: #4a3a2b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.trace-day-values b {
  font-weight: 700;
}
.trace-section {
  margin: 0 0 17px;
}
.trace-section h3 {
  margin: 0 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #eadfcd;
  color: #674d31;
  font-size: 13px;
}
.trace-pan-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.trace-pan-col {
  min-width: 0;
}
.trace-pan-sike {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trace-pan-sike .trace-summary {
  width: 100%;
}
.trace-pan-sike .trace-day-block {
  min-width: 0;
  flex: 1;
}
.trace-pan-tiandi {
  flex: 0 0 auto;
  width: 196px;
  margin: 0 auto;
}
.trace-pan-col h3 {
  margin: 0 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eadfcd;
  color: #674d31;
  font-size: 12px;
  text-align: center;
}
.trace-sike {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}
.trace-sike-item {
  padding: 4px 1px 5px;
  border: 1px solid #e5dccd;
  border-radius: 4px;
  background: #fdfaf4;
  text-align: center;
}
.trace-sike-item span {
  display: block;
  margin-bottom: 2px;
  color: #8b7b6a;
  font-size: 9px;
}
.trace-sike-item b {
  display: block;
  line-height: 1.25;
  font-size: 11px;
}
.trace-sike-item .trace-sike-upper {
  margin-bottom: 1px;
}
.trace-tiandipan {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  margin: 0;
}
.trace-tiandipan-cell {
  position: relative;
  min-height: 40px;
  padding: 2px;
  border: 1px solid #e5dccd;
  border-radius: 3px;
  background: #fdfaf4;
}
.trace-tiandipan-cell.empty {
  border-color: transparent;
  background: transparent;
  min-height: 40px;
}
.trace-tiandipan-cell .trace-tp,
.trace-tiandipan-cell .trace-dp {
  position: absolute;
  line-height: 1;
  font-size: 12px;
  font-weight: 500;
}
.trace-tiandipan-cell .trace-tp {
  top: 2px;
  left: 3px;
}
.trace-tiandipan-cell .trace-dp {
  bottom: 2px;
  left: 3px;
}
/* 寄宫天干：格子右下角，颜色随各天干（inline style） */
.trace-tiandipan-cell .trace-jigong-gan {
  position: absolute;
  right: 2px;
  bottom: 2px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}
.trace-tiandipan-cell .trace-jigong-gan i {
  font-style: normal;
}
.trace-tree-down {
  margin: 2px 0 10px;
  padding: 10px 4px 8px;
  overflow-x: auto;
  border: 1px solid #eadfcd;
  border-radius: 5px;
  background: #fdfaf4;
}
.tt-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 0 0 auto;
}
.tt-children {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  position: relative;
  margin: 2px auto 0;
}
/* 父节点下方短竖线 */
.tt-branch > .tt-children::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  height: 10px;
  border-left: 1px solid #dccfb8;
  transform: translateX(-50%);
}
.tt-children > .tt-branch {
  padding-top: 20px;
}
/* 接到横梁的短竖线 */
.tt-children > .tt-branch::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  height: 10px;
  border-left: 1px solid #dccfb8;
  transform: translateX(-50%);
}
/* 横梁：中间节点通长，两端各半 */
.tt-children > .tt-branch::after {
  content: '';
  position: absolute;
  top: 10px;
  height: 0;
  border-top: 1px solid #dccfb8;
}
.tt-children > .tt-branch:first-child:not(:only-child)::after {
  left: 50%;
  right: 0;
}
.tt-children > .tt-branch:last-child:not(:only-child)::after {
  left: 0;
  right: 50%;
}
.tt-children > .tt-branch:not(:first-child):not(:last-child)::after {
  left: 0;
  right: 0;
}
.tt-children > .tt-branch:only-child::after {
  display: none;
}
.tt-start {
  display: block;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8a6a45;
  border: 1px solid #6e5334;
  box-sizing: border-box;
}
.tt-node {
  display: inline-block;
  z-index: 1;
  padding: 5px 3px;
  border: 1px solid #ddd3c3;
  border-radius: 4px;
  background: #fff;
  color: #674d31;
  font-size: 11px;
  line-height: 1.25;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.tt-node.hit {
  font-weight: 700;
}
.tt-node i {
  display: inline;
  margin: 0;
  padding-top: 2px;
  color: #2f6b3a;
  font-style: normal;
  font-weight: 700;
  text-orientation: upright;
}
.trace-note {
  margin: 8px 0 0;
  color: #837568;
  font-size: 10px;
  line-height: 1.65;
}
.trace-decisions {
  margin-top: 9px;
  color: #000;
  font-size: 12px;
  line-height: 1.7;
}
.trace-decisions > div + div {
  margin-top: 5px;
}
.trace-method-flow {
  padding: 8px 9px;
  border: 1px solid #e3d8c7;
  border-radius: 5px;
  background: #fffdf8;
}
.trace-method-heading {
  margin-bottom: 5px;
  color: #6f3e24;
  font-weight: 700;
  line-height: 1.55;
}
.trace-method-step + .trace-method-step {
  margin-top: 3px;
}
.trace-rule {
  margin: 0;
  color: #51473d;
  line-height: 1.75;
}
.trace-code {
  display: block;
  margin: 7px 0;
  padding: 7px 8px;
  overflow-wrap: anywhere;
  border: 1px solid #e3d8c7;
  border-radius: 4px;
  background: #f7f3eb;
  color: #6f3e24;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace !important;
  font-size: 11px;
}
.trace-code.inline {
  display: inline;
  margin: 0;
  padding: 1px 4px;
}
.trace-steps {
  margin: 8px 0 0;
  padding-left: 21px;
}
.trace-steps li {
  margin: 6px 0;
  line-height: 1.65;
}
.trace-compare-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
}
.trace-compare-col {
  flex: 1;
  min-width: 0;
  padding: 6px 4px;
  border: 1px solid #e3d8c7;
  border-radius: 5px;
  background: #fdfaf4;
  text-align: center;
}
.trace-compare-col.result {
  flex: 0 0 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.trace-compare-col.result.ok {
  border-color: #b7d4bc;
  background: #eef7ef;
}
.trace-compare-col.result.bad {
  border-color: #e0c4ba;
  background: #f8efeb;
}
.trace-compare-label {
  margin-bottom: 6px;
  color: #8b7b6a;
  font-size: 10px;
  letter-spacing: .08em;
}
.trace-compare-type {
  margin-top: 6px;
  color: #a13a2d;
  font-size: 10px;
  font-weight: 600;
}
.trace-compare-verdict {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.trace-compare-col.result.ok .trace-compare-verdict {
  color: #2f6b3a;
}
.trace-compare-col.result.bad .trace-compare-verdict {
  color: #8a3a2b;
}
.trace-transmissions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.trace-transmissions.vertical {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.trace-transmissions div {
  padding: 8px 4px;
  border: 1px solid #e3d8c7;
  border-radius: 5px;
  background: #fdfaf4;
  text-align: center;
}
.trace-transmissions.vertical div {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 0;
  border: none;
  background: transparent;
}
.trace-transmissions span {
  display: block;
  margin-bottom: 4px;
  color: #887766;
  font-size: 10px;
}
.trace-transmissions b {
  display: block;
  font-size: 20px;
  line-height: 1.3;
}
.trace-transmissions.vertical b {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
}

.trace-compare-section {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}
.trace-compare-section h3 {
  margin: 0;
  padding: 0;
  border: none;
  white-space: nowrap;
  flex: 0 0 auto;
}
.trace-compare-list {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.trace-compare-item {
  padding: 8px 10px;
  border: 1px solid #e3d8c7;
  border-radius: 5px;
  background: #fdfaf4;
}
.trace-compare-line {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.trace-compare-line.start {
  justify-content: flex-start;
}
.trace-multi-hint {
  color: #8a6d3b;
  font-size: 12px;
  font-weight: 400;
}
.trace-compare-line .trace-compare-label {
  margin-bottom: 0;
}
.trace-transmissions-inline {
  display: flex;
  gap: 4px;
}
.trace-transmissions-inline b {
  display: inline-block;
  font-size: 13px;
  line-height: 1.3;
}
.trace-compare-dict-type {
  color: #000;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.trace-compare-mark {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}
.trace-compare-mark.end {
  margin-left: auto;
  color: #c0392b;
}
.trace-alternative-decision {
  margin-top: 8px !important;
  border-style: dashed;
}
.trace-addition {
  margin-top: 9px;
  padding: 7px 9px;
  border-left: 3px solid #ccb992;
  background: #faf7f1;
  color: #5e5145;
  line-height: 1.7;
}

.grid-cell {
  padding: 2px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  border: 1px solid #222;
  font-size: 11px;
  color: #000000;
}

.grid-cell.empty {
  background: transparent;
  box-shadow: none;
  border: none;
  visibility: hidden;
}

.course-type-cell {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-type-text {
  font-size: 13px;
  color: #000000;
  font-weight: 600;
  text-align: center;
}

.grid-cell > div {
  margin-bottom: 3px;
}

.grid-cell .shenjiang,
.grid-cell .dipan {
  color: #000000;
}

.grid-cell .tianpan {
  color: #000000;
  font-weight: 600;
  font-size: 14px;
  font-family: 'HuiwenMingchao', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}



/* 五行颜色定义 */
.color-mode .sizhu-item .tiangan.甲,
.color-mode .sizhu-item .tiangan.乙,
.color-mode .sanchuan-item .tiangan.甲,
.color-mode .sanchuan-item .tiangan.乙,
.color-mode .grid-cell .tiangan.甲,
.color-mode .grid-cell .tiangan.乙,
.color-mode .sike-item .tiangan.甲,
.color-mode .sike-item .tiangan.乙,
.color-mode .sizhu-item .dizhi.寅,
.color-mode .sizhu-item .dizhi.卯,
.color-mode .sanchuan-item .dizhi.寅,
.color-mode .sanchuan-item .dizhi.卯,
.color-mode .grid-cell .dizhi.寅,
.color-mode .grid-cell .dizhi.卯,
.color-mode .sike-item .dizhi.寅,
.color-mode .sike-item .dizhi.卯 {
  color: #4CAF50 !important; /* 木 - 绿色 */
}

.color-mode .sizhu-item .tiangan.丙,
.color-mode .sizhu-item .tiangan.丁,
.color-mode .sanchuan-item .tiangan.丙,
.color-mode .sanchuan-item .tiangan.丁,
.color-mode .grid-cell .tiangan.丙,
.color-mode .grid-cell .tiangan.丁,
.color-mode .sike-item .tiangan.丙,
.color-mode .sike-item .tiangan.丁,
.color-mode .sizhu-item .dizhi.巳,
.color-mode .sizhu-item .dizhi.午,
.color-mode .sanchuan-item .dizhi.巳,
.color-mode .sanchuan-item .dizhi.午,
.color-mode .grid-cell .dizhi.巳,
.color-mode .grid-cell .dizhi.午,
.color-mode .sike-item .dizhi.巳,
.color-mode .sike-item .dizhi.午 {
  color: #F44336 !important; /* 火 - 红色 */
}

.color-mode .sizhu-item .tiangan.戊,
.color-mode .sizhu-item .tiangan.己,
.color-mode .sanchuan-item .tiangan.戊,
.color-mode .sanchuan-item .tiangan.己,
.color-mode .grid-cell .tiangan.戊,
.color-mode .grid-cell .tiangan.己,
.color-mode .sike-item .tiangan.戊,
.color-mode .sike-item .tiangan.己,
.color-mode .sizhu-item .dizhi.丑,
.color-mode .sizhu-item .dizhi.辰,
.color-mode .sizhu-item .dizhi.未,
.color-mode .sizhu-item .dizhi.戌,
.color-mode .sanchuan-item .dizhi.丑,
.color-mode .sanchuan-item .dizhi.辰,
.color-mode .sanchuan-item .dizhi.未,
.color-mode .sanchuan-item .dizhi.戌,
.color-mode .grid-cell .dizhi.丑,
.color-mode .grid-cell .dizhi.辰,
.color-mode .grid-cell .dizhi.未,
.color-mode .grid-cell .dizhi.戌,
.color-mode .sike-item .dizhi.丑,
.color-mode .sike-item .dizhi.辰,
.color-mode .sike-item .dizhi.未,
.color-mode .sike-item .dizhi.戌 {
  color: #FF9800 !important; /* 土 - 橙色 */
}

.color-mode .sizhu-item .tiangan.庚,
.color-mode .sizhu-item .tiangan.辛,
.color-mode .sanchuan-item .tiangan.庚,
.color-mode .sanchuan-item .tiangan.辛,
.color-mode .grid-cell .tiangan.庚,
.color-mode .grid-cell .tiangan.辛,
.color-mode .sike-item .tiangan.庚,
.color-mode .sike-item .tiangan.辛,
.color-mode .sizhu-item .dizhi.申,
.color-mode .sizhu-item .dizhi.酉,
.color-mode .sanchuan-item .dizhi.申,
.color-mode .sanchuan-item .dizhi.酉,
.color-mode .grid-cell .dizhi.申,
.color-mode .grid-cell .dizhi.酉,
.color-mode .sike-item .dizhi.申,
.color-mode .sike-item .dizhi.酉 {
  color: #2196F3 !important; /* 金 - 蓝色 */
}

.color-mode .sizhu-item .tiangan.壬,
.color-mode .sizhu-item .tiangan.癸,
.color-mode .sanchuan-item .tiangan.壬,
.color-mode .sanchuan-item .tiangan.癸,
.color-mode .grid-cell .tiangan.壬,
.color-mode .grid-cell .tiangan.癸,
.color-mode .sike-item .tiangan.壬,
.color-mode .sike-item .tiangan.癸,
.color-mode .sizhu-item .dizhi.亥,
.color-mode .sizhu-item .dizhi.子,
.color-mode .sanchuan-item .dizhi.亥,
.color-mode .sanchuan-item .dizhi.子,
.color-mode .grid-cell .dizhi.亥,
.color-mode .grid-cell .dizhi.子,
.color-mode .sike-item .dizhi.亥,
.color-mode .sike-item .dizhi.子 {
  color: #9C27B0 !important; /* 水 - 紫色 */
}

/* 神将五行颜色 */
.color-mode .sanchuan-item .shenjiang.贵人,
.color-mode .sanchuan-item .shenjiang.天后,
.color-mode .sike-item .shenjiang.贵人,
.color-mode .sike-item .shenjiang.天后,
.color-mode .grid-cell .shenjiang.贵人,
.color-mode .grid-cell .shenjiang.天后 {
  color: #4CAF50 !important; /* 木 */
}

.color-mode .sanchuan-item .shenjiang.腾蛇,
.color-mode .sanchuan-item .shenjiang.朱雀,
.color-mode .sike-item .shenjiang.腾蛇,
.color-mode .sike-item .shenjiang.朱雀,
.color-mode .grid-cell .shenjiang.腾蛇,
.color-mode .grid-cell .shenjiang.朱雀 {
  color: #F44336 !important; /* 火 */
}

.color-mode .sanchuan-item .shenjiang.勾陈,
.color-mode .sanchuan-item .shenjiang.太常,
.color-mode .sike-item .shenjiang.勾陈,
.color-mode .sike-item .shenjiang.太常,
.color-mode .grid-cell .shenjiang.勾陈,
.color-mode .grid-cell .shenjiang.太常 {
  color: #FF9800 !important; /* 土 */
}

.color-mode .sanchuan-item .shenjiang.青龙,
.color-mode .sanchuan-item .shenjiang.白虎,
.color-mode .sike-item .shenjiang.青龙,
.color-mode .sike-item .shenjiang.白虎,
.color-mode .grid-cell .shenjiang.青龙,
.color-mode .grid-cell .shenjiang.白虎 {
  color: #2196F3 !important; /* 金 */
}

.color-mode .sanchuan-item .shenjiang.天空,
.color-mode .sanchuan-item .shenjiang.玄武,
.color-mode .sanchuan-item .shenjiang.太阴,
.color-mode .sike-item .shenjiang.天空,
.color-mode .sike-item .shenjiang.玄武,
.color-mode .sike-item .shenjiang.太阴,
.color-mode .grid-cell .shenjiang.天空,
.color-mode .grid-cell .shenjiang.玄武,
.color-mode .grid-cell .shenjiang.太阴 {
  color: #9C27B0 !important; /* 水 */
}



/* 旬空圆圈符号 */
.kongwang-symbol {
  color: #000000;
  font-size: 13px;
  font-weight: bold;
}

/* 彩色模式切换按钮基础样式 */
.color-mode-toggle {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.color-mode-toggle:hover {
  transform: scale(1.1);
}

/* 复制按钮样式 */
#copyButton {
  background-color: #000000;
  color: #FFFCF5;
  border: none;
  padding: 8px 4px;
  border-radius: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
  width: 20%;
  margin: 10px auto;
  text-transform: uppercase;
  letter-spacing: 0px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}



#copyButton:hover {
  background-color: #333333;
  color: #FFFCF5;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
  transform: translateY(-1px);
}

#copyButton:active {
  transform: translateY(0);
  box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  background-color: #666666;
}

/* 复制成功后的灰色状态 */
#copyButton.copied {
  background-color: #666666;
  color: #FFFCF5;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  transform: translateY(0);
}

/* 六壬奇门案例保存区域样式 */
.qiren-save-section {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.save-header h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #333;
  text-align: center;
}

.save-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-row label {
  min-width: 80px;
  font-size: 14px;
  color: #555;
  font-weight: 500;
}

.form-row input[type="text"],
.form-row textarea {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.form-row textarea {
  min-height: 60px;
  line-height: 1.4;
}

.form-row input[type="text"]:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.readonly-field {
  flex: 1;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  color: #666;
  min-height: 20px;
  display: flex;
  align-items: center;
}

.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.save-button {
  background: #28a745;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 11px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  cursor: pointer;
  transition: background-color 0.3s;
}

.save-button:hover:not(:disabled) {
  background: #218838;
}

.save-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

/* 六壬奇门案例列表样式 */
.qiren-cases-section {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.cases-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.cases-header h3 {
  margin: 0;
  font-size: 16px;
  color: #333;
}

.refresh-button {
  background: #17a2b8;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.refresh-button:hover {
  background: #138496;
}

.no-cases {
  text-align: center;
  color: #666;
  padding: 20px;
}

.cases-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-item {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.case-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 5px;
}

.case-name {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.case-date {
  font-size: 12px;
  color: #666;
}

.case-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-row .label {
  font-size: 12px;
  color: #666;
  min-width: 60px;
}

.detail-row .value {
  font-size: 12px;
  color: #333;
  font-weight: 500;
}

.case-actions {
  display: flex;
  justify-content: flex-end;
}

.delete-button {
  background: #dc3545;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.delete-button:hover {
  background: #c82333;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.page-button {
  background: #6c757d;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.page-button:hover:not(:disabled) {
  background: #5a6268;
}

.page-button:disabled {
  background: #adb5bd;
  cursor: not-allowed;
}

.page-info {
  font-size: 12px;
  color: #666;
}

/* 登录提示样式 */
.login-prompt {
  text-align: center;
  padding: 30px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px dashed #dee2e6;
}

.login-prompt-content h4 {
  margin: 0 0 10px 0;
  font-size: 13px;
  color: #495057;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.login-prompt-content p {
  margin: 0 0 20px 0;
  font-size: 11px;
  color: #6c757d;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.login-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 11px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
  display: inline-block;
}

.login-btn:hover {
  background: #0056b3;
  text-decoration: none;
}

/* 弹窗样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 350px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
  margin: 0;
  font-size: 13px;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #333;
}

/* 弹窗内的表单样式 */
.modal-content .save-form {
  padding: 12px;
}

.modal-content .form-row {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
}

.modal-content .form-row-inline {
  flex-direction: row;
  gap: 10px;
}

.modal-content .form-field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.modal-content .form-row label {
  margin-bottom: 4px;
  font-weight: 500;
  color: #333;
  font-size: 10px;
}

.modal-content .form-row textarea,
.modal-content .form-row select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
  font-size: 10px;
  resize: vertical;
  min-height: 34px;
}

.modal-content .form-row select {
  height: 36px;
}

.modal-content .form-row textarea:focus,
.modal-content .form-row select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.modal-content .form-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.cancel-button {
  background: #6c757d;
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.cancel-button:hover {
  background: #5a6268;
}
