/* ===== 撕页日历外框 ===== */
.tear-calendar-wrap {
  padding: 0 15px;
  margin-top: -1px;
  background: #f5f5f5;
}
.tear-calendar {
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(26,26,46,0.12);
  background: #fff;
}
.tear-top {
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
  padding: 8px 16px; display: flex; justify-content: space-between; align-items: center;
}
.tear-month { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: 2px; }
.tear-year { font-size: 13px; color: rgba(255,255,255,0.8); }

.tear-body { padding: 12px 16px 8px; text-align: center; background: #fff; }
.tear-day {
  font-size: 72px; font-weight: 800; color: #1a1a2e; line-height: 1;
  font-family: "Georgia", "Times New Roman", serif;
}
.tear-weekday { font-size: 15px; color: #555; margin-top: 2px; letter-spacing: 4px; }
.tear-lunar { font-size: 13px; color: #666; margin-top: 8px; }
.tear-ganzhi {
  font-size: 12px; color: #888; margin-top: 4px;
  font-family: "KaiTi", "STKaiti", serif;
}
.tear-dot { margin: 0 4px; color: #ccc; }
.tear-extra {
  display: flex; justify-content: center; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}
.tear-tag {
  font-size: 11px; color: #667eea; background: #f0f2ff;
  padding: 2px 8px; border-radius: 10px;
}
.tear-chong {
  font-size: 11px; color: #999; margin-top: 6px;
}

.tear-bottom {
  background: #fafafa; padding: 10px 16px; border-top: 1px dashed #e0e0e0;
}
.tear-yi-ji { display: flex; flex-direction: column; gap: 6px; }
.tear-yi-row, .tear-ji-row {
  display: flex; align-items: flex-start; gap: 8px;
}
.tear-label {
  font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 4px;
  flex-shrink: 0; text-align: center; min-width: 28px;
}
.yi-label { background: #e8f5e9; color: #2e7d32; }
.ji-label { background: #ffebee; color: #c62828; }
.tear-items { font-size: 12px; color: #555; line-height: 1.6; }

/* ===== 首页 ===== */
.home-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 40px 15px 16px; color: #fff; text-align: center;
  position: relative; overflow: hidden;
}
.home-banner::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-image: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 20%),
                    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.05) 0%, transparent 25%);
  pointer-events: none;
}
.home-banner .app-title {
  display: block; font-size: 30px; font-weight: 700;
  letter-spacing: 6px; margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  font-family: "STKaiti", "KaiTi", serif;
}
.home-banner .app-slogan {
  display: block; font-size: 14px; opacity: 0.8; letter-spacing: 2px;
}

.home-cards {
  padding: 15px 15px; display: flex; flex-direction: column; gap: 12px;
}
.home-card {
  background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
  border-radius: 12px; padding: 28px 20px; display: flex; align-items: center;
  box-shadow: 0 4px 12px rgba(26,26,46,0.08); cursor: pointer;
  border: 1px solid rgba(255,255,255,0.8); transition: transform 0.15s;
}
.home-card:active { transform: scale(0.98); }
.home-card .card-icon { font-size: 40px; margin-right: 20px; }
.home-card .card-title { display: block; font-size: 18px; font-weight: 600; color: #1a1a2e; margin-bottom: 4px; }
.home-card .card-desc { display: block; font-size: 13px; color: #666; }

.compliance-footer {
  padding: 20px 15px 30px; text-align: center;
}
.compliance-footer .footer-line {
  display: block; font-size: 11px; color: #999; line-height: 1.6;
}

/* ===== 占卜页 ===== */
.guide-tip {
  background: #fff8e1; color: #d4af37; padding: 10px 15px;
  font-size: 12px; text-align: center; border-bottom: 1px solid #ffeebb;
}
.input-field {
  width: 100%; min-height: 100px; padding: 12px; background: #f8f9ff;
  border: 1px solid #e8e8e8; border-radius: 8px; font-size: 14px;
  color: #333; resize: none; line-height: 1.6; font-family: inherit;
}
.char-count { text-align: right; font-size: 11px; color: #999; margin-top: 6px; }

/* 铜钱 */
.coins-area { display: flex; justify-content: center; gap: 15px; margin: 20px 0; }
.coin {
  width: 60px; height: 60px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #e6c15c, #b88a2d, #8b6508);
  box-shadow: inset 0 0 5px rgba(0,0,0,0.6), 0 2px 5px rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  position: relative; transition: transform 0.5s;
}
.coin.shaking { animation: shake 0.5s infinite; }
@keyframes shake {
  0% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-10px) rotate(20deg); }
  50% { transform: translateY(0) rotate(0); }
  75% { transform: translateY(10px) rotate(-20deg); }
  100% { transform: translateY(0) rotate(0); }
}
.coin-border {
  width: 50px; height: 50px; border: 1px solid rgba(92,64,51,0.3);
  border-radius: 50%; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.coin-hole {
  width: 16px; height: 16px; background: #2a2a2a;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 2px;
}
.coin-char {
  position: absolute; font-size: 11px; font-weight: bold;
  color: #4a3020; font-family: "KaiTi", "STKaiti", serif;
}
.coin-char.top { top: 3px; left: 50%; transform: translateX(-50%); }
.coin-char.bottom { bottom: 3px; left: 50%; transform: translateX(-50%); }
.coin-char.right { right: 3px; top: 50%; transform: translateY(-50%); }
.coin-char.left { left: 3px; top: 50%; transform: translateY(-50%); }

/* 爻象 */
.yao-stack { display: flex; flex-direction: column-reverse; gap: 8px; align-items: center; }
.yao-row { display: flex; align-items: center; width: 100%; justify-content: center; }
.yao-order { font-size: 11px; color: #999; width: 40px; text-align: right; margin-right: 10px; }
.yao-shape { width: 100px; height: 12px; display: flex; align-items: center; justify-content: center; }
.yao-solid { width: 100%; height: 100%; background: #333; border-radius: 2px; }
.yao-broken { width: 100%; height: 100%; display: flex; justify-content: space-between; }
.yao-dash { width: 42%; height: 100%; background: #333; border-radius: 2px; }
.yao-result-text { font-size: 11px; color: #666; width: 60px; margin-left: 10px; }

/* ===== 结果页 ===== */
.loading-state { text-align: center; padding: 80px 20px; }
.loading-state .loading-text { display: block; font-size: 16px; color: #333; margin-bottom: 8px; }
.loading-state .loading-sub { display: block; font-size: 13px; color: #999; margin-bottom: 4px; }
.loading-state .loading-tip { display: block; font-size: 12px; color: #bbb; }

.result-card { background: #fff; border-radius: 12px; margin: 15px; padding: 20px; }
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.result-type { font-size: 16px; font-weight: 600; color: #1a1a2e; }
.result-date { font-size: 12px; color: #999; }

.hexagram-box { text-align: center; padding: 16px 0; }
.hex-name { font-size: 20px; font-weight: 700; color: #1a1a2e; margin-bottom: 12px; }
.stick-box { text-align: center; padding: 16px 0; }
.stick-tag { font-size: 16px; color: #d4af37; font-weight: 600; }
.stick-num { font-size: 14px; color: #666; margin-top: 4px; }

.divider { height: 1px; background: #f0f0f0; margin: 16px 0; }
.ai-article { font-size: 14px; color: #444; line-height: 1.8; word-break: break-word; }
.ai-article strong { font-weight: bold; color: #000; }

.error-state { text-align: center; padding: 60px 20px; }
.error-icon { font-size: 48px; margin-bottom: 16px; }
.error-text { display: block; font-size: 18px; font-weight: 600; color: #333; margin-bottom: 8px; }
.error-sub { display: block; font-size: 13px; color: #999; }

/* ===== 解梦页 ===== */
.info-section { margin: 10px 15px; padding: 16px; background: #fff; border-radius: 12px; }
.info-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.info-item { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.info-item .info-icon { font-size: 16px; }
.info-item .info-text { font-size: 13px; color: #666; line-height: 1.5; }

/* ===== 用户页 ===== */
.user-header-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 30px 20px; text-align: center; color: #fff;
}
.avatar { width: 70px; height: 70px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.3); background: #fff; margin-bottom: 10px; overflow: hidden; }
.nickname { font-size: 18px; font-weight: 600; display: block; margin-bottom: 4px; }
.quota-info { display: flex; justify-content: center; align-items: baseline; gap: 4px; margin-top: 10px; }
.quota-label { font-size: 13px; opacity: 0.8; }
.quota-value { font-size: 28px; font-weight: 700; color: #d4af37; }
.quota-unit { font-size: 13px; opacity: 0.8; }

.menu-section { margin: 15px; }
.menu-item {
  display: flex; align-items: center; padding: 16px; background: #fff;
  border-radius: 10px; margin-bottom: 10px; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.menu-item .menu-text { flex: 1; font-size: 15px; color: #333; }
.menu-item .menu-badge { font-size: 12px; color: #d4af37; background: #fff8e1; padding: 2px 8px; border-radius: 10px; margin-right: 8px; }
.menu-item .menu-arrow { color: #ccc; font-size: 16px; }

/* ===== 黄历页 ===== */
.calendar-form .input-group {
  display: flex; align-items: center; padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}
.calendar-form .input-group .label { width: 70px; font-size: 14px; color: #666; flex-shrink: 0; }
.calendar-form .input-group input,
.calendar-form .input-group select {
  flex: 1; border: none; font-size: 14px; color: #333;
  background: transparent; outline: none; padding: 4px 0;
}
.type-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.type-tag {
  padding: 6px 12px; background: #f0f0f0; border-radius: 15px;
  font-size: 12px; color: #666; cursor: pointer; transition: all 0.2s;
}
.type-tag.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; }

.date-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.date-item { flex: 1; }
.date-item .sub-label { display: block; font-size: 12px; color: #999; margin-bottom: 4px; }
.date-item input[type="date"] {
  width: 100%; padding: 8px; border: 1px solid #e8e8e8; border-radius: 6px;
  font-size: 14px; color: #333; background: #f8f9ff;
}
.date-arrow { font-size: 16px; color: #999; margin-top: 18px; }

/* 日历网格 */
.cal-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.cal-header .nav-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e0e0e0; display: flex; align-items: center; justify-content: center; cursor: pointer; background: #fff; font-size: 18px; color: #666; }
.cal-header .month-title { font-size: 16px; font-weight: 600; }
.weekdays-row { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: #999; padding: 8px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; border-radius: 8px;
  font-size: 13px; cursor: pointer; position: relative;
}
.cal-day.lucky { background: #e8f5e9; color: #2e7d32; font-weight: 600; }
.cal-day.lucky::after { content: '吉'; position: absolute; bottom: 2px; font-size: 9px; color: #d4af37; }
.cal-day.today { border: 2px solid #667eea; }

/* 吉日列表 */
.lucky-list { margin-top: 15px; }
.lucky-item {
  background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04); cursor: pointer;
}
.lucky-item .solar-date { font-size: 15px; font-weight: 600; color: #1a1a2e; }
.lucky-item .lunar-date { font-size: 12px; color: #999; margin-left: 8px; }
.lucky-item .desc { font-size: 13px; color: #666; margin-top: 6px; line-height: 1.5; }
.lucky-item .ai-btn {
  margin-top: 8px; padding: 6px 12px; background: #f8f9ff;
  border: 1px solid #667eea; border-radius: 15px;
  font-size: 12px; color: #667eea; cursor: pointer; display: inline-block;
}

/* 报告弹窗 */
.report-modal { width: 92%; max-width: 400px; max-height: 85vh; background: #fff; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.report-modal .report-header { padding: 16px; text-align: center; border-bottom: 1px solid #f0f0f0; }
.report-modal .report-header .report-title { font-size: 17px; font-weight: 700; color: #1a1a2e; }
.report-content { padding: 16px; overflow-y: auto; flex: 1; }
.report-content .meta-title { font-size: 14px; font-weight: 600; color: #333; display: block; margin-bottom: 8px; }
.report-content .meta-row { font-size: 13px; color: #666; margin-bottom: 4px; }
.report-content .sec-title-row { display: flex; align-items: center; margin: 14px 0 8px; }
.report-content .sec-mark { width: 3px; height: 14px; background: #667eea; border-radius: 2px; margin-right: 8px; }
.report-content .sec-title { font-size: 14px; font-weight: 600; color: #333; }
.report-content .sec-content { font-size: 13px; color: #555; line-height: 1.7; white-space: pre-wrap; }
.report-footer { padding: 12px 16px; border-top: 1px solid #f0f0f0; }
.report-footer .btn-close { width: 100%; padding: 12px; border: none; border-radius: 8px; background: #f0f0f0; font-size: 15px; color: #666; cursor: pointer; }

/* ===== 抽签页 ===== */
.chouqian-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #f5efe6 0%, #e8dcc8 40%, #d4c4a8 100%);
  position: relative;
  overflow: hidden;
}
/* 背景纹理 */
.chouqian-page::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.4) 0%, transparent 60%);
  pointer-events: none;
}
.chouqian-nav {
  display: flex; align-items: center; padding: 14px 15px;
  position: relative; z-index: 10;
}
.chouqian-nav span:first-child {
  font-size: 20px; cursor: pointer; margin-right: 12px;
  color: #5a4a3a; width: 32px; height: 32px; display: flex;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,0.5); border-radius: 50%;
}
.chouqian-nav span:last-child {
  font-size: 16px; font-weight: 600; color: #3a2e22;
  font-family: "STKaiti", "KaiTi", serif; letter-spacing: 2px;
}
.chouqian-scene {
  text-align: center;
  padding: 20px 20px 40px;
  position: relative; z-index: 5;
  display: flex; flex-direction: column; align-items: center;
}
/* 烟雾效果 */
.smoke-wrap {
  position: absolute; top: 10%; left: 50%;
  transform: translateX(-50%); width: 200px; height: 200px;
  pointer-events: none; z-index: 1;
}
.smoke {
  position: absolute; width: 6px; height: 6px;
  background: rgba(180,170,155,0.3); border-radius: 50%;
  bottom: 0; left: 50%;
  animation: smoke-rise 4s ease-out infinite;
}
.smoke.s1 { animation-delay: 0s; left: 45%; }
.smoke.s2 { animation-delay: 1.5s; left: 55%; }
.smoke.s3 { animation-delay: 3s; left: 50%; }
@keyframes smoke-rise {
  0% {
    opacity: 0; transform: translateY(0) scale(1);
  }
  20% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateY(-180px) scale(8) translateX(10px);
  }
}
/* 竹筒图片 */
.chouqian-img {
  width: 200px; height: auto;
  display: block; position: relative; z-index: 2;
  margin-bottom: 30px;
  /* 关键：去除贴图感，让图片与背景自然融合 */
  mix-blend-mode: multiply;
  filter: contrast(1.05) saturate(1.1);
}
.chouqian-hint {
  font-size: 22px; color: #3a2e22; font-weight: 600; margin-bottom: 10px;
  letter-spacing: 8px;
  font-family: "STKaiti", "KaiTi", serif;
  position: relative; z-index: 2;
}
/* 装饰线 */
.chouqian-hint::before,
.chouqian-hint::after {
  content: '';
  display: inline-block; width: 30px; height: 1px;
  background: linear-gradient(to right, transparent, #8a7a66, transparent);
  vertical-align: middle; margin: 0 12px;
}
.chouqian-tip {
  font-size: 13px; color: #8a7a66; line-height: 2;
  position: relative; z-index: 2;
  font-family: "STKaiti", "KaiTi", serif;
}
.chouqian-btn-new {
  margin-top: 36px; position: relative; z-index: 2;
  width: 70%; padding: 15px 0;
  border: none; border-radius: 30px; cursor: pointer;
  font-size: 17px; font-weight: 600; letter-spacing: 4px;
  color: #f5efe6;
  font-family: "STKaiti", "KaiTi", serif;
  background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #CD853F 100%);
  box-shadow: 0 4px 15px rgba(139,69,19,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform 0.15s, box-shadow 0.15s;
}
.chouqian-btn-new:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(139,69,19,0.3);
}

/* ===== 起名页 ===== */
.naming-form { display: flex; flex-direction: column; gap: 0; }
.naming-row {
  display: flex; align-items: center; padding: 14px 0;
  border-bottom: 1px solid #f5f5f5;
}
.naming-row:last-child { border-bottom: none; }
.naming-label { width: 60px; font-size: 14px; color: #666; flex-shrink: 0; font-weight: 500; }
.naming-input {
  flex: 1; border: 1px solid #e8e8e8; border-radius: 8px;
  padding: 10px 12px; font-size: 14px; color: #333;
  background: #f8f9ff; outline: none;
}
.naming-input:focus { border-color: #667eea; background: #fff; }
.naming-select {
  flex: 1; border: 1px solid #e8e8e8; border-radius: 8px;
  padding: 10px 12px; font-size: 14px; color: #333;
  background: #f8f9ff; outline: none; appearance: auto;
}
.naming-select:focus { border-color: #667eea; }
.naming-tags { display: flex; gap: 10px; flex: 1; }
