/* styles.css */

/* Font declarations */
@font-face {
  font-family: "SanjiHuaxin";
  src: url("./fonts/三极花信体系列-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SourceHanSerif";
  src: url("./fonts/SourceHanSerifCN-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "SourceHanSerif", "楷体", "KaiTi", "STKaiti", "Microsoft KaiTi",
    "PingFang SC", "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 18px;
}

code,
pre,
.code,
.color-code {
  font-family: "SourceHanSerif", "楷体", "KaiTi", "Courier New", monospace;
}

body {
  font-family: "SourceHanSerif", "楷体", "KaiTi", "STKaiti", "Microsoft KaiTi",
    "PingFang SC", "Microsoft YaHei", "微软雅黑", sans-serif;
  color: #333;
  background: linear-gradient(135deg, #fff8dc 0%, #fff 50%, #fff8dc 100%);
  background-attachment: fixed;
  line-height: 1.5;
  min-height: 100vh;
  font-size: 18px;
}

/* ==================== 黄历样式开始 ==================== */
.huangli-container {
  max-width: 450px;
  padding: 20px;
  margin: 0 auto;
  font-family: "SourceHanSerif", "楷体", "KaiTi", "STKaiti", "Microsoft KaiTi",
    "PingFang SC", "Microsoft YaHei", "微软雅黑", sans-serif;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.huangli-header {
  text-align: center;
  margin-bottom: 30px;
}

.huangli-header h2 {
  font-size: 1.5em;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.date-info {
  display: flex;
  justify-content: space-between;
  font-size: 1.1em;
  color: #333;
  margin: 0 auto;
  font-weight: 400;
}

.date-block {
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 40px;
  position: relative;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* 添加顶部信息区域的样式，包含原来的 bazi-info 和 day-number */
.date-block-top {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: stretch;
  gap: 8px;
}

.bazi-info {
  text-align: center;
  padding: 15px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 180px;
  max-width: calc(100% - 110px);
}

.bazi-info p {
  margin-bottom: 8px;
  font-size: 1.1em;
  font-weight: 500;
}

/* 日主文字样式 - 确保正确的换行和布局 */
#dayMaster {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #333;
  line-height: 1.4;
  text-align: center;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: none;
}

/* 确保日主文字的span元素能够正确换行 */
#dayMaster span {
  display: inline;
}

/* 隐藏五行状态 */
#wuxingStatus {
  font-size: 16px;
  color: #666;
  margin-bottom: 5px;
  line-height: 1.4;
}

.one-line-description,
#oneLineDescription {
  font-size: 16px;
  color: #333;
  margin: 10px 0 15px 0;
  line-height: 1.5;
  max-width: 100%;
  text-align: center;
  font-weight: 500;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.element-circles {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  justify-content: flex-start;
}

.element-circle {
  width: 70px;
  height: 70px;
  border: none;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.day-number {
  text-align: center;
  padding: 10px 8px;
  flex: 0 0 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 100px !important;
  max-width: 100px;
  overflow: visible !important;
}

.day-number h1 {
  font-size: 120px;
  line-height: 0.9;
  margin: 0;
  font-weight: 700;
  margin-bottom: 10px;
  color: #000;
}

.day-number p {
  font-size: 1.1em !important;
  color: #333;
  margin: 3px 0;
  text-align: center !important;
  white-space: nowrap !important;
  display: inline-block !important;
  min-width: max-content !important;
  overflow: visible !important;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 10px;
  text-align: center;
  color: #333;
  position: relative;
}

.section-title:before,
.section-title:after {
  content: "";
  display: inline-block;
  height: 1px;
  background: #ccc;
  width: 30%;
  position: absolute;
  top: 50%;
}

.section-title:before {
  left: 0;
}

.section-title:after {
  right: 0;
}

#todayGuidanceTitle {
  margin-top: 30px;
  margin-bottom: 5px;
}

/* 名言引用样式 */
.quote-box {
  margin: 15px 5px 20px;
  text-align: center;
}

.quote-text {
  font-size: 18px;
  color: #444;
  line-height: 1.6;
  font-style: italic;
  margin: 0;
  padding: 20px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

.quote-author {
  text-align: right;
  font-size: 12px;
  color: #888;
  margin-top: 5px;
  font-style: italic;
  padding-right: 10px;
}

.yiji-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 25px 0 30px;
}

.yi-items,
.ji-items {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 5px;
  margin-bottom: 10px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.yi-circle,
.ji-circle {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-left: 5px;
}

.yi-circle {
  border: none;
  color: #ffffff;
  background-color: #b37bad;
}

.ji-circle {
  border: none;
  color: #ffffff;
  background-color: #5ea7d5;
}

.yi-item,
.ji-item {
  padding: 4px 0;
  margin: 2px 0;
  font-size: 0.95em;
}

.fortune-section {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  margin-bottom: 20px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  padding: 20px 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.fortune-item {
  text-align: center;
  flex: 1;
  position: relative;
}

.fortune-item h3 {
  font-size: 1.2em;
  margin-bottom: 15px;
  color: #333;
  font-weight: 500;
  position: relative;
}

.fortune-item h3:after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background-color: rgba(215, 62, 62, 0.5);
  border-radius: 1px;
}

.fortune-value {
  font-size: 3.5em;
  text-align: center;
  font-weight: bold;
  color: #333;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.fortune-color-container {
  display: flex;
  justify-content: center;
}

.fortune-color {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  border: none;
  background-color: #fff;
  margin: 0 auto;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

/* Hide original results but maintain functionality */
.hidden-results {
  display: none;
}

/* Back button styling */
.back-btn {
  display: block;
  margin: 30px auto;
  padding: 10px 20px;
  background-color: #d73e3e;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.back-btn:hover {
  background-color: #c62828;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.date-separator {
  display: none;
}
/* ==================== 黄历样式结束 ==================== */

.daily-quote {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  padding: 30px;
  margin: 40px auto;
  max-width: 800px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}
.daily-quote:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}
.quote-author {
  text-align: right;
  color: #7f8c8d;
  font-style: italic;
  font-size: 1.1em;
  margin-top: 10px;
}
.open-popup-btn {
  display: block;
  width: 280px;
  margin: 30px auto;
  padding: 18px 30px;
  background: linear-gradient(45deg, #ff9a8b, #ff6b95);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.2em;
  cursor: pointer;
  transition: all 0.4s ease;
  text-align: center;
  box-shadow: 0 8px 20px rgba(255, 107, 149, 0.3);
  position: relative;
  overflow: hidden;
}
.open-popup-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 25px rgba(255, 107, 149, 0.4);
}
.open-popup-btn:active {
  transform: translateY(1px);
}
h1 {
  text-align: center;
  color: #2c3e50;
  font-size: 2.8em;
  margin: 20px 0 40px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  padding-bottom: 15px;
}
/* 基础样式 */
body {
  font-family: "SourceHanSerif", "楷体", "KaiTi", "STKaiti", "Microsoft KaiTi",
    "PingFang SC", "Microsoft YaHei", "微软雅黑", sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #ffe4b5 0%, #ffb6c1 100%);
  color: #333;
  line-height: 1.6;
  letter-spacing: 0.5px;
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

/* 标题样式 */
h1 {
  text-align: center;
  color: #2c3e50;
  font-size: 2.5em;
  margin: 30px 0;
  font-weight: 600;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

h2,
h3,
h4 {
  color: #34495e;
  margin-bottom: 15px;
  font-weight: 500;
}

/* 结果卡片样式 */
.result-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.result-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.result-card h3 {
  color: #2c3e50;
  font-size: 1.4em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #ecf0f1;
  text-align: center;
}

/* 幸运数字样式 */
.lucky-numbers-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

.lucky-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  line-height: 45px;
  text-align: center;
  background-color: transparent;
  color: #d73e3e;
  border: none;
  border-radius: 50%;
  font-weight: bold;
  font-size: 1.4em;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.lucky-number:hover {
  transform: scale(1.1);
  background-color: rgba(215, 62, 62, 0.1);
}

/* 水晶推荐样式 */
.crystal-section {
  padding: 10px;
}

.crystal-item {
  padding: 15px 20px;
  margin: 10px 0;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  transition: all 0.3s ease;
  border-left: none;
  font-size: 1.1em;
  line-height: 1.5;
}

.crystal-item:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.crystal-name {
  font-weight: 600;
  color: #333;
}

.crystal-desc {
  color: #666;
}

/* 活动推荐样式 */
.activities-section {
  padding: 10px;
}

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-item {
  padding: 15px 20px;
  margin-bottom: 15px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  transition: all 0.3s ease;
  border-left: none;
  font-size: 1.1em;
  line-height: 1.5;
  color: #333;
  position: relative;
}

.activity-item:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* 返回按钮样式 */
.back-btn {
  display: block;
  width: 200px;
  margin: 30px auto;
  padding: 15px 30px;
  background: #2c3e50;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
}

.back-btn:hover {
  background: #34495e;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 幸运颜色样式 */
.color-display {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px 0;
}

.color-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: 3px solid #fff;
}

.color-info,
.color-hex,
.color-rgb,
.color-strategy {
  display: none;
}

/* 添加幸运颜色名称样式 */
#luckyColorName {
  text-align: center;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.fortune-color-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 幸运数字样式 */
.number {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  margin: 5px;
  background: linear-gradient(45deg, #ffb6c1, #ffa07a);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.number:hover {
  transform: scale(1.1);
}

/* 幸运色样式 */
.lucky-color-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.color-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: 3px solid #fff;
}

.color-info {
  flex: 1;
  max-width: 250px;
}

.color-info p {
  margin: 5px 0;
  color: #666;
}

.color-name {
  font-size: 1.2em;
  font-weight: 600;
  color: #333;
  display: block;
  margin-bottom: 10px;
}

.color-strategy {
  display: block;
  font-size: 1em;
  line-height: 1.6;
  color: #555;
  margin-bottom: 5px;
}

/* 水晶推荐样式 */
.crystal-item {
  padding: 10px;
  margin: 5px 0;
  background: rgba(255, 228, 225, 0.5);
  border-radius: 8px;
  transition: all 0.3s ease;
  border-left: none;
  font-weight: bold;
}

.crystal-item:hover {
  background: rgba(255, 228, 225, 0.8);
  transform: translateX(5px);
}

.crystal-item strong {
  color: #e91e63;
  font-weight: 600;
}

/* 活动推荐样式 */
.activity-list {
  list-style: none;
  padding: 0;
}

.activity-item {
  padding: 10px;
  margin: 5px 0;
  background: rgba(255, 218, 185, 0.3);
  border-radius: 8px;
  transition: all 0.3s ease;
  border-left: none;
  font-weight: bold;
}

.activity-item:hover {
  background: rgba(255, 218, 185, 0.5);
  transform: translateX(5px);
}

/* 表单样式 */
.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
  font-size: 0.95em;
}

input,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  background: #fff;
  transition: all 0.3s ease;
  color: #333;
}

input:focus,
select:focus {
  outline: none;
  border-color: #ffb6c1;
  box-shadow: 0 0 8px rgba(255, 182, 193, 0.4);
}

/* 按钮样式 */
button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(45deg, #ffb6c1, #ffa07a);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.back-btn {
  background: linear-gradient(45deg, #ffb6c1, #ffa07a);
  max-width: 200px;
  margin: 20px auto;
  display: block;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.popup-card {
  background: white;
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.close-popup {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-popup:hover {
  color: #666;
}

/* 语言切换按钮样式 */
.language-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #d73e3e;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 8px 15px;
  cursor: pointer;
  font-size: 0.9em;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.language-toggle:hover {
  background-color: #c62828;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 时间输入样式 */
.time-input-container {
  margin-bottom: 20px;
}

.time-wheels {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 10px 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 200px;
  margin: 0 auto;
}

.time-wheel-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 5px;
}

.time-wheel-group label {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}

.time-wheel {
  width: 60px;
  height: 40px;
  text-align: center;
  font-size: 18px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  padding: 5px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #ff6b95 50%),
    linear-gradient(135deg, #ff6b95 50%, transparent 50%);
  background-position: calc(100% - 15px) calc(50% - 2px),
    calc(100% - 10px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.time-wheel:focus {
  outline: none;
  border-color: #ff6b95;
  box-shadow: 0 0 0 2px rgba(255, 107, 149, 0.2);
}

/* 自定义滚动条样式 */
.time-wheel::-webkit-scrollbar {
  width: 4px;
}

.time-wheel::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.time-wheel::-webkit-scrollbar-thumb {
  background: #ff6b95;
  border-radius: 10px;
}

.time-wheel::-webkit-scrollbar-thumb:hover {
  background: #ff4d7e;
}

.time-separator {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  margin: 0 5px;
  padding-top: 20px;
}

/* 日期输入样式 */
.date-inputs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.date-input {
  width: 30%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  background: #fff;
  transition: all 0.3s ease;
  color: #333;
  text-align: center;
}

.date-input:focus {
  outline: none;
  border-color: #ffb6c1;
  box-shadow: 0 0 8px rgba(255, 182, 193, 0.4);
}

.day-info {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  gap: 6px !important;
  min-width: max-content !important;
  overflow: visible !important;
  flex-wrap: nowrap !important;
}

/* 强制确保日期和星期在同一行 */
#dayGanZhi,
#weekday {
  display: inline-block !important;
  white-space: nowrap !important;
  font-size: 1.1em !important;
  min-width: max-content !important;
  flex-shrink: 0 !important;
}

/* 添加更新信息和刷新按钮样式 */
.update-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.update-info {
  font-size: 1.2em;
  color: #777;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
  min-width: max-content !important;
}

.time-of-day {
  margin-left: 5px;
  padding: 2px 8px;
  background-color: #f8f8f8;
  border-radius: 10px;
  color: #555;
  font-size: 0.85em;
}

.refresh-button {
  background-color: rgba(215, 62, 62, 0.1);
  color: #d73e3e;
  border: none;
  width: auto;
  height: 40px;
  border-radius: 20px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0 16px 0 12px;
  gap: 8px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  min-width: max-content !important;
  flex-wrap: nowrap !important;
}

.refresh-button:hover {
  background-color: #d73e3e;
  color: #fff;
  box-shadow: 0 2px 5px rgba(215, 62, 62, 0.2);
}

.refresh-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* 添加旋转箭头动画 */
.refresh-arrow {
  position: relative;
  width: 20px;
  height: 20px;
}

/* 圆形部分 */
.refresh-arrow:after {
  content: "";
  position: absolute;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border: 2.5px solid #666;
  border-radius: 50%;
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-45deg);
  left: 1px;
  top: 1px;
}

.refresh-button:hover .refresh-arrow:after {
  animation: rotate-circle 1s linear infinite;
}

.refresh-text {
  font-size: 0.85em;
  color: #d73e3e;
  opacity: 0.75;
  font-weight: 400;
  letter-spacing: 0.5px;
  white-space: nowrap !important;
  display: inline-block !important;
  min-width: max-content !important;
  flex-shrink: 0 !important;
}

.refresh-button:disabled .refresh-arrow:after {
  animation: rotate-circle 1s linear infinite;
}

@keyframes rotate-circle {
  0% {
    transform: rotate(-45deg);
  }
  100% {
    transform: rotate(315deg); /* -45 + 360 */
  }
}

/* 更新时间的高亮和错误状态样式 */
.highlight-update {
  background-color: rgba(215, 62, 62, 0.1);
  color: #d73e3e;
  padding: 2px 5px;
  border-radius: 4px;
  animation: fadeHighlight 2s ease-out;
}

.error-update {
  background-color: rgba(255, 0, 0, 0.1);
  color: #ff3333;
  padding: 2px 5px;
  border-radius: 4px;
}

@keyframes fadeHighlight {
  0% {
    background-color: rgba(215, 62, 62, 0.3);
  }
  100% {
    background-color: rgba(215, 62, 62, 0);
  }
}

/* 加载文本样式 */
.loading-text {
  display: inline-block;
  color: #999;
  font-style: italic;
  animation: pulse 1.5s infinite;
}

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

/* Add margin before the "当日宜忌" title */
#todayYiJiTitle {
  margin-top: 25px;
}

.yi-content,
.ji-content {
  flex-grow: 1;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.5px;
  display: flex;
  flex-direction: column;
}

/* 星座容器样式 */
.constellation-container {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.95);
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.constellation-container::after {
  color: white;
  font-size: 14px;
  position: absolute;
  bottom: 8px;
  font-weight: 400;
  opacity: 0.9;
}

#constellation-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: transparent;
}

/* 添加八字结构表格样式 */
.bazi-structure-container {
  margin: 15px 0;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.bazi-structure-container h3 {
  text-align: center;
  margin-bottom: 10px;
  color: #333;
}

.bazi-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.bazi-table th,
.bazi-table td {
  padding: 8px;
  text-align: center;
  border: 1px solid #ddd;
}

.bazi-table th {
  background-color: #f5f5f5;
  font-weight: bold;
}

.bazi-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.bazi-table tr:hover {
  background-color: #f1f1f1;
}

/* 在暗色模式下调整样式 */
@media (prefers-color-scheme: dark) {
  .bazi-structure-container {
    background-color: rgba(40, 40, 40, 0.8);
  }

  .bazi-structure-container h3 {
    color: #eee;
  }

  .bazi-table th {
    background-color: #444;
    color: #fff;
  }

  .bazi-table td {
    color: #ddd;
    border-color: #555;
  }

  .bazi-table tr:nth-child(even) {
    background-color: #383838;
  }

  .bazi-table tr:hover {
    background-color: #505050;
  }
}

/* 古籍溯源样式 - 允许适当的换行 */
#classicalReference {
  color: #333;
  margin: 15px auto;
  font-weight: 400;
  text-align: center;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 50px;
  justify-content: center;
}

#classicalReference div {
  display: block;
  font-size: 16px;
  width: 100%;
  text-align: center;
  margin: 2px 0;
}

/* 图标栏的样式 */
.icons-bar-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  padding: 10px 0;
  margin-top: 10px;
}

/* Title fonts - for "幸会，xx" and "今日指引" */
h1,
h2,
#huangliGreeting,
#todayGuidanceTitle,
.section-title,
.open-popup-btn,
.huangli-header h2 {
  font-family: "SourceHanSerif", "SourceHanSerif", "SourceHanSerif", sans-serif;
  font-weight: normal;
}

/* PC Styles */
.huangli-container {
  max-width: 900px;
}

/* 新增：主表单容器样式 */
.main-form-container {
  max-width: 500px;
  margin: 40px auto;
  padding: 40px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.main-form-container h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 24px;
  color: #333;
  font-weight: 600;
}
