.bg-paper {
  background-color: #FCF9E8;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23d2b48c' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
}
.border-xiang {
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='75' height='75'%3E%3Cg fill='none' stroke='%238B4513' stroke-width='2'%3E%3Cpath d='M1 1h73v73H1z'/%3E%3Cpath d='M8 8h59v59H8z'/%3E%3Cpath d='M8 8l59 59M67 8L8 67'/%3E%3C/g%3E%3C/svg%3E") 25 25 stretch;
}
.bazi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 1px;
}
.animate-float {
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* PC端限制最大宽度为1200px */
@media (min-width: 768px) {
  .container {
    max-width: 1200px !important;
  }
}

/* 自定义滚动条样式 - 移动端和PC端 */
.overflow-x-auto {
  scrollbar-width: thin;
  scrollbar-color: #8B4513 #F5F5DC;
  -webkit-overflow-scrolling: touch;
}

.overflow-x-auto::-webkit-scrollbar {
  height: 8px;
}

.overflow-x-auto::-webkit-scrollbar-track {
  background: #F5F5DC;
  border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
  background: #8B4513;
  border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
  background: #654321;
}

/* 移动端滚动提示 */
@media (max-width: 767px) {
  .overflow-x-auto {
    scrollbar-width: auto;
  }
  
  .overflow-x-auto::-webkit-scrollbar {
    height: 6px;
  }
}

/* 移动端导航菜单动画 */
#mobile-menu {
  animation: slideDown 0.3s ease-out;
}

#mobile-menu.hidden {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 移动端导航链接样式 */
.mobile-nav-link {
  display: block;
  transition: all 0.3s ease;
}

.mobile-nav-link:active {
  background-color: rgba(210, 180, 140, 0.3);
  transform: scale(0.98);
}

/* 粘性导航栏阴影 */
header.sticky {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 回到顶部按钮样式 */
#back-to-top {
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

#back-to-top.show {
  opacity: 1 !important;
  visibility: visible !important;
}

/* 移动端调整按钮位置 */
@media (max-width: 767px) {
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
  }
}

/* 表单输入框样式优化 */
#bazi-form input:focus,
#bazi-form select:focus {
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

#bazi-form button[type="submit"]:hover {
  transform: translateY(-2px);
}

#bazi-form button[type="submit"]:active {
  transform: translateY(0);
}

/* 日期输入框样式 */
.date-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.date-input {
  width: 100%;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  padding-left: 0.75rem;
  padding-right: 2.5rem;
  border: 2px solid rgba(210, 180, 140, 0.3);
  border-radius: 6px;
  font-size: 16px;
  color: #333;
  background: white;
  transition: border-color 0.3s;
  cursor: pointer;
  box-sizing: border-box;
}

.date-input:focus {
  outline: none;
  border-color: #8B4513;
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.date-input::placeholder {
  color: #999;
}

.calendar-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  cursor: pointer;
  color: #666;
  transition: color 0.3s;
}

.calendar-icon:hover {
  color: #8B4513;
}

/* 滚轮选择器模态框 */
.picker-modal {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.picker-modal.active {
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
  backdrop-filter: blur(2px);
}

.modal-backdrop.active {
  display: block;
}

/* 选择器头部 */
.picker-header {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
}

.picker-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.picker-actions {
  display: flex;
  gap: 10px;
}

.picker-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.picker-cancel {
  background: #f5f5f5;
  color: #333;
}

.picker-cancel:hover {
  background: #e0e0e0;
}

.picker-confirm {
  background: #8B4513;
  color: white;
  font-weight: 600;
}

.picker-confirm:hover {
  background: #654321;
}

/* 日历信息栏 */
.calendar-info {
  padding: 15px 20px;
  text-align: center;
  font-size: 16px;
  color: #333;
  font-weight: 500;
  border-bottom: 1px solid #eee;
}

/* 滚轮容器 */
.wheel-wrapper {
  display: flex;
  height: 240px;
  position: relative;
  overflow: hidden;
}

.wheel-column {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

@media (max-width: 600px) {
  .wheel-column {
    min-width: 0;
    flex: 1;
  }
  
  .wheel-column:nth-child(1) {
    flex: 0 0 20%;
  }
  
  .wheel-column:nth-child(2) {
    flex: 0 0 20%;
  }
  
  .wheel-column:nth-child(3) {
    flex: 0 0 20%;
  }
  
  .wheel-column:nth-child(4) {
    flex: 0 0 20%;
  }
  
  .wheel-column:nth-child(5) {
    flex: 0 0 20%;
  }
  
  .wheel-item {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
  }
}

.wheel-scroll {
  list-style: none;
  position: absolute;
  width: 100%;
  top: 100px;
  transition: transform 0.1s ease-out;
  padding: 0;
  z-index: 5;
}

.wheel-item {
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 17px;
  font-weight: 500;
  color: #888;
  line-height: 40px;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 10;
}

.wheel-item.active {
  color: #333 !important;
  font-weight: 600;
  z-index: 20;
  position: relative;
}

.wheel-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(to bottom, 
    rgba(255,255,255,0.9) 0%, 
    rgba(255,255,255,0) 25%, 
    rgba(255,255,255,0) 75%, 
    rgba(255,255,255,0.9) 100%);
  z-index: 10;
}

.wheel-highlight {
  position: absolute;
  top: 100px;
  left: 0;
  right: 0;
  height: 40px;
  border-radius: 8px;
  z-index: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  pointer-events: none;
  background: rgba(139, 69, 19, 0.1);
  border: 1px solid rgba(139, 69, 19, 0.2);
}

/* AI 功能按钮样式 */
.ai-feature-btn {
  text-align: center;
  cursor: pointer;
  transform: translateY(0);
}

.ai-feature-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
}

.ai-feature-btn:active {
  transform: translateY(0);
}

/* AI 结果显示区域 */
#ai-result-container {
  animation: fadeIn 0.3s ease-in;
}

#ai-result-container .p-4,
#ai-result-container .md\:p-5 {
  padding: 12px !important;
}

#ai-result-content {
  white-space: normal !important;
  line-height: 1.5;
  padding: 0 !important;
  margin: 0;
}

#ai-result-content p {
  margin: 0.3rem 0;
  line-height: 1.55;
}

#ai-result-content ul,
#ai-result-content ol {
  margin: 0.25rem 0;
  padding-left: 1rem;
}

#ai-result-content li {
  margin: 0.12rem 0;
  line-height: 1.5;
}

#ai-result-content h3,
#ai-result-content h4,
#ai-result-content h5 {
  margin: 0.4rem 0 0.25rem;
}

#ai-result-content blockquote {
  margin: 0.25rem 0;
  padding: 0 0.75rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 运势选择器按钮 */
.yunshi-tab-btn {
  transition: all 0.3s ease;
}

/* 对比选择器样式 */
#duibi-select-1,
#duibi-select-2 {
  cursor: pointer;
}

/* 移动端底部固定导航栏 */
#mobile-bottom-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.mobile-nav-btn {
  min-width: 60px;
  flex: 1;
}

.mobile-nav-btn.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #f4a460;
}

/* 为移动端页面内容添加底部padding，避免被底部导航栏遮挡 */
@media (max-width: 767px) {
  main {
    padding-bottom: 70px;
  }
  
  footer {
    margin-bottom: 70px;
  }
  
  #back-to-top {
    bottom: 90px;
  }
}

