body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #2c3e50;
  height: 100vh;
  overflow-x: hidden;
  margin: 0;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
}
.makeliuyao {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  min-width: 380px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.makeliuyao:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}
.liuyaopan {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  min-width: 710px;
}

.container {
  text-align: center;
  border: 1px solid rgba(241, 233, 197, 0.3);
  border-radius: 16px;
  position: static;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  width: 465px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  margin: 0;
  font-size: 2.5rem;
  color: #2c3e50;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  font-weight: 600;
}

.date-selector {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0;
  max-width: 380px;
}

input[type="number"] {
  border: 2px solid rgba(204, 204, 204, 0.3);
  border-radius: 12px;
  font-size: 1rem;
  width: 60px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
}

input[type="number"]:focus {
  border-color: #e8d5b5;
  box-shadow: 0 0 0 3px rgba(232, 213, 181, 0.15);
  outline: none;
}

label {
  font-size: 1rem; /* 调整标签字体大小 */
}

button {
  height: 40px;
  padding: 0 20px;
  background: linear-gradient(135deg, #813c85 0%, #9b4d9f 100%);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(129, 60, 133, 0.2);
  margin: 10px;
}

button:hover {
  background: linear-gradient(135deg, #9b4d9f 0%, #b35eb7 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(129, 60, 133, 0.3);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(129, 60, 133, 0.2);
}

#result {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid rgba(209, 194, 211, 0.3);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  font-size: 0.95rem;
  line-height: 1.6;
  backdrop-filter: blur(8px);
}

.intendgua {
  display: flex;
  align-items: center;
  margin-top: 0.75rem;
  gap: 0.75rem;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  flex-direction: column;
  align-content: center;
  min-width: 425px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.intendgua:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}
.divination-method {
  display: flex;
  align-items: center;
  margin-top: 0.75rem;
  gap: 0.75rem;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  flex-direction: row;
  align-content: center;
  min-width: 350px;
  padding: 1.25rem;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
}
input[type="text"] {
  border: 2px solid rgba(204, 204, 204, 0.3);
  border-radius: 12px;
  font-size: 1rem;
  width: 100%;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
}

input[type="text"]:focus {
  border-color: #e8d5b5;
  box-shadow: 0 0 0 3px rgba(232, 213, 181, 0.15);
  outline: none;
}
.divination-method label {
  font-weight: bold;
}

.divination-method select {
  padding: 10px;
  border: 2px solid rgba(204, 204, 204, 0.3);
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.divination-method select:focus {
  border-color: #e8d5b5;
  box-shadow: 0 0 0 3px rgba(232, 213, 181, 0.15);
  outline: none;
}

.ascription {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.ascription img {
  max-width: 86px;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.ascription img:hover {
  transform: rotate(-360deg);
  filter: drop-shadow(0 6px 12px rgba(129, 60, 133, 0.3));
}

.ascription a {
  color: #813c85;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
}

.ascription a:hover {
  color: #9b4d9f;
  text-decoration: none;
}

.ascription a::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #813c85;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.ascription a:hover::after {
  transform: scaleX(1);
  background-color: #9b4d9f;
}

.ascription p {
  margin: 8px 0;
  font-size: 14px;
  color: #666;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  min-width: 135px;
  backdrop-filter: blur(8px);
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-group select {
  padding: 10px;
  border: 2px solid rgba(204, 204, 204, 0.3);
  border-radius: 12px;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

.option-group select:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.option-group select:focus {
  border-color: #e8d5b5;
  box-shadow: 0 0 0 3px rgba(232, 213, 181, 0.15);
  outline: none;
}

.option-group label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95rem;
}

.option-label {
  text-align: center;
  display: block;
  font-weight: bold;
}

.stop-button {
  background: linear-gradient(135deg, #c3952b 0%, #d4a73c 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(195, 149, 43, 0.2);
}

.stop-button:hover {
  background: linear-gradient(135deg, #d4a73c 0%, #e3b84d 100%);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(195, 149, 43, 0.3);
}

.stop-button:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(195, 149, 43, 0.2);
}

.select.disabled {
  background-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
  border: 2px solid #ced4da;
}

.mainbody {
  display: grid;
}

/* 页脚样式 */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.2rem;
  text-align: center;
  background: transparent;
  backdrop-filter: blur(4px);
  box-shadow: none;
  border-top: 1px solid rgba(241, 233, 197, 0.2);
  z-index: 100;
}

.footer p {
  margin: 8px 0;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

.footer a {
  color: #813c85;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
}

.footer a:hover {
  color: #9b4d9f;
}

.footer a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: #9b4d9f;
  transition: width 0.3s ease;
}

.footer a:hover::after {
  width: 100%;
}

.footer .site-stats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 5px;
  font-size: 0.9rem;
  color: #666;
  background: rgba(241, 233, 197, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
}

.stats-label {
  color: #813c85;
  font-weight: 500;
}

#site_pv,
#site_uv {
  color: #9b4d9f;
  font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 768px) {
  body {
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
  }

  .makeliuyao {
    width: calc(100% - 1rem);
    max-width: 100%;
    margin: 1rem 0.5rem;
    min-width: auto;
    box-sizing: border-box;
  }

  .makeliuyao:hover {
    transform: none;
  }

  .liuyaopan {
    flex-direction: column;
    min-width: auto;
    width: 100%;
    padding: 0.75rem;
    box-sizing: border-box;
    margin: 0;
    overflow-x: hidden;
  }

  .container {
    width: 100%;
    padding: 0.75rem;
    box-sizing: border-box;
    margin: 0;
  }

  .date-selector {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
  }

  .intendgua {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.75rem 0;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    min-width: auto;
    width: 100%;
    box-sizing: border-box;
  }

  .intendgua input[type="text"] {
    width: 100%;
    padding: 8px;
    font-size: 0.95rem;
  }

  .divination-method {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 8px;
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin: 8px 0;
    align-items: center;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  .divination-method label {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
  }

  .divination-method select {
    height: 32px;
    padding: 0 24px 0 8px;
    border: 1px solid rgba(129, 60, 133, 0.2);
    border-radius: 6px;
    font-size: 14px;
    color: #813c85;
    background-color: rgba(255, 255, 255, 0.95);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23813c85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    min-width: 0;
  }

  .divination-method select:focus {
    outline: none;
    border-color: #813c85;
    box-shadow: 0 0 0 2px rgba(129, 60, 133, 0.15);
  }

  #shakeButton,
  #convertButton {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 6px;
    white-space: nowrap;
    min-width: 60px;
  }

  #shakeButton {
    background: linear-gradient(135deg, #c3952b 0%, #d4a73c 100%);
    margin-right: 6px;
  }

  #convertButton {
    background: linear-gradient(135deg, #813c85 0%, #9b4d9f 100%);
  }

  .divination-method .button-group {
    display: flex;
    gap: 6px;
  }

  @media (max-width: 480px) {
    .divination-method {
      grid-template-columns: 60px 1fr;
      grid-template-rows: auto auto;
      gap: 6px;
      padding: 8px;
    }

    .divination-method .button-group {
      grid-column: 1 / -1;
      justify-content: flex-end;
      margin-top: 6px;
    }

    #shakeButton,
    #convertButton {
      min-width: auto;
      flex: 1;
      max-width: 120px;
    }
  }

  .option-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 2px solid rgba(129, 60, 133, 0.2);
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.95);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23813c85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    box-shadow: 0 2px 6px rgba(129, 60, 133, 0.1);
    transition: all 0.3s ease;
    color: #2c3e50;
    cursor: pointer;
    margin-bottom: 8px;
  }

  .option-group select:focus,
  .divination-method select:focus {
    outline: none;
    border-color: #813c85;
    box-shadow: 0 0 0 3px rgba(129, 60, 133, 0.15);
    background-color: #fff;
  }

  .option-group select:active,
  .divination-method select:active {
    transform: scale(0.98);
  }

  /* 选择框展开时的样式 */
  .option-group select:focus option,
  .divination-method select:focus option {
    padding: 10px;
    font-size: 16px;
    background-color: #fff;
    color: #2c3e50;
  }

  /* 禁用状态 */
  .option-group select:disabled,
  .divination-method select:disabled {
    background-color: rgba(244, 244, 244, 0.95);
    border-color: rgba(204, 204, 204, 0.3);
    color: #999;
    cursor: not-allowed;
    opacity: 0.8;
  }

  /* 选择框容器样式 */
  .option-group,
  .divination-method {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  /* 标签样式 */
  .option-group label,
  .divination-method label {
    flex: 0 0 auto;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    min-width: 60px;
  }

  /* 选项组标题样式 */
  .option-label {
    font-size: 15px;
    font-weight: 600;
    color: #813c85;
    margin-bottom: 12px;
    text-align: center;
    padding: 8px;
    background: rgba(129, 60, 133, 0.05);
    border-radius: 8px;
  }

  /* 禁用所有hover效果 */
  .option-group select:hover,
  .divination-method select:hover {
    transform: none;
    box-shadow: none;
  }

  /* 固定容器高度 */
  .options-container {
    height: auto;
    min-height: 300px;
  }

  .option-group {
    height: 44px;
    margin-bottom: 8px;
  }

  /* 移除不必要的动画 */
  .makeliuyao,
  .makeliuyao:hover,
  .intendgua,
  .intendgua:hover {
    transform: none;
    transition: none;
  }

  .liuyaopanresult {
    min-width: auto;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0.5rem;
    padding: 0.75rem;
    box-sizing: border-box;
  }

  .liuyaopanresult.show {
    min-width: auto;
    width: 100%;
    max-width: 100%;
  }

  #nowguaxiangshow {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  #nowguaxiangshow:not(:has(.special-table:only-child))
    .special-table:first-child
    td:nth-child(2) {
    left: 20px;
    transform: translateY(25px);
  }

  /* 单表格样式 */
  #nowguaxiangshow:has(.special-table:only-child) {
    transform: none;
    margin: 0;
    padding: 10px;
    width: 100%;
  }

  #nowguaxiangshow:has(.special-table:only-child) .special-table {
    width: 100%;
    min-width: 100%;
    margin: 0;
    transform: none;
  }

  /* 双表格样式 */
  #nowguaxiangshow:not(:has(.special-table:only-child)) {
    transform: none;
    margin: 0;
    padding: 10px;
  }

  #nowguaxiangshow:not(:has(.special-table:only-child)) .special-table {
    flex: 0 0 calc(50% - 0.25rem);
    width: calc(50% - 0.25rem);
    min-width: 0;
    margin: 0;
    font-size: 0.9rem;
    display: table;
    border-collapse: collapse;
    table-layout: fixed;
  }

  #nowguaxiangshow:not(:has(.special-table:only-child)) .special-table th,
  #nowguaxiangshow:not(:has(.special-table:only-child)) .special-table td {
    padding: 4px 6px;
    line-height: 1.2;
    vertical-align: middle;
    height: 24px;
    box-sizing: border-box;
  }

  #nowguaxiangshow:not(:has(.special-table:only-child)) .special-table tr {
    height: 24px;
  }

  #nowguaxiangshow:not(:has(.special-table:only-child))
    .special-table:first-child
    td,
  #nowguaxiangshow:not(:has(.special-table:only-child))
    .special-table:first-child
    th {
    white-space: nowrap;
    overflow: visible;
  }

  #nowguaxiangshow:not(:has(.special-table:only-child))
    .special-table:last-child
    td,
  #nowguaxiangshow:not(:has(.special-table:only-child))
    .special-table:last-child
    th {
    white-space: normal;
    word-break: break-word;
  }

  #nowguaxiangshow .special-table th,
  #nowguaxiangshow .special-table td {
    font-size: 0.8rem;
  }

  #nowguaxiangshow .special-table img {
    max-width: 24px;
    height: 24px;
    vertical-align: middle;
    display: inline-block;
  }

  .special-table {
    width: 48%;
    min-width: auto;
    margin: 0.5rem 0;
    font-size: 0.9rem;
  }

  .special-table th,
  .special-table td {
    padding: 4px;
    font-size: 0.8rem;
  }

  .special-table img {
    max-width: 30px;
  }

  .guayaoci {
    padding: 10px;
    margin: 5px;
    height: auto;
    max-height: none;
    width: 100%;
    box-sizing: border-box;
    overflow-y: visible;
  }

  .hexagram-info {
    padding: 0.75rem;
  }

  .hexagram-description {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .hexagram-yao {
    margin-top: 0.5rem;
  }

  .hexagram-yao th,
  .hexagram-yao td {
    padding: 6px;
    font-size: 0.9rem;
  }

  .card-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    width: 100%;
    box-sizing: border-box;
    gap: 10px;
  }

  .footer .site-stats {
    font-size: 0.85rem;
    padding: 3px 10px;
  }

  .liuyaopanresult {
    min-width: auto;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0.5rem;
    padding: 0.75rem;
    box-sizing: border-box;
  }

  .liuyaopanresult.show {
    min-width: auto;
    width: 100%;
    max-width: 100%;
  }

  #nowguaxiangshow .special-table:first-child td:nth-child(2) {
    position: static;
    transform: none;
    width: auto;
    padding: 4px;
  }

  .special-table img {
    max-width: 40px;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: contain;
  }

  .guayaoci {
    padding: 10px;
    margin: 5px;
    height: auto;
    max-height: none;
    width: 100%;
    box-sizing: border-box;
    overflow-y: visible;
  }

  .hexagram-info {
    padding: 0.75rem;
  }

  .hexagram-description {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .hexagram-yao {
    margin-top: 0.5rem;
  }

  .hexagram-yao th,
  .hexagram-yao td {
    padding: 6px;
    font-size: 0.9rem;
  }

  .card-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    width: 100%;
    box-sizing: border-box;
    gap: 10px;
  }

  .hexagram-subtitle {
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
  }

  .switch-card {
    padding: 4px 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .options-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 16px;
    margin: 12px 0;
  }

  .options-container .option-group {
    position: relative;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .options-container .option-group:last-child {
    border-bottom: none;
  }

  .options-container .option-group label {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #333;
    font-weight: normal;
  }

  .options-container .option-group select {
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    padding: 16px 24px 16px 70px;
    font-size: 16px;
    color: #813c85;
    font-weight: 500;
    text-align: right;
    cursor: pointer;
  }

  .options-container .option-group::after {
    content: "";
    position: absolute;
    right: 8px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    transform: translateY(-50%) rotate(-45deg);
  }

  .options-container .option-group select:focus {
    outline: none;
  }

  .options-container .option-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin: 0 0 8px 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .options-container .option-group:active {
    background-color: rgba(0, 0, 0, 0.02);
  }

  .options-container .option-group.disabled {
    opacity: 0.5;
  }

  .options-container .option-group select:disabled {
    color: #999;
    cursor: not-allowed;
  }

  .options-container select option {
    font-size: 16px;
    padding: 12px;
    color: #333;
    background: #fff;
  }
}

.liuyaopanresult {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  min-width: 380px;
  max-width: 800px;
  margin-left: 1rem;
  position: relative;
  z-index: 1000;
  visibility: visible;
}

.liuyaopanresult.show {
  display: block !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  min-width: 490px;
}

@media (max-width: 768px) {
  .liuyaopanresult {
    min-width: auto;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0.5rem;
    padding: 0.75rem;
    box-sizing: border-box;
  }

  .liuyaopanresult.show {
    min-width: auto;
    width: 100%;
    max-width: 100%;
  }
}

/* 为表格容器设置样式 */
#nowguaxiangshow {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  gap: 2rem;
  margin-top: 1rem;
}
/* 为特定表格设置样式 */

.special-table {
  width: 100%;
  border-collapse: separate; /* 改为 separate 以支持更灵活的布局 */
  border-spacing: 0; /* 移除单元格间距 */
  margin-bottom: 5px;
  font-family: Arial, sans-serif;
  position: relative;
}

.special-table th,
.special-table td {
  padding: 10px;
  text-align: center;
  /*border: 1px solid #ddd;*/
  vertical-align: middle; /* 垂直居中 */
  white-space: nowrap;
}

.special-table th {
  background-color: #f2f2f2;
  font-weight: bold;
  position: sticky; /* 可选：表头吸顶 */
  top: 0;
  z-index: 2;
}

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

.special-table tr:hover {
  background-color: #e5e5e5;
  transition: background-color 0.3s ease; /* 添加平滑过渡效果 */
}

.special-table img {
  max-width: 50px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* 为"本卦"和"变卦"单元格添加特殊样式 */
.special-table tr:first-child th {
  background-color: #f1e9c5;
  color: #c62828;
  text-transform: uppercase;
  border-radius: 10px;
}

/* 第二列特殊处理 */
#nowguaxiangshow .special-table:first-child td:nth-child(2) {
  position: absolute;
  left: 59px;
  transform: translateY(33px);
  z-index: 1;
  width: 0;
  overflow: visible;
  padding: 0;
  border: none;
  white-space: nowrap;
  display: inline-block;
  font-size: 12px;
  color: #c62828;
}

#nowguaxiangshow .special-table:first-child td:nth-child(5) {
  text-align: left;
}

/* 确保父级td相对定位 */
.special-table td {
  position: relative;
  white-space: nowrap;
}

#mattersettingshow {
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 0px solid #d1c2d3;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 6px;
  width: 97%;
  align-content: flex-start;
  justify-content: center;
  height: 15px;
  overflow: hidden; /* 隐藏溢出内容 */
  white-space: nowrap; /* 不换行 */
  text-overflow: ellipsis; /* 超出部分使用省略号表示 */
}

.ganzhi-red {
  color: #ff0000;
  font-weight: bold;
}

/* 卦爻辞容器样式 */
.guayaoci {
  padding: 15px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin: 10px auto;
  max-width: 520px;
  height: 17.5rem;
  overflow-y: auto;
  position: relative;
  box-sizing: border-box;
}

/* 卦象信息卡片样式 */
.hexagram-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hexagram-title {
  font-size: 18px;
  color: #333;
  text-align: center;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.hexagram-description {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 14px;
}

.hexagram-description p {
  margin: 5px 0;
  line-height: 1.4;
}

/* 爻辞表格样式 */
.hexagram-yao {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: #fff;
  font-size: 13px;
  table-layout: fixed;
}

.hexagram-yao th {
  background: #f1e9c5;
  color: #333;
  padding: 8px;
  text-align: left;
  font-weight: 600;
  position: sticky;
  top: 35px;
  z-index: 1;
  width: 15%;
}

.hexagram-yao td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  line-height: 1.4;
  word-wrap: break-word;
  word-break: break-all;
  white-space: normal;
}

.hexagram-yao td:nth-child(2) {
  width: 35%;
}

.hexagram-yao td:nth-child(3) {
  width: 50%;
}

.hexagram-yao tr:hover {
  background: #f8f9fa;
}

/* 本卦变卦切换样式 */
.hexagram-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  position: relative;
}

.hexagram-card {
  display: none;
  width: 100%;
  background: #fff;
  border-radius: 6px;
  padding: 10px;
  box-sizing: border-box;
}

.hexagram-card.active {
  display: block;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 16px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.hexagram-subtitle {
  font-size: 16px;
  color: #333;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hexagram-subtitle::after {
  content: "·";
  color: #813c85;
  margin: 0 4px;
}

.switch-card {
  padding: 6px 12px;
  background-color: #813c85;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.switch-card:hover {
  background-color: #6a2f6d;
}

.hexagram-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.hexagram-title {
  font-size: 18px;
  color: #333;
  text-align: center;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
}

.hexagram-description {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.hexagram-yao {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: #fff;
  font-size: 13px;
  box-sizing: border-box;
}

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

.guayaoci::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.guayaoci::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.guayaoci::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .guayaoci {
    padding: 10px;
    margin: 5px;
    height: auto;
    max-height: none;
    width: 100%;
    box-sizing: border-box;
    overflow-y: visible;
  }

  .hexagram-info {
    padding: 0.75rem;
  }

  .hexagram-description {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .hexagram-yao {
    margin-top: 0.5rem;
  }

  .hexagram-yao th,
  .hexagram-yao td {
    padding: 6px;
    font-size: 0.9rem;
  }

  .card-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    width: 100%;
    box-sizing: border-box;
    gap: 10px;
  }

  .hexagram-subtitle {
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
  }

  .switch-card {
    padding: 4px 8px;
    font-size: 12px;
    white-space: nowrap;
  }
}

.hexagram-info table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

/* 第一列样式 */
.hexagram-info table th:first-child,
.hexagram-info table td:first-child {
  width: 10%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 第二列和第三列样式 */
.hexagram-info table th:nth-child(2),
.hexagram-info table td:nth-child(2),
.hexagram-info table th:nth-child(3),
.hexagram-info table td:nth-child(3) {
  width: 45%;
  word-wrap: break-word;
  word-break: break-all;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .hexagram-info table th:first-child,
  .hexagram-info table td:first-child {
    width: 12%;
  }

  .hexagram-info table th:nth-child(2),
  .hexagram-info table td:nth-child(2),
  .hexagram-info table th:nth-child(3),
  .hexagram-info table td:nth-child(3) {
    width: 44%;
  }
}
