/* ==================== XỔ SỐ DU LỊCH TUỲ HỨNG - CSS ==================== */
:root {
  --gold: #f59e0b;
  --gold-light: #fde68a;
  --gold-dark: #b45309;
  --red-lucky: #ef4444;
  --red-deep: #991b1b;
  --green-win: #10b981;
  --gold-grad: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  --gold-border: rgba(245, 158, 11, 0.35);
  --lucky-glow: 0 0 35px -5px rgba(245, 158, 11, 0.4);
  --red-glow: 0 0 30px -4px rgba(239, 68, 68, 0.5);
}

.xoso-page {
  padding-top: 5rem;
  padding-bottom: 5rem;
  min-height: 100vh;
}

/* Hero Badge & Header */
.xoso-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}
.lucky-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.xoso-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.8rem;
}
.xoso-subtitle {
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 1.5rem;
  font-size: 1.05rem;
}

/* Status Bar & Countdown */
.live-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.4rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}
.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.live-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #94a3b8;
}
.live-dot.pulse-red {
  background: var(--red-lucky);
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-red-anim 1.5s infinite;
}
.live-dot.pulse-green {
  background: var(--green-win);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}
@keyframes pulse-red-anim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.countdown-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.1);
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.countdown-box strong {
  font-family: monospace;
  font-size: 1.05rem;
  color: #fff;
}

/* Grid Layout */
.xoso-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  margin-bottom: 3.5rem;
}
@media (max-width: 960px) {
  .xoso-grid { grid-template-columns: 1fr; }
}

/* Region Selector */
.region-switcher {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.region-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
}
.region-btn:hover {
  border-color: var(--teal);
  color: #fff;
  transform: translateY(-2px);
}
.region-btn.active {
  background: var(--grad);
  color: #0a1724;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.4);
}
.region-btn.active.btn-mt {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4);
}
.region-btn.active.btn-mn {
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(251, 146, 60, 0.4);
}
.region-btn.active.btn-vietlott {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 50%, #f59e0b 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5);
}

/* Date History Picker */
.date-picker-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(10, 23, 36, 0.7);
  padding: 0.35rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.date-picker-select {
  background: transparent;
  border: none;
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  outline: none;
}
.date-picker-select option {
  background: #0a1724;
  color: #fff;
}

/* 60-day Stats Grid */
.stats-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed var(--border);
}
.stats-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 640px) {
  .stats-two-col { grid-template-columns: 1fr; }
}
.stats-box {
  background: rgba(10, 23, 36, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
}
.stats-box-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.stats-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.stats-num {
  font-family: monospace;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--gold-light);
  min-width: 28px;
}
.stats-badge-hot {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fef08a;
  background: rgba(245, 158, 11, 0.2);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}
.stats-badge-cold {
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.18);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

/* Regional Live HTML Container */
.regional-table-wrap {
  overflow-x: auto;
}
.regional-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(10, 23, 36, 0.6);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.regional-table-wrap th, .regional-table-wrap td {
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.regional-table-wrap th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  color: var(--gold-light);
}
.regional-table-wrap td {
  font-family: monospace;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Card Container */
.xoso-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.xoso-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.xoso-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Table styling for XSMB */
.lottery-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(10, 23, 36, 0.6);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: 0.95rem;
}
.lottery-table th,
.lottery-table td {
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
}
.lottery-table th {
  width: 25%;
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  color: var(--muted);
  text-align: left;
}
.lottery-table td {
  text-align: center;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Special Prize Row */
.row-db {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.15));
}
.row-db th {
  color: var(--gold-light);
  font-weight: 800;
  border-left: 4px solid var(--red-lucky);
}
.row-db td {
  font-size: 1.85rem;
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
  letter-spacing: 4px;
}

/* Prize codes (Ký hiệu đặc biệt) */
.codes-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}
.code-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  border-radius: 6px;
  font-family: inherit;
}

/* Prize numbers items */
.prize-nums {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}
.num-item {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}
.num-item.rolling {
  color: var(--gold);
  animation: roll-glow 0.8s infinite alternate;
}
.num-item.flash-new {
  animation: flash-pulse 1.2s ease-out;
}
@keyframes flash-pulse {
  0% { transform: scale(1.4); background: #fef08a; color: #111; box-shadow: 0 0 30px #f59e0b; }
  100% { transform: scale(1); background: transparent; color: inherit; box-shadow: none; }
}
@keyframes roll-glow {
  0% { opacity: 0.4; }
  100% { opacity: 1; text-shadow: 0 0 10px var(--gold); }
}

/* Loto Head-Tail Board */
.loto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.2rem;
}
.loto-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: rgba(10, 23, 36, 0.4);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.loto-table th, .loto-table td {
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.loto-table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
  text-align: center;
  color: var(--gold-light);
}
.loto-digit {
  width: 28%;
  text-align: center;
  font-weight: 800;
  color: var(--teal-2);
}
.loto-values {
  font-family: monospace;
  letter-spacing: 1px;
}

/* Interactive Tabs */
.tabs-nav {
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.35rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}
.tab-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: transparent;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.tab-btn.active {
  background: var(--grad);
  color: #0a1724;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

/* Checker Form kiểu Xổ Số Đại Phát */
.checker-card-head {
  text-align: center;
  background: rgba(185, 28, 28, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  margin-bottom: 1.2rem;
}
.checker-card-title {
  color: #ef4444;
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0;
  letter-spacing: 0.5px;
}

.checker-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
@media (max-width: 540px) {
  .checker-select-grid {
    grid-template-columns: 1fr;
  }
}

.input-date-custom,
.select-province-custom {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(10, 23, 36, 0.85);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
}
.input-date-custom:focus,
.select-province-custom:focus {
  border-color: #ef4444;
}
.select-province-custom optgroup {
  background: #0f172a;
  color: var(--teal-2);
  font-weight: 700;
}
.select-province-custom option {
  background: #0a1724;
  color: #fff;
}

.checker-action-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  margin-bottom: 0.6rem;
}
.checker-input-wrap {
  flex: 1;
}
.input-ticket-field {
  width: 100%;
  height: 100%;
  padding: 0.65rem 0.9rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 2px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  background: rgba(10, 23, 36, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-ticket-field:focus {
  border-color: #ef4444;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.35);
}
.input-ticket-field::placeholder {
  font-size: 0.95rem;
  font-weight: normal;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 1px;
}
.btn-red-result {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.65rem 1.6rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn-red-result:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  opacity: 0.95;
}
.checker-note-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.2rem;
  margin-bottom: 1.2rem;
  display: block;
}

/* Result Box for Ticket Checking */
.check-result-box {
  display: none;
  margin-top: 1.5rem;
  padding: 1.4rem;
  border-radius: var(--radius-sm);
  background: rgba(10, 23, 36, 0.7);
  border: 1px solid var(--border);
  animation: fadeIn 0.4s ease;
}
.check-result-box.won {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(239, 68, 68, 0.12));
  box-shadow: var(--lucky-glow);
}
.check-result-box.missed {
  border-color: rgba(255, 255, 255, 0.15);
}
.prize-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.prize-icon {
  font-size: 2.2rem;
}
.prize-info h4 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fef08a;
  margin-bottom: 0.2rem;
}
.prize-info p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* AI Recommendation Card */
.ai-advice-card {
  margin-top: 1.2rem;
  padding: 1.2rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--gold-border);
}
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.ai-content {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #e2e8f0;
}
.ai-content ul {
  margin-left: 1.2rem;
  margin-top: 0.5rem;
}
.ai-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  background: var(--gold-grad);
  color: #111;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.ai-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* AI Lucky Generator Form */
.select-destination {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(10, 23, 36, 0.8);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 0.95rem;
}
.textarea-dream {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(10, 23, 36, 0.8);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 80px;
}

/* Confetti Canvas */
#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* Tour Showcase Section */
.tour-showcase {
  margin-top: 3.5rem;
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}
.showcase-header {
  text-align: center;
  margin-bottom: 2rem;
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.tour-card-xs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.tour-card-xs:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
  border-color: var(--teal);
}
.tour-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.tour-card-body {
  padding: 1.1rem;
}
.tour-card-tag {
  font-size: 0.75rem;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.5rem;
}
.tour-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tour-card-price {
  font-weight: 800;
  color: var(--teal-2);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}
.tour-card-btn {
  display: block;
  text-align: center;
  padding: 0.55rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.2s;
}
.tour-card-btn:hover {
  background: var(--grad);
  color: #111;
}

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

/* ==================== BẢNG XỔ SỐ MIỀN TRUNG / MIỀN NAM (XOSODAIPHAT STYLE) ==================== */
.regional-table-wrap {
  width: 100%;
  animation: fadeIn 0.3s ease;
}

/* Banner Header kiểu Xổ Số Đại Phát */
.regional-banner {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 50%, #991b1b 100%);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 0.85rem 1.2rem;
  color: #fff;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-bottom: none;
}
.regional-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.regional-banner-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.regional-breadcrumb {
  font-size: 0.88rem;
  color: #fef08a;
  margin-top: 0.35rem;
  font-weight: 600;
}
.regional-breadcrumb a, .regional-breadcrumb span {
  color: #fef08a;
}
.live-refresh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Bảng kết quả chính table-result / table-xsmn */
.regional-table-wrap table.table-result,
.regional-table-wrap table.table-xsmn {
  width: 100%;
  border-collapse: collapse;
  background: rgba(10, 23, 36, 0.75);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  table-layout: fixed;
}

.regional-table-wrap table.table-result thead th,
.regional-table-wrap table.table-xsmn thead th {
  background: rgba(15, 23, 42, 0.85);
  padding: 0.85rem 0.6rem;
  color: var(--teal-2);
  font-size: 1.05rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}
.regional-table-wrap table.table-result thead th.name-prize,
.regional-table-wrap table.table-xsmn thead th:first-child {
  width: 80px;
  color: #94a3b8;
  font-size: 0.92rem;
}

.regional-table-wrap table.table-result tbody th,
.regional-table-wrap table.table-xsmn tbody td:first-child {
  width: 80px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  padding: 0.75rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.regional-table-wrap table.table-result tbody td,
.regional-table-wrap table.table-xsmn tbody td.tn_prize {
  padding: 0.75rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-weight: 700;
  color: #f8fafc;
  font-size: 1.12rem;
  letter-spacing: 1.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.regional-table-wrap table.table-result tbody tr:hover,
.regional-table-wrap table.table-xsmn tbody tr:hover {
  background: rgba(56, 189, 248, 0.04);
}

/* Các số kết quả bên trong ô */
.regional-table-wrap .xs_prize1,
.regional-table-wrap .number-black-bold,
.regional-table-wrap .div-horizontal {
  display: inline-block;
  margin: 2px 6px;
  font-weight: 700;
}

/* GIẢI ĐẶC BIỆT MIỀN TRUNG / NAM */
.regional-table-wrap .prize_db,
.regional-table-wrap .special-prize-lg {
  color: #fef08a !important;
  font-size: 1.55rem !important;
  font-weight: 900 !important;
  letter-spacing: 3px !important;
  text-shadow: 0 0 16px rgba(245, 158, 11, 0.6) !important;
}

/* BI ĐỎ 3D CHO GIẢI 8 (GIỐNG 100% XỔ SỐ ĐẠI PHÁT) */
.digit-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 2px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.45), inset 0 2px 2px rgba(255, 255, 255, 0.45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  vertical-align: middle;
}

/* ICON QUAY TRÒN (SPINNER DÀNH CHO CÁC GIẢI ĐANG CHỜ MỞ) */
.loading-icon,
.spinning-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(239, 68, 68, 0.2);
  border-top-color: #ef4444;
  border-right-color: #f43f5e;
  border-radius: 50%;
  animation: xs-spin 0.75s linear infinite;
  vertical-align: middle;
  margin: 0 3px;
}
@keyframes xs-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* BẢNG LÔ TÔ MIỀN TRUNG / NAM */
.regional-table-wrap .site-link2 {
  text-align: center;
  margin: 1.5rem 0 0.75rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold-light);
}
.regional-table-wrap .site-link2 a {
  color: var(--gold-light);
  text-decoration: none;
}
.regional-table-wrap table.table-loto {
  width: 100%;
  border-collapse: collapse;
  background: rgba(10, 23, 36, 0.6);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.regional-table-wrap table.table-loto thead th,
.regional-table-wrap table.table-loto th {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem;
  color: var(--gold-light);
  font-weight: 700;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.regional-table-wrap table.table-loto tbody th,
.regional-table-wrap table.table-loto td.text-center {
  width: 60px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--teal-2);
  font-weight: 800;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.regional-table-wrap table.table-loto tbody td {
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

/* ============================================================
   VIETLOTT STYLES (MEGA 6/45 & POWER 6/55)
   ============================================================ */
.vietlott-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.vietlott-sub-nav {
  display: flex;
  gap: 0.75rem;
  background: rgba(10, 23, 36, 0.6);
  padding: 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.vietlott-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 9px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.vietlott-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.vietlott-tab-btn.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(245, 158, 11, 0.25));
  color: #fff;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.jackpot-mini-pill {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold-light);
  font-weight: 800;
}
.jackpot-mini-pill.jp-power {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

/* Jackpot Banner */
.jackpot-banner {
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.15) 0%, rgba(10, 23, 36, 0.95) 75%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.15);
}

.jackpot-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 60%);
  pointer-events: none;
  animation: rotate-jackpot 18s linear infinite;
}

@keyframes rotate-jackpot {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.jackpot-badge-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.2);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.jackpot-amount {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.5px;
  text-shadow: 0 0 25px rgba(245, 158, 11, 0.6), 0 2px 4px rgba(0, 0, 0, 0.8);
  margin: 0.3rem 0;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
  .jackpot-amount { font-size: 1.65rem; }
}

.jackpot-sub-amounts {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.jackpot-sub-item {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.jackpot-sub-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
}
.jackpot-sub-item strong {
  font-size: 1.15rem;
  color: #38bdf8;
  font-weight: 800;
}

.jackpot-draw-info {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* 3D Vietlott Spheres */
.vietlott-balls-card {
  background: rgba(10, 23, 36, 0.7);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-align: center;
}

.vietlott-balls-head {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.vietlott-balls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.vietlott-ball {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 900;
  font-size: 1.25rem;
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #ff8b8b 0%, #dc2626 50%, #7f1d1d 95%);
  box-shadow: 0 6px 15px rgba(220, 38, 38, 0.4), inset 0 -3px 6px rgba(0, 0, 0, 0.5), inset 0 3px 5px rgba(255, 255, 255, 0.6);
  position: relative;
  transition: transform 0.25s ease;
}

.vietlott-ball:hover {
  transform: translateY(-3px) scale(1.08);
}

.vietlott-ball-bonus {
  background: radial-gradient(circle at 35% 30%, #fef08a 0%, #eab308 50%, #854d0e 95%);
  color: #111;
  box-shadow: 0 6px 15px rgba(234, 179, 8, 0.5), inset 0 -3px 6px rgba(0, 0, 0, 0.4), inset 0 3px 5px rgba(255, 255, 255, 0.7);
}

.vietlott-plus-sign {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold-light);
}

/* Vietlott Prize Breakdown Table */
.vietlott-table-card {
  background: rgba(10, 23, 36, 0.7);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.vietlott-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.vietlott-table th {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.7rem 0.85rem;
  color: var(--gold-light);
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vietlott-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.vietlott-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.vietlott-match-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.vietlott-match-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #dc2626;
  display: inline-block;
}

.vietlott-match-dot.bonus-dot {
  background: #eab308;
}

.vietlott-prize-amount {
  font-weight: 800;
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ==================== IPHONE & MOBILE VIEWPORT OPTIMIZATIONS ==================== */
@media (max-width: 768px) {
  .xoso-page {
    padding-top: 5.5rem;
    padding-bottom: 3.5rem;
  }

  /* Prevent iOS Safari 16px Auto-Zoom */
  input[type="text"],
  input[type="date"],
  select,
  .input-ticket-field,
  .input-date-custom,
  .select-province-custom,
  .date-picker-select,
  .dream-input {
    font-size: 16px !important;
  }
}

@media (max-width: 640px) {
  /* Status Bar & History Selector */
  .live-status-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.85rem;
    margin-bottom: 1.5rem;
  }
  .live-indicator {
    font-size: 0.88rem;
  }
  .live-status-bar > div:last-child {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .date-picker-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
  }
  .date-picker-wrap > span {
    white-space: nowrap;
    font-size: 0.85rem;
    flex-shrink: 0;
  }
  .date-picker-select {
    flex: 1;
    min-width: 0;
    width: 100%;
    font-size: 16px !important;
    text-overflow: ellipsis;
  }
  #soundToggleBtn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  /* Hero area */
  .xoso-hero {
    margin-bottom: 1.5rem;
  }
  .lucky-badge {
    font-size: 0.76rem;
    padding: 0.35rem 0.75rem;
    gap: 0.35rem;
    letter-spacing: 0.2px;
  }
  .xoso-title {
    font-size: clamp(1.45rem, 6.2vw, 2.1rem);
    line-height: 1.3;
    margin-bottom: 0.6rem;
    word-break: keep-all;
  }
  .xoso-subtitle {
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    padding: 0 0.25rem;
  }

  /* Region Switcher: Clean 2x2 Grid */
  .region-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 1.2rem;
  }
  .region-btn {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 0.35rem;
    font-size: 0.84rem;
    border-radius: 12px;
    gap: 0.3rem;
    white-space: nowrap;
  }
  .region-btn small {
    font-size: 0.74rem;
    opacity: 0.85;
  }

  /* Xổ số Cards */
  .xoso-card {
    padding: 0.9rem 0.75rem;
    border-radius: 16px;
  }
  .xoso-card-header {
    margin-bottom: 0.85rem;
    padding-bottom: 0.6rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .xoso-card-title {
    font-size: 1.1rem;
  }

  /* Lottery Table XSMB */
  .lottery-table {
    font-size: 0.88rem;
  }
  .lottery-table th,
  .lottery-table td {
    padding: 0.5rem 0.35rem;
  }
  .lottery-table th {
    width: 22%;
    font-size: 0.82rem;
    font-weight: 700;
  }
  .lottery-table td {
    font-size: 1.02rem;
    letter-spacing: 1.5px;
  }
  .row-db td {
    font-size: 1.45rem;
    letter-spacing: 2px;
  }
  .prize-nums {
    gap: 0.3rem 0.55rem;
  }
  .num-item {
    padding: 0.1rem 0.2rem;
  }
  .codes-wrap {
    gap: 0.25rem;
  }
  .code-chip {
    padding: 0.15rem 0.4rem;
    font-size: 0.76rem;
  }

  /* Multi-province Table (XSMT / XSMN) */
  .regional-banner-title {
    font-size: 1rem;
  }
  .regional-breadcrumb {
    font-size: 0.8rem;
  }
  .regional-table-wrap {
    -webkit-overflow-scrolling: touch;
  }
  .table-result th,
  .table-result td {
    padding: 0.45rem 0.25rem;
    font-size: 0.85rem;
  }
  .digit-ball {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
  }

  /* Vietlott Board & 3D Spheres */
  .vietlott-sub-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
  }
  .vietlott-tab-btn {
    padding: 0.55rem 0.4rem;
    font-size: 0.84rem;
    justify-content: center;
    border-radius: 10px;
  }
  .jackpot-banner {
    padding: 1rem 0.75rem;
    border-radius: 14px;
  }
  .jackpot-badge-tag {
    font-size: 0.74rem;
    padding: 0.2rem 0.6rem;
  }
  .jackpot-amount {
    font-size: 1.65rem;
    letter-spacing: -0.5px;
  }
  .jackpot-sub-amounts {
    flex-direction: column;
    gap: 0.35rem;
  }
  .jackpot-sub-item {
    padding: 0.4rem 0.6rem;
    font-size: 0.82rem;
  }
  .vietlott-balls-card {
    padding: 1rem 0.4rem;
    border-radius: 14px;
  }
  .vietlott-balls-head {
    font-size: 0.84rem;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.75rem;
  }
  .vietlott-balls-row {
    gap: 0.3rem;
    flex-wrap: nowrap;
    justify-content: center;
    overflow-x: auto;
    padding: 0.3rem 0;
    -webkit-overflow-scrolling: touch;
  }
  .vietlott-ball {
    width: 37px;
    height: 37px;
    font-size: 1.02rem;
    flex-shrink: 0;
  }
  .vietlott-plus-sign {
    font-size: 1.15rem;
    margin: 0 1px;
    flex-shrink: 0;
  }
  .vietlott-table-card {
    border-radius: 12px;
  }
  .vietlott-table th,
  .vietlott-table td {
    padding: 0.55rem 0.4rem;
    font-size: 0.82rem;
  }
  .vietlott-prize-amount {
    font-size: 0.86rem;
  }

  /* Ticket Checker on Mobile */
  .checker-action-row {
    flex-direction: column;
    gap: 0.6rem;
  }
  .btn-red-result {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
    justify-content: center;
  }
  .input-ticket-field {
    text-align: center;
    padding: 0.75rem 0.85rem;
  }
}

/* ==================== QUICK PROVINCE SELECTOR BAR ==================== */
.province-quick-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.province-quick-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-light);
}
.province-quick-select {
  background: rgba(10, 23, 36, 0.85);
  border: 1px solid var(--gold-border);
  color: #fef08a;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.province-quick-select:hover,
.province-quick-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
  background: rgba(15, 30, 48, 0.95);
}
.province-quick-select optgroup {
  background: #0f172a;
  color: var(--teal-2);
  font-weight: 700;
}
.province-quick-select option {
  background: #0a1724;
  color: #fff;
}

/* Province Column Highlight in Regional Table */
.highlight-prov-th {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.35) 0%, rgba(245, 158, 11, 0.15) 100%) !important;
  color: #fef08a !important;
  border-left: 2px solid var(--gold) !important;
  border-right: 2px solid var(--gold) !important;
  box-shadow: inset 0 2px 8px rgba(245, 158, 11, 0.4);
}
.highlight-prov-td {
  background: rgba(245, 158, 11, 0.08) !important;
  border-left: 2px solid rgba(245, 158, 11, 0.4) !important;
  border-right: 2px solid rgba(245, 158, 11, 0.4) !important;
  color: #fef08a !important;
}

@media (max-width: 600px) {
  .province-quick-bar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
  }
  .province-quick-select {
    width: 100%;
    font-size: 16px !important; /* Prevent iOS auto zoom */
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
  }
}



