/* ===== Xổ Số Kiến Thiết page ===== */

.xs-main { min-height: calc(100vh - 200px); padding: 24px 0 60px; background: linear-gradient(180deg, #fef3c7 0%, #fff 200px); }
.xs-container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.xs-page-title { font-size: 26px; font-weight: 800; color: #b91c1c; margin: 0 0 6px; text-align: center; line-height: 1.2; }
.xs-page-desc { font-size: 13px; color: #6b7280; text-align: center; margin: 0 0 20px; }

/* Controls */
.xs-controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.xs-date-picker { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.xs-date-input { padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; color: #1e1b4b; background: #fff; font-family: inherit; }
.xs-date-nav { padding: 8px 14px; border: 1px solid #d1d5db; background: #fff; border-radius: 8px; font-size: 18px; color: #6b7280; cursor: pointer; transition: all 0.15s; font-weight: 700; line-height: 1; }
.xs-date-nav:hover { background: #faf9ff; border-color: #b91c1c; color: #b91c1c; }
.xs-today-btn { padding: 8px 16px; border: 1px solid #b91c1c; background: #b91c1c; color: #fff; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.15s; }
.xs-today-btn:hover { background: #991b1b; }

.xs-region-tabs { display: flex; gap: 4px; background: #fef2f2; padding: 4px; border-radius: 10px; flex-wrap: wrap; justify-content: center; }
.xs-tab { padding: 8px 16px; border: none; background: transparent; font-size: 13px; font-weight: 600; color: #6b7280; cursor: pointer; border-radius: 6px; transition: all 0.15s; white-space: nowrap; }
.xs-tab:hover { background: rgba(255,255,255,0.7); color: #b91c1c; }
.xs-tab.active { background: #fff; color: #b91c1c; box-shadow: 0 2px 6px rgba(185,28,28,0.15); }

/* Checker */
.xs-checker { background: #fff; border: 1px solid #fde68a; border-radius: 12px; margin-bottom: 18px; overflow: hidden; }
.xs-checker summary { padding: 12px 18px; cursor: pointer; font-weight: 700; color: #92400e; font-size: 14px; background: #fefce8; list-style: none; }
.xs-checker summary::before { content: '▶ '; font-size: 10px; transition: transform 0.15s; display: inline-block; margin-right: 4px; }
.xs-checker[open] summary::before { transform: rotate(90deg); }
.xs-checker-body { padding: 14px 18px; }
.xs-checker-hint { font-size: 12px; color: #6b7280; margin: 0 0 10px; }
.xs-checker-form { display: flex; gap: 8px; }
.xs-checker-input { flex: 1; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 16px; font-family: inherit; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.xs-checker-input:focus { outline: none; border-color: #b91c1c; box-shadow: 0 0 0 3px rgba(185,28,28,0.1); }
.xs-checker-btn { padding: 10px 20px; background: #b91c1c; color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; }
.xs-checker-btn:hover { background: #991b1b; }
.xs-checker-result { margin-top: 12px; padding: 10px; border-radius: 8px; font-size: 13px; min-height: 1px; }
.xs-checker-result.win  { background: #dcfce7; border: 1px solid #16a34a; color: #15803d; font-weight: 600; }
.xs-checker-result.lose { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* Results */
.xs-results { display: flex; flex-direction: column; gap: 18px; }
.xs-loading { text-align: center; padding: 60px 20px; color: #9ca3af; font-size: 14px; }
.xs-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; padding: 14px 18px; border-radius: 10px; font-size: 13px; text-align: center; }

/* Region card */
.xs-region { background: #fff; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid #e5e7eb; overflow: hidden; }
.xs-region-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%); color: #fff; flex-wrap: wrap; gap: 8px; }
.xs-region-title { font-size: 17px; font-weight: 800; margin: 0; }
.xs-region-meta { font-size: 12px; opacity: 0.9; }
.xs-region-body { padding: 0; }

/* Province (đài) */
.xs-province { border-bottom: 1px solid #f3f4f6; padding: 12px 16px; }
.xs-province:last-child { border-bottom: none; }
.xs-province-name { font-size: 15px; font-weight: 700; color: #b91c1c; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid #fbbf24; display: inline-block; }

/* Prize table */
.xs-prize-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.xs-prize-row { border-top: 1px solid #f3f4f6; }
.xs-prize-row:first-child { border-top: none; }
.xs-prize-name { padding: 8px 10px; font-weight: 700; color: #6b7280; white-space: nowrap; vertical-align: middle; width: 110px; background: #fafafa; }
.xs-prize-numbers { padding: 8px 10px; vertical-align: middle; line-height: 1.6; }
.xs-num { display: inline-block; padding: 4px 8px; margin: 2px 4px 2px 0; background: #f3f4f6; border-radius: 6px; font-weight: 700; font-size: 14px; color: #1e1b4b; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.xs-num.db { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); color: #78350f; font-size: 18px; padding: 6px 14px; }
.xs-num.g1 { background: #fef3c7; color: #92400e; font-size: 15px; }
.xs-num.matched { background: #16a34a; color: #fff; box-shadow: 0 0 0 3px rgba(22,163,74,0.3); }

/* Disclaimer */
.xs-disclaimer { margin-top: 30px; padding: 14px 18px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; font-size: 12px; color: #78350f; line-height: 1.6; }
.xs-disclaimer p { margin: 0 0 6px; }
.xs-disclaimer p:last-child { margin: 0; }
.xs-source-credits { color: #92400e; font-style: italic; }

/* Failed states */
.xs-region.empty .xs-region-body { padding: 20px; text-align: center; color: #9ca3af; font-size: 13px; font-style: italic; }

/* Responsive */
@media (max-width: 700px) {
  .xs-page-title { font-size: 22px; }
  .xs-controls { gap: 8px; }
  .xs-region-header { padding: 10px 14px; }
  .xs-region-title { font-size: 15px; }
  .xs-province { padding: 10px 12px; }
  .xs-province-name { font-size: 13px; }
  .xs-prize-name { width: 80px; padding: 6px 8px; font-size: 11px; }
  .xs-prize-numbers { padding: 6px 8px; }
  .xs-num { padding: 3px 6px; font-size: 12px; }
  .xs-num.db { font-size: 15px; padding: 4px 10px; }
  .xs-num.g1 { font-size: 13px; }
  .xs-tab { padding: 6px 10px; font-size: 12px; }
}
