@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@500;700;900&family=Nunito:wght@400;600;700&display=swap');

/* =========================================
   🎨 品牌颜色控制台 (在这里更改您的品牌色)
   ========================================= */
:root {
  --bg-start: #fcfbf9;
  --bg-end: #f5f2eb;
  --brand-primary: #f1d0a0; 
  --brand-dark: #483921;    
  --brand-light: #f5efe5;   
  --brand-shadow: rgba(180, 170, 154, 0.3);       
  --brand-shadow-light: rgba(247, 243, 236, 0.3); 
}

/* =========================================
   以下为样式定义区 (无需再手动寻找颜色替换)
   ========================================= */

/* --- 基础与背景设定 --- */
.bazi-section {
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
  padding: 40px 20px;
  color: #5c5456;
}

.bazi-container {
  max-width: 900px;
  margin: 0 auto;
}

/* --- 语言切换器 --- */
.top-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.lang-switcher {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.6);
  padding: 4px;
  border-radius: 30px;
  box-shadow: 0 2px 10px var(--brand-shadow-light);
  backdrop-filter: blur(10px);
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 8px 18px;
  border-radius: 26px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: #9e9195;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-btn.active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 4px 15px var(--brand-shadow-light);
}

/* --- 标题区 --- */
.bazi-header {
  text-align: center;
  margin-bottom: 40px;
}

.bazi-header h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: 2.2rem;
  color: #4a4144;
  margin: 0 0 12px 0;
  letter-spacing: 1px;
}

.bazi-header p {
  font-size: 1.05rem;
  color: #8c7e82;
  margin: 0;
  font-weight: 400;
}

/* --- 表单区 --- */
.form-wrapper {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 15px 35px var(--brand-shadow-light);
  margin-bottom: 40px;
}

.form-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #9e9195;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.input-group input, 
.input-group select {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--brand-shadow);;
  font-size: 1rem;
  font-family: inherit;
  color: #4a4144;
  background: var(--brand-shadow-light);;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
  appearance: none; 
}

.select-wrapper { position: relative; }
.select-wrapper::after {
  content: '▼';
  font-size: 0.7rem;
  color: #bfaab0;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--brand-shadow-light);
}

.btn-submit {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px var(--brand-shadow);
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px var(--brand-shadow);
}

.btn-icon { width: 20px; height: 20px; transition: transform 0.3s; }
.btn-submit:hover .btn-icon { transform: translateX(4px); }

/* --- 结果展示区 --- */
.crystal-result-box {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 40px var(--brand-shadow-light);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.hidden { display: none !important; }

.fade-in { animation: smoothUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes smoothUp {
  0% { opacity: 0; transform: translateY(30px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.info-bar {
  text-align: center;
  margin-bottom: 32px;
  font-size: 0.9rem;
  color: #8c7e82;
  background: var(--brand-shadow-light);
  padding: 12px 20px;
  border-radius: 30px;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
}

/* --- 四柱排盘 --- */
.four-pillars-container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  padding: 0 10px 30px 10px;
  border-bottom: 1px solid var(--brand-shadow);
}

.pillar-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--brand-shadow-light);;
  padding: 24px 10px;
  border-radius: 18px;
  border: 1px solid var(--brand-shadow);
  box-shadow: 0 8px 20px var(--brand-shadow-light);
  transition: transform 0.3s;
  position: relative;
  overflow: hidden;
}

.pillar-card:hover { transform: translateY(-5px); }

/* 日主高亮 */
.day-master-card {
  background:  var(--brand-shadow-light);;
  border-color: var(--brand-light);
  box-shadow: 0 10px 25px var(--brand-shadow-light);
}
.day-master-card::before {
  content: '主';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.7rem;
  background: var(--brand-primary);
  color: white;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: 'Noto Serif SC', serif;
}

.pillar-title {
  font-size: 0.8rem;
  color: #9e9195;
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

.pillar-stem, .pillar-branch {
  font-family: 'Noto Serif SC', serif;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.3;
}

/* 五行色保留 (用于字体的五行变色) */
.elem-wood { color: #6b8e76; } 
.elem-fire { color: #c46d6d; } 
.elem-earth { color: #bcaaa4; } 
.elem-metal { color: #8a96a3; } 
.elem-water { color: #6b82a8; } 

/* --- 结论区 --- */
.conclusion-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.result-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--brand-shadow-light);;
  padding: 16px 20px;
  border-radius: 16px;
  transition: background 0.3s;
}
.result-item:hover { background: var(--brand-shadow-light); }

.item-icon { font-size: 1.5rem; }

.item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-item .label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #9e9195;
}

.result-item .value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #4a4144;
}

.crystal-section {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #ffffff 0%, var(--brand-shadow-light) 100%);
  border: 1px solid var(--brand-shadow);
  padding: 24px;
  border-radius: 20px;
  margin-top: 10px;
}

.crystal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.crystal-title .label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.crystal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.crystal-pill {
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px var(--brand-shadow-light);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}
.crystal-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px var(--brand-shadow-light);
}

/* --- 行动引导区 (CTA) --- */
.action-section {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-banner {
  background: #ffffff;
  border: 1px solid var(--brand-shadow);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 20px var(--brand-shadow-light);
  transition: all 0.3s ease;
}

.product-banner:hover {
  border-color: var(--brand-primary);
  box-shadow: 0 12px 25px var(--brand-shadow-light);
}

.btn-outline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border: 1.5px solid var(--brand-primary);
  color: var(--brand-dark);
  background: transparent;
  border-radius: 18px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline:hover {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 10px 20px var(--brand-shadow-light);
}

.btn-outline .arrow { transition: transform 0.3s; }
.btn-outline:hover .arrow { transform: translateX(6px); }

/* --- 响应式 --- */
@media (max-width: 768px) {
  .conclusion-section { grid-template-columns: 1fr; }
  .bazi-section { padding: 20px 10px; }
  .four-pillars-container { gap: 8px; padding-bottom: 20px; }
  .pillar-card { padding: 16px 4px; border-radius: 12px; }
  .pillar-stem, .pillar-branch { font-size: 1.8rem; }
  .crystal-result-box { padding: 24px 20px; }
}