/* css/mobile.css - 观易助手手机端样式 */

/* ==================== 全局样式 ==================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #F7F8FA;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  min-height: 100vh;
}

/* ==================== 介绍页样式 ==================== */

.intro-page {
  padding: 16px;
  min-height: 100vh;
}

.intro-header {
  text-align: center;
  padding: 40px 0 30px;
}

.intro-title {
  font-size: 32px;
  font-weight: bold;
  color: #323233;
  margin-bottom: 8px;
}

.intro-subtitle {
  font-size: 14px;
  color: #969799;
}

.intro-card {
  margin-bottom: 16px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  padding: 12px 0;
}

.step-number {
  width: 28px;
  height: 28px;
  background: #FF6B2C;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 15px;
  color: #323233;
  margin: 0 0 4px 0;
}

.step-content p {
  font-size: 13px;
  color: #646566;
  margin: 0;
  line-height: 1.5;
}

/* ==================== 输入页样式 ==================== */

.input-page {
  background: #F7F8FA;
  min-height: 100vh;
  padding-bottom: 70px;
}

.coin-section {
  padding: 16px;
}

.coin-row {
  margin-bottom: 16px;
}

.coin-label {
  font-size: 14px;
  color: #323233;
  font-weight: 500;
  margin-bottom: 8px;
}

.coin-label-sub {
  font-size: 12px;
  color: #969799;
  margin-left: 8px;
}

.question-section {
  padding: 0 16px 16px;
}

.time-section {
  padding: 0 16px 16px;
}

.time-pickers {
  display: flex;
  gap: 8px;
}

.time-picker-item {
  flex: 1;
}

.submit-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 8px 16px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

/* ==================== 结果页样式 ==================== */

.result-page {
  background: #F7F8FA;
  min-height: 100vh;
  padding-bottom: 16px;
}

.result-header {
  background: white;
  padding: 12px 16px;
  border-bottom: 1px solid #EBEDF0;
}

.result-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.result-title {
  font-size: 18px;
  font-weight: 600;
  color: #323233;
}

.info_box {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  width: 96%;
  margin: 0 auto;
}

.van-cell-group {
  margin-top: 16px;
}

.info_box .info_row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  padding: 0 3%;
  color: #010101;
  line-height: 33px;
  background-color: #fff
}

.info_box .info_row:first-child {
  background-color: #bbb;
  color: #fff;
}

.info_box .info_row:first-child .info_row_label {
  color: #fff;
}

.info_row:nth-child(2n+1) {
  background-color: #ebebeb
}

.info_box .info_row .info_row_label {
  color: #454545;
  white-space: nowrap
}

.info_box .info_row .info_row_value {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  white-space: nowrap;
  overflow-x: visible
}

.info_box .info_row .info_row_right {
  float: right
}

.info_box .info_row .info_row_right2 {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: 50%;
  white-space: nowrap
}

.ganzhi_box {
  width: 100%;
  margin-top: 10px;
}

.ganzhi_box .title {
  color: #9e9e9e;
}

.ganzhi_box .van-col {
  text-align: center;
  width: 20%;
}

.gan_zhi {
  font-size: 18px;
  line-height: 36px;
  font-weight: bold;
}

.mu {
  color: #07e930;
}

.huo {
  color: #d30505;
}

.tu {
  color: #8b6d03;
}

.jin {
  color: #ef9104;
}

.shui {
  color: #2e83f6;
}

.question-card {
  margin: 12px 16px;
}

.question-label {
  font-size: 12px;
  color: #969799;
  margin-bottom: 8px;
}

.question-text {
  font-size: 14px;
  color: #323233;
  line-height: 1.6;
}

.gua-display {
  margin: 0 16px 12px;
}

.gua-card {
  background: white;
  border-radius: 8px;
  padding: 16px 0;
  margin-bottom: 12px;
}

.gua-card-header {
  font-size: 12px;
  color: #969799;
  text-align: center;
  margin-bottom: 8px;
}

.gua-name {
  font-size: 22px;
  font-weight: bold;
  color: #323233;
  text-align: center;
  margin-bottom: 16px;
}

.gua-table {
  font-size: 11px;
  font-weight: 600;
}

.gua-table-header {
  display: flex;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #EBEDF0;
  font-weight: 600;
  color: #646566;
  background: #F7F8FA;
}

.gua-table-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #F7F8FA;
  text-align: center;
}

.gua-table-row:last-child {
  border-bottom: none;
}

.col-yao {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.col-liushen,
.col-liuqin,
.col-najia,
.col-shiying {
  text-align: center;
}
.col-liushen,
.col-liuqin,
.col-shiying {
  width: 30px;
}
.col-najia {
  width: 38px;
}

.yao-symbol-mini {
  width: 100%;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

.yao-yang-mini {
  width: 50%;
  height: 3px;
  background: #323233;
  border-radius: 1px;
}

.yao-yang-mini.moving {
  background: #EE0A24;
}

.yao-yin-mini {
  width: 50%;
  height: 3px;
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.yao-yin-part-mini {
  flex: 1;
  height: 100%;
  background: #323233;
  border-radius: 1px;
}

.yao-yin-part-mini.moving {
  background: #EE0A24;
}

.yao-name-text {
  font-size: 10px;
  color: #646566;
}

.analysis-section {
  margin: 0 16px 12px;
}

.analysis-card {
  background: white;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.analysis-title {
  font-size: 15px;
  font-weight: 600;
  color: #323233;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F7F8FA;
}

.analysis-text-main {
  font-size: 13px;
  color: #323233;
  line-height: 1.6;
  margin-bottom: 6px;
}

.analysis-text-sub {
  font-size: 12px;
  color: #646566;
  line-height: 1.5;
  margin-bottom: 4px;
}

.position-item {
  background: #F7F8FA;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.position-item:last-child {
  margin-bottom: 0;
}

.position-level {
  font-size: 13px;
  font-weight: 600;
  color: #323233;
  margin-bottom: 4px;
}

.position-desc {
  font-size: 12px;
  color: #646566;
  line-height: 1.5;
  margin-bottom: 4px;
}

.position-yao {
  font-size: 11px;
  color: #969799;
  margin-bottom: 4px;
}

.position-suggest {
  font-size: 12px;
  color: #646566;
  line-height: 1.5;
}

.suggestion-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: 13px;
  color: #323233;
  line-height: 1.6;
}

.suggestion-dot {
  margin-right: 6px;
  margin-top: 4px;
  font-size: 14px;
  color: #FF976A;
  flex-shrink: 0;
}

.suggestion-dot.high {
  color: #FF6B2C;
  font-weight: bold;
}

.disclaimer-card {
  margin: 0 16px 16px;
  background: #FFF9E6;
  border: 1px solid #FFE6A0;
  border-radius: 8px;
  padding: 12px;
}

.disclaimer-card p {
  font-size: 11px;
  color: #856404;
  line-height: 1.5;
  margin: 0;
}

.disclaimer-card strong {
  font-weight: 600;
}

/* ==================== 错误状态 ==================== */

.error-state {
  padding: 60px 20px;
  text-align: center;
}

.error-icon {
  font-size: 48px;
  color: #FF6B2C;
  margin-bottom: 16px;
}

.error-text {
  font-size: 14px;
  color: #646566;
  margin-bottom: 20px;
}

/* ==================== 动画效果 ==================== */

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-card,
.question-card,
.gua-card,
.analysis-card {
  animation: fadeIn 0.3s ease-out;
}

/* ==================== 滚动优化 ==================== */

.result-page {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ==================== 安全区域适配 (iPhone X等) ==================== */

@supports (padding: env(safe-area-inset-bottom)) {
  .submit-bar {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .input-page {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
}