/* 玩法与赔率页，基于 main.css 的变量 */
.kicker { margin: 0 0 6px; font-size: 12px; font-weight: 900; letter-spacing: 0.35em; text-transform: uppercase; color: var(--red); }
.r-title { margin: 0 0 10px; font-size: clamp(22px, 3.6vw, 30px); font-weight: 900; color: var(--gold-hi); letter-spacing: 0.03em; }
.r-title.sub { margin-top: 34px; font-size: clamp(18px, 2.8vw, 22px); }
.r-desc, .lead { margin: 0 0 20px; color: var(--muted); line-height: 1.8; }
.lead { font-size: 16px; color: var(--text); }
.note { margin: 14px 0 0; font-size: 13px; color: var(--muted); line-height: 1.7; }
.note::before { content: 'ⓘ '; color: var(--gold); }
.mono { font-family: var(--font-num); letter-spacing: 0.1em; }

/* 介绍 + 下注单 */
.intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center; }
.intro .r-title { font-size: clamp(28px, 5vw, 42px); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.ticket {
  position: relative;
  margin: 0;
  padding: 18px 20px 16px;
  border-radius: 16px;
  background: linear-gradient(160deg, #fff3cf, #f3d48a 60%, #e5b44c);
  color: #3a0610;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 #fff;
  transform: rotate(-2deg);
}
/* 撕边 */
.ticket::before, .ticket::after {
  content: '';
  position: absolute; top: 58%;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--panel-solid);
}
.ticket::before { left: -11px; }
.ticket::after { right: -11px; }
.ticket figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; font-size: 13px; }
.ticket figcaption small { font-weight: 700; font-size: 11px; opacity: 0.7; letter-spacing: 0.05em; text-transform: none; }
.ticket-num { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 16px 0 18px; border-bottom: 2px dashed rgba(58, 6, 16, 0.3); }
.ticket .digits span { width: 46px; height: 60px; font-size: 32px; color: var(--gold-hi); background: linear-gradient(180deg, #a3132a, #5a0a14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 10px rgba(0, 0, 0, 0.3); text-shadow: none; }
.ticket .digits span::after { background: rgba(0, 0, 0, 0.3); }
.ticket .zodiac { margin: 0; color: #3a0610; background: rgba(255, 255, 255, 0.5); border-color: rgba(58, 6, 16, 0.25); }
.ticket .zodiac i { background: rgba(58, 6, 16, 0.12); }
.ticket-bets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.ticket-bets div { text-align: center; padding: 8px 4px; border-radius: 10px; background: rgba(58, 6, 16, 0.08); }
.ticket-bets dt { font-size: 11px; font-weight: 900; letter-spacing: 0.2em; opacity: 0.7; }
.ticket-bets dd { margin: 2px 0 0; font-family: var(--font-num); font-weight: 900; font-size: 18px; }

/* 开奖结构 */
.draw-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.draw-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 8px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); text-align: center; }
.draw-card b { font-family: var(--font-num); font-size: 38px; line-height: 1; color: var(--gold-hi); }
.draw-card span { font-weight: 900; }
.draw-card small { font-size: 12px; color: var(--muted); }
.draw-card.gold { background: linear-gradient(180deg, rgba(143, 16, 34, 0.7), rgba(40, 5, 12, 0.8)); border-color: rgba(245, 197, 66, 0.5); }
.draw-card.gold small { color: var(--gold); }
.draw-card.gold small::before { content: '✦ '; }

/* 下注方式 */
.bet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.bet-card { padding: 20px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(60, 8, 18, 0.45)); }
.bet-card h3 { margin: 12px 0 8px; font-size: 18px; color: var(--gold-hi); }
.bet-card p { margin: 0; color: var(--muted); line-height: 1.75; font-size: 14px; }
.bet-tag { display: inline-block; padding: 4px 12px; border-radius: 8px; font-size: 12px; font-weight: 900; letter-spacing: 0.15em; color: #3a0610; background: var(--gold-grad); }
.bet-tag.red { color: var(--gold-hi); background: linear-gradient(180deg, #d4142f, #7a0c1c); }

/* 赔率表 */
.table-wrap { overflow-x: auto; margin-top: 12px; border-radius: 14px; border: 1px solid var(--line); }
.odds { width: 100%; border-collapse: collapse; white-space: nowrap; }
.odds th, .odds td { padding: 12px 16px; text-align: right; border-bottom: 1px solid rgba(245, 197, 66, 0.12); }
.odds th:first-child { text-align: left; }
.odds thead th { font-size: 12px; letter-spacing: 0.15em; color: var(--muted); background: rgba(0, 0, 0, 0.35); }
.odds tbody th { font-weight: 700; }
.odds tbody td { font-family: var(--font-num); font-weight: 700; font-size: 17px; color: var(--gold-hi); }
.odds tbody td.nil { font-family: var(--font-body); font-size: 13px; color: var(--muted); font-weight: 400; }
.odds tbody tr:last-child > * { border-bottom: 0; }
.odds tbody tr:hover { background: rgba(245, 197, 66, 0.05); }
.formula { margin: 14px 0 0; padding: 12px 16px; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; background: rgba(245, 197, 66, 0.07); font-weight: 700; }
.example { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.example b { color: var(--gold-hi); font-family: var(--font-num); letter-spacing: 0.03em; }

/* 试算器 */
.calc { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 28px; }
.calc .kicker, .calc .r-title { grid-column: 1 / -1; }
.calc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 8px; }
.field-full, .field-wide { grid-column: 1 / -1; }
.cfield span, .mode legend { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); letter-spacing: 0.08em; }
.cfield .input { width: 100%; }
.cfield .input.mono { font-size: 22px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.input option { background: var(--panel-solid); color: var(--text); }
.mode { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; border: 0; }
.mode legend { width: 100%; padding: 0; }
.mode label { flex: 1; min-width: 140px; }
.mode input { position: absolute; opacity: 0; pointer-events: none; }
.mode span { display: block; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); text-align: center; font-weight: 700; cursor: pointer; color: var(--muted); transition: 0.2s; }
.mode input:checked + span { color: #3a0610; background: var(--gold-grad); border-color: transparent; }
.mode input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.check:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.off { opacity: 0.4; }

.calc-result {
  align-self: stretch;
  display: flex; flex-direction: column; justify-content: center;
  margin-top: 8px;
  padding: 22px;
  border-radius: 16px;
  text-align: center;
  background: radial-gradient(300px 160px at 50% 0%, rgba(245, 197, 66, 0.22), transparent 70%), linear-gradient(180deg, #8f1022, #3d0610);
  border: 1px solid rgba(245, 197, 66, 0.55);
  box-shadow: 0 0 40px rgba(245, 197, 66, 0.15);
}
.calc-label { font-size: 13px; font-weight: 900; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.calc-total { display: block; margin: 8px 0 14px; font-family: var(--font-num); font-weight: 900; font-size: clamp(30px, 5vw, 44px); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; word-break: break-all; }
.calc-breakdown { list-style: none; margin: 0; padding: 0; text-align: left; }
.calc-breakdown li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px dashed rgba(245, 197, 66, 0.2); font-size: 14px; color: var(--muted); }
.calc-breakdown b { font-family: var(--font-num); color: var(--gold-hi); }
.calc-msg { margin: 12px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.calc-msg.err { color: var(--err); }

@media (max-width: 760px) {
  .intro, .calc { grid-template-columns: 1fr; }
  .ticket { transform: none; }
  .draw-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .draw-grid .draw-card:first-child { grid-column: 1 / -1; }
  .bet-grid { grid-template-columns: 1fr; }
  .panel.calc, .rules .panel { padding-left: 14px; padding-right: 14px; }
  .odds th, .odds td { padding: 9px 6px; }
  .odds th:first-child { padding-left: 10px; }
  .odds td:last-child { padding-right: 10px; }
  .odds thead th { letter-spacing: 0.04em; font-size: 11px; }
  .odds tbody th { font-size: 13px; white-space: normal; min-width: 76px; }
  .odds tbody td { font-size: 13px; letter-spacing: 0; }
}
