/**
 * Ten Gods Display Styles
 * Styling for Ten Gods (十神) and Hidden Stems (藏干) display
 */

/* Ten Gods Display Container */
.ten-gods-display {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
}

.ten-gods-header {
  text-align: center;
  margin-bottom: 2rem;
}

.ten-gods-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
}

.ten-gods-subtitle {
  margin: 0.5rem 0 0 0;
  color: #666;
  font-size: 0.95rem;
}

/* Ten Gods Pillars Layout */
.ten-gods-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.ten-gods-pillar {
  background: white;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.ten-gods-pillar:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.pillar-title {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: #555;
  text-align: center;
}

/* Stem and Branch Sections */
.stem-section,
.branch-section {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f5f5f5;
  border-radius: 6px;
}

.stem-content,
.branch-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.chinese-char {
  font-size: 1.75rem;
  font-weight: 600;
  color: #333;
  font-family:
    -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "微软雅黑", "SimHei", "黑体",
    "Noto Sans CJK SC", "PingFang SC", sans-serif;
}

.english-name {
  font-size: 0.875rem;
  color: #666;
}

/* Ten God Badge */
.ten-god-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.ten-god-symbol {
  font-size: 1rem;
  font-weight: bold;
}

.ten-god-name {
  font-size: 0.875rem;
}

/* Day Master Label */
.day-master-label {
  background: linear-gradient(135deg, #6a1b9a, #8e24aa);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  margin-top: 0.5rem;
}

/* Hidden Stems */
.hidden-stems {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hidden-stems:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.hidden-stems-label {
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.hidden-stem-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0.25rem 0.5rem 0.25rem 0;
  padding: 0.25rem 0.5rem;
  background: white;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.hidden-stem-char {
  font-size: 1rem;
  font-weight: 600;
  color: #555;
}

.hidden-ten-god {
  font-size: 0.75rem;
  font-weight: bold;
}

/* Ten Gods Summary */
.ten-gods-summary {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.ten-gods-summary h4 {
  margin: 0 0 1.5rem 0;
  color: #333;
  text-align: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.summary-section {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.summary-section.full-width {
  grid-column: 1 / -1;
}

.summary-section h5 {
  margin: 0 0 1rem 0;
  color: #555;
  font-size: 1rem;
}

/* Dominant Ten Gods */
.dominant-gods {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.dominant-god-item {
  padding: 0.75rem;
  background: white;
  border: 2px solid;
  border-radius: 8px;
  min-width: 100px;
  text-align: center;
}

.god-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.god-chinese {
  font-size: 1.25rem;
  font-weight: 600;
}

.god-count {
  font-size: 0.875rem;
  color: #666;
  font-weight: 600;
}

.god-english {
  font-size: 0.75rem;
  color: #666;
}

/* Category Bars */
.category-bars {
  margin-bottom: 1rem;
}

.category-bar-item {
  margin-bottom: 0.75rem;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: #555;
}

.bar-container {
  height: 20px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  transition: width 0.5s ease;
  border-radius: 10px;
}

.balance-assessment {
  text-align: center;
  font-style: italic;
  color: #666;
  margin-top: 1rem;
  font-size: 0.875rem;
}

/* Personality Traits */
.personality-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.trait-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 20px;
  font-size: 0.875rem;
}

/* Insights List */
.insights-list {
  margin: 0;
  padding-left: 1.5rem;
}

.insights-list li {
  margin: 0.5rem 0;
  color: #555;
}

/* Ten Gods Guide */
.ten-gods-guide {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.ten-gods-guide h4 {
  margin: 0 0 1.5rem 0;
  color: #333;
  text-align: center;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.guide-category h5 {
  margin: 0 0 0.75rem 0;
  color: #555;
  font-size: 1rem;
}

.guide-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #666;
}

.god-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
  min-width: 45px;
  text-align: center;
}

/* Enhanced Pillar Card Ten Gods Integration */
.pillar-card .ten-god-info {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.pillar-card .day-master-badge {
  background: linear-gradient(135deg, #6a1b9a, #8e24aa);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  margin-top: 0.5rem;
}

.pillar-card .hidden-stems-container {
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: #fafafa;
  border-radius: 4px;
  border: 1px solid #f0f0f0;
}

.pillar-card .hidden-stems-label {
  font-size: 0.7rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.pillar-card .hidden-stems-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pillar-card .hidden-stem {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.375rem;
  background: white;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  font-size: 0.875rem;
}

.pillar-card .stem-char {
  font-weight: 600;
  color: #555;
}

.pillar-card .ten-god-mini {
  font-size: 0.7rem;
  font-weight: bold;
}

.pillar-card .ten-god-description {
  text-align: center;
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Tooltip */
.ten-gods-tooltip {
  position: absolute;
  background: #333;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  pointer-events: none;
}

.ten-gods-tooltip::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #333;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .ten-gods-pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .ten-gods-pillars {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .dominant-gods {
    justify-content: center;
  }
}

/* Print Styles */
@media print {
  .ten-gods-display {
    background: white;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .ten-gods-pillar {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .ten-gods-tooltip {
    display: none;
  }
}
