/* 地脉道页面样式 */

.dimaidao-page {
  display: flex;
  flex-direction: column;
}

/* 顶部导航 */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid rgba(0, 240, 255, 0.3);
  margin-bottom: 20px;
}

/* 赛博朋克按钮 - 基础样式 */
.cyber-btn-small {
  background: transparent;
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  letter-spacing: 1px;
}

.cyber-btn-small::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.2), transparent);
  transition: left 0.5s;
}

.cyber-btn-small:hover::before {
  left: 100%;
}

.cyber-btn-small:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 15px var(--neon-cyan), inset 0 0 10px rgba(0, 240, 255, 0.1);
  text-shadow: 0 0 8px var(--neon-cyan);
}

.cyber-btn-small:active {
  transform: scale(0.95);
}

.top-nav .back-btn {
  background: transparent;
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.top-nav .back-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.2), transparent);
  transition: left 0.5s;
}

.top-nav .back-btn:hover::before {
  left: 100%;
}

.top-nav .back-btn:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 15px var(--neon-cyan);
}

.top-nav .page-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav .nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(0, 240, 255, 0.4);
}

.top-nav .reset-btn {
  background: transparent;
  border: 1px solid var(--neon-red);
  color: var(--neon-red);
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.top-nav .reset-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 68, 0.2), transparent);
  transition: left 0.5s;
}

.top-nav .reset-btn:hover::before {
  left: 100%;
}

.top-nav .reset-btn:hover {
  background: rgba(255, 0, 68, 0.1);
  box-shadow: 0 0 15px var(--neon-red);
}

/* 多成员紧凑标签 */
.occupant-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
  margin-top: 2px;
}

.occupant-badge {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: var(--neon-green);
  white-space: nowrap;
}

.occupant-badge.room-badge {
  background: rgba(240, 232, 0, 0.15);
  border-color: rgba(240, 232, 0, 0.3);
  color: var(--neon-yellow);
}

/* 选中提示 */
.selection-hint {
  text-align: center;
  margin-bottom: 10px;
  display: none;
}

.selection-hint .hint-pulse {
  font-size: 14px;
  color: var(--neon-pink);
  text-shadow: 0 0 8px var(--neon-pink);
  animation: hintBlink 1s ease-in-out infinite;
  letter-spacing: 2px;
}

@keyframes hintBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 九宫图 */
.palace-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 20px;
  aspect-ratio: 1;
  padding: 10px;
  background: rgba(0, 240, 255, 0.03);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.05), inset 0 0 30px rgba(0, 240, 255, 0.02);
}

.palace-cell {
  background: rgba(10, 15, 30, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.palace-cell::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(0, 240, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.palace-cell:hover::before {
  opacity: 1;
}

.palace-cell:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  transform: scale(1.03);
}

.palace-cell.selected {
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.4);
}

.palace-cell.occupied {
  border-color: var(--neon-green);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
  background: rgba(0, 255, 136, 0.05);
}

/* 放置动画 */
@keyframes placePulse {
  0% { box-shadow: 0 0 5px rgba(0, 255, 136, 0.5); transform: scale(1); }
  50% { box-shadow: 0 0 25px rgba(0, 255, 136, 0.8); transform: scale(1.05); }
  100% { box-shadow: 0 0 10px rgba(0, 255, 136, 0.3); transform: scale(1); }
}

.palace-cell.just-placed {
  animation: placePulse 0.6s ease-out;
}

/* 选中状态 - 可放置宫位高亮 */
.palace-cell.selectable {
  border-color: rgba(255, 0, 255, 0.4);
  animation: selectablePulse 1.5s ease-in-out infinite;
}

@keyframes selectablePulse {
  0%, 100% { border-color: rgba(255, 0, 255, 0.2); box-shadow: none; }
  50% { border-color: rgba(255, 0, 255, 0.6); box-shadow: 0 0 12px rgba(255, 0, 255, 0.3); }
}

.palace-cell.selectable:hover {
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
  transform: scale(1.05);
}

/* 预览状态 */
.palace-cell.previewing {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 15px rgba(240, 232, 0, 0.4);
  z-index: 10;
}

/* 预览浮层 */
.preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.preview-overlay.show {
  opacity: 1;
}

.preview-card {
  background: rgba(10, 15, 30, 0.95);
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 12px;
  padding: 0;
  max-width: 90vw;
  width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.15), 0 0 80px rgba(0, 240, 255, 0.05);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s;
}

.preview-overlay.show .preview-card {
  transform: scale(1) translateY(0);
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.preview-palace-info {
  font-size: 18px;
  font-weight: bold;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
}

.preview-close {
  background: transparent;
  border: 1px solid rgba(255, 0, 68, 0.5);
  color: var(--neon-red);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.preview-close:hover {
  background: rgba(255, 0, 68, 0.2);
  box-shadow: 0 0 10px rgba(255, 0, 68, 0.4);
}

.preview-card-item {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-card-item.good {
  border-left: 4px solid var(--neon-green);
}

.preview-card-item.bad {
  border-left: 4px solid var(--neon-red);
}

.preview-card-item.neutral {
  border-left: 4px solid var(--neon-cyan);
}

.preview-card-badge {
  font-size: 16px;
  font-weight: bold;
  color: var(--neon-yellow);
  text-shadow: 0 0 8px var(--neon-yellow);
  margin-bottom: 6px;
}

.preview-card-label {
  font-size: 15px;
  font-weight: bold;
  color: var(--neon-cyan);
  margin-bottom: 8px;
}

.preview-card-text {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  white-space: pre-wrap;
}

.preview-card-footer {
  padding: 10px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid rgba(0, 240, 255, 0.1);
}

.palace-cell .palace-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 2px;
}

.palace-cell .luoshu-num {
  font-size: 11px;
  color: var(--neon-yellow);
  font-weight: bold;
  text-shadow: 0 0 5px var(--neon-yellow);
  opacity: 0.8;
}

.palace-cell .gua-symbol {
  font-size: 22px;
  color: var(--neon-cyan);
  text-shadow: 0 0 12px var(--neon-cyan), 0 0 20px rgba(0, 240, 255, 0.3);
}

.palace-cell .gua-name {
  font-size: 20px;
  font-weight: bold;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
  line-height: 1.2;
}

.palace-cell .direction {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.palace-cell .occupant {
  font-size: 11px;
  color: var(--neon-green);
  margin-top: 4px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 4px;
}

.palace-cell.center {
  border-color: var(--neon-pink);
}

.palace-cell.center .gua-name {
  color: var(--neon-pink);
  text-shadow: 0 0 10px var(--neon-pink);
}

/* 赛博朋克图标系统 - 使用CSS绘制 */
.cyber-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
}

/* 父亲 - 男性符号 */
.icon-father {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.icon-father::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--dark-bg);
  border-radius: 50%;
}

/* 母亲 - 女性符号 */
.icon-mother {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-red));
  border-radius: 50%;
  border: 2px solid var(--neon-pink);
  box-shadow: 0 0 6px var(--neon-pink);
}

.icon-mother::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background: var(--neon-pink);
}

/* 长子 - 向上的箭头 */
.icon-son1 {
  background: linear-gradient(to top, var(--neon-green), transparent);
  clip-path: polygon(50% 0%, 100% 60%, 75% 60%, 75% 100%, 25% 100%, 25% 60%, 0% 60%);
}

/* 长女 - 菱形 */
.icon-daughter1 {
  background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink));
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  box-shadow: 0 0 6px var(--neon-cyan);
}

/* 二子 - 圆形 */
.icon-son2 {
  background: radial-gradient(circle, var(--neon-green), var(--neon-cyan));
  border-radius: 50%;
  border: 1px solid var(--neon-cyan);
}

/* 二女 - 三角形 */
.icon-daughter2 {
  background: linear-gradient(to bottom, var(--neon-yellow), var(--neon-red));
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

/* 三子 - 方形 */
.icon-son3 {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-green));
  border-radius: 3px;
  border: 1px solid var(--neon-cyan);
}

/* 三女 - 星形 */
.icon-daughter3 {
  background: linear-gradient(45deg, var(--neon-pink), var(--neon-yellow));
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* 厨房 - 火焰 */
.icon-kitchen {
  background: linear-gradient(to top, var(--neon-red), var(--neon-yellow));
  clip-path: polygon(50% 0%, 65% 40%, 80% 30%, 70% 70%, 50% 100%, 30% 70%, 20% 30%, 35% 40%);
}

/* 厕所 - 水滴 */
.icon-toilet {
  background: linear-gradient(to bottom, var(--neon-cyan), var(--neon-green));
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

/* 客厅 - 房子 */
.icon-living {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  clip-path: polygon(50% 0%, 100% 40%, 100% 100%, 0% 100%, 0% 40%);
}

/* 选择区域标题 */
.section-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--neon-cyan);
  margin: 15px 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--neon-cyan);
  text-shadow: 0 0 5px var(--neon-cyan);
}

/* 家庭成员选择 */
.family-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.family-member {
  background: var(--dark-surface);
  border: 2px solid rgba(0, 240, 255, 0.3);
  border-radius: 8px;
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.family-member::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
  transition: left 0.5s;
}

.family-member:hover::before {
  left: 100%;
}

.family-member:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
  transform: translateY(-1px);
}

.family-member.selected {
  border-color: var(--neon-pink);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.4), inset 0 0 10px rgba(255, 0, 255, 0.1);
  background: rgba(255, 0, 255, 0.15);
}

.family-member.placed {
  opacity: 0.7;
  cursor: pointer;
  border-color: var(--neon-green);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.2);
}

.family-member.placed::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 10px;
  color: var(--neon-green);
  text-shadow: 0 0 4px var(--neon-green);
}

.family-member .name {
  font-size: 14px;
  font-weight: bold;
}

/* 房间选择 */
.room-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.room-item {
  flex: 1;
  background: var(--dark-surface);
  border: 2px solid rgba(0, 240, 255, 0.3);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.room-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
  transition: left 0.5s;
}

.room-item:hover::before {
  left: 100%;
}

.room-item:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
  transform: translateY(-1px);
}

.room-item.selected {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 15px rgba(240, 232, 0, 0.4), inset 0 0 10px rgba(240, 232, 0, 0.1);
  background: rgba(240, 232, 0, 0.15);
}

.room-item .name {
  font-size: 14px;
  font-weight: bold;
}

/* 操作按钮 */
.action-area {
  margin: 20px 0;
  text-align: center;
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* 撤销按钮 */
.cyber-btn.undo-btn {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
  max-width: 120px;
  padding: 14px 20px;
  font-size: 14px;
}

.cyber-btn.undo-btn::before {
  background: linear-gradient(90deg, transparent, rgba(240, 232, 0, 0.3), transparent);
}

.cyber-btn.undo-btn:hover {
  background: rgba(240, 232, 0, 0.1);
  box-shadow: 0 0 20px rgba(240, 232, 0, 0.4), inset 0 0 20px rgba(240, 232, 0, 0.1);
  text-shadow: 0 0 10px var(--neon-yellow);
}

/* 赛博朋克主按钮 - 升级特效 */
.cyber-btn {
  background: transparent;
  border: 2px solid var(--neon-cyan);
  color: var(--neon-cyan);
  padding: 14px 32px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 3px;
  width: 100%;
  max-width: 300px;
}

.cyber-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.3), transparent);
  transition: left 0.5s;
}

.cyber-btn:hover::before {
  left: 100%;
}

.cyber-btn:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 
    0 0 20px var(--neon-cyan),
    0 0 40px rgba(0, 240, 255, 0.3),
    inset 0 0 20px rgba(0, 240, 255, 0.1);
  text-shadow: 0 0 10px var(--neon-cyan);
  transform: translateY(-2px);
}

.cyber-btn:active {
  transform: scale(0.97) translateY(0);
}

/* 按钮脉冲动画 */
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.3); }
  50% { box-shadow: 0 0 25px rgba(0, 240, 255, 0.6), 0 0 50px rgba(0, 240, 255, 0.2); }
}

.cyber-btn.analyze-btn {
  animation: btnPulse 2s infinite;
}

/* 结果区域 */
.result-area {
  background: var(--dark-surface);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  display: none;
  position: relative;
  overflow: hidden;
}

.result-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink), var(--neon-cyan));
}

.result-area.show {
  display: block;
  animation: fadeIn 0.5s ease-out;
}

.result-area .result-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--neon-cyan);
  text-align: center;
  margin-bottom: 15px;
  text-shadow: 0 0 10px var(--neon-cyan);
}

.result-area .result-count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: normal;
}

.result-item {
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 6px;
  border-left: 3px solid;
  position: relative;
  transition: all 0.3s;
}

.result-item:hover {
  transform: translateX(4px);
}

.result-item.good {
  background: rgba(0, 255, 136, 0.12);
  border-left-color: var(--neon-green);
  border-left-width: 4px;
  box-shadow: inset 0 0 15px rgba(0, 255, 136, 0.08);
}

.result-item.good .gua-badge {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.5);
  color: var(--neon-green);
  text-shadow: 0 0 5px var(--neon-green);
}

.result-item.bad {
  background: rgba(255, 0, 68, 0.12);
  border-left-color: var(--neon-red);
  border-left-width: 4px;
  box-shadow: inset 0 0 15px rgba(255, 0, 68, 0.08);
}

.result-item.bad .gua-badge {
  background: rgba(255, 0, 68, 0.2);
  border-color: rgba(255, 0, 68, 0.5);
  color: var(--neon-red);
  text-shadow: 0 0 5px var(--neon-red);
}

.result-item.neutral {
  background: rgba(0, 240, 255, 0.08);
  border-left-color: var(--neon-cyan);
  border-left-width: 4px;
  box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.05);
}

.result-item .gua-badge {
  display: inline-block;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: bold;
  color: var(--neon-cyan);
  margin-bottom: 8px;
  text-shadow: 0 0 5px var(--neon-cyan);
  letter-spacing: 1px;
}

.result-item .result-text {
  font-size: 14px;
  line-height: 1.6;
  transition: max-height 0.3s ease-out;
}

.result-item .result-text.collapsed {
  max-height: 80px;
  overflow: hidden;
  position: relative;
}

.result-item .result-text.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background: linear-gradient(transparent, var(--dark-surface));
}

.result-item .result-text.expanded {
  max-height: 2000px;
}

.result-item .expand-btn {
  background: transparent;
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--neon-cyan);
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  margin-top: 8px;
  border-radius: 4px;
  transition: all 0.3s;
}

.result-item .expand-btn:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--neon-cyan);
}

/* 提示信息 */
.hint-text {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  margin: 10px 0;
  padding: 10px;
  border: 1px dashed rgba(0, 240, 255, 0.2);
  border-radius: 6px;
}

.preview-mode-btn {
  font-size: 12px;
  padding: 4px 14px;
  margin-bottom: 6px;
  display: inline-block;
}

/* 响应式 */
@media (max-width: 480px) {
  .palace-grid {
    max-width: 300px;
  }
  
  .palace-cell .gua-name {
    font-size: 20px;
  }
  
  .family-member {
    padding: 8px 12px;
  }
  
  .family-member .name {
    font-size: 12px;
  }
  
  .cyber-icon {
    width: 16px;
    height: 16px;
  }
}

/* 太极旋转背景 - 中宫特效 */
.palace-cell.center::after {
  content: '☯';
  position: absolute;
  font-size: 60px;
  color: rgba(255, 0, 255, 0.06);
  animation: taijiSpin 20s linear infinite;
  pointer-events: none;
}

@keyframes taijiSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 页面背景粒子效果 */
.dimaidao-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(1px 1px at 10% 20%, rgba(0, 240, 255, 0.3), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255, 0, 255, 0.2), transparent),
    radial-gradient(1px 1px at 50% 10%, rgba(0, 240, 255, 0.2), transparent),
    radial-gradient(1px 1px at 70% 80%, rgba(255, 0, 255, 0.3), transparent),
    radial-gradient(1px 1px at 90% 40%, rgba(0, 240, 255, 0.2), transparent),
    radial-gradient(1px 1px at 20% 90%, rgba(240, 232, 0, 0.2), transparent),
    radial-gradient(1px 1px at 80% 30%, rgba(0, 255, 136, 0.2), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(0, 240, 255, 0.3), transparent);
  pointer-events: none;
  z-index: -1;
  animation: particleDrift 30s linear infinite;
}

@keyframes particleDrift {
  from { transform: translateY(0); }
  to { transform: translateY(-20px); }
}
