.lotto-page {
  --lotto-primary: var(--bs-primary, #1b4dff);
  --lotto-primary-dark: #1037b6;
  --lotto-surface: rgba(255, 255, 255, 0.94);
  --lotto-surface-strong: rgba(255, 255, 255, 0.98);
  --lotto-border: rgba(27, 77, 255, 0.1);
  --lotto-ink: #172033;
  --lotto-muted: #64748b;
  --lotto-soft: #eef4ff;
  --lotto-soft-2: #f8fbff;
  --lotto-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
  --lotto-shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.12);
  background:
    radial-gradient(circle at 12% 8%, rgba(27, 77, 255, 0.09), transparent 24%),
    radial-gradient(circle at 92% 10%, rgba(255, 107, 43, 0.07), transparent 18%),
    linear-gradient(180deg, #f8fafc 0%, #eef3ff 100%);
  color: var(--lotto-ink);
}

.lotto-page .smartboard-page {
  position: relative;
  z-index: 1;
}

.lotto-hero,
.lotto-result-panel,
.lotto-side {
  border: 1px solid var(--lotto-border);
  border-radius: 28px;
  overflow: hidden;
}

.lotto-hero {
  background:
    radial-gradient(circle at 88% 18%, rgba(27, 77, 255, 0.12), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 255, 0.98) 52%, rgba(240, 245, 255, 0.96) 100%);
  box-shadow: var(--lotto-shadow-lg);
}

.lotto-hero__badge {
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  font-weight: 700;
}

.lotto-hero h1 {
  color: var(--lotto-ink);
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.lotto-hero__lead {
  max-width: 44rem;
  color: var(--lotto-muted) !important;
  font-size: 1.03rem;
}

.lotto-hero__actions .btn {
  border-radius: 999px;
  padding-inline: 1.1rem;
  box-shadow: none;
}

.lotto-hero__actions .btn-primary {
  background: linear-gradient(180deg, var(--lotto-primary) 0%, var(--lotto-primary-dark) 100%);
  border-color: var(--lotto-primary-dark);
}

.lotto-hero__actions .btn-outline-primary {
  color: var(--lotto-primary);
  border-color: rgba(27, 77, 255, 0.2);
  background: rgba(255, 255, 255, 0.82);
}

.lotto-hero__actions .btn-outline-primary:hover {
  background: var(--lotto-soft);
  color: var(--lotto-primary-dark);
}

.lotto-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lotto-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(27, 77, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--lotto-ink);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.lotto-chip i {
  color: var(--lotto-primary);
}

.lotto-preview {
  height: 100%;
  background: var(--lotto-surface);
  border: 1px solid rgba(27, 77, 255, 0.12);
  border-radius: 24px;
  box-shadow: var(--lotto-shadow);
  backdrop-filter: blur(14px);
}

.lotto-preview__title {
  color: var(--lotto-ink);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.lotto-preview__live {
  color: var(--lotto-primary);
  border: 1px solid rgba(27, 77, 255, 0.12);
  background: #fff !important;
}

.lotto-note {
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(27, 77, 255, 0.08);
  color: #23406f;
  font-size: 0.92rem;
}

.lotto-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.lotto-mini-stat {
  padding: 1rem;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3ff 100%);
  border-radius: 18px;
  border: 1px solid rgba(27, 77, 255, 0.08);
}

.lotto-result-panel,
.lotto-side {
  background: var(--lotto-surface);
  box-shadow: var(--lotto-shadow);
}

.lotto-latest {
  padding: 1.25rem;
  border: 1px solid var(--lotto-border);
  border-radius: 24px;
  background: var(--lotto-surface);
  box-shadow: var(--lotto-shadow);
}

.lotto-latest__updated {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(27, 77, 255, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--lotto-primary);
  font-size: 0.86rem;
  font-weight: 800;
}

.lotto-latest__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.lotto-latest-card {
  padding: 1rem;
  border: 1px solid rgba(27, 77, 255, 0.08);
  border-radius: 20px;
  background: var(--lotto-surface-strong);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.lotto-latest-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.lotto-latest-card__round {
  color: var(--lotto-ink);
  font-weight: 900;
}

.lotto-latest-card__balls {
  align-items: center;
}

.lotto-latest-card__plus {
  color: var(--lotto-muted);
  font-weight: 900;
}

.lotto-empty {
  padding: 1rem;
  border: 1px solid rgba(27, 77, 255, 0.08);
  border-radius: 18px;
  background: var(--lotto-soft-2);
  color: var(--lotto-muted);
}

.lotto-stats {
  padding: 1.25rem;
  border: 1px solid var(--lotto-border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.96) 100%);
  box-shadow: var(--lotto-shadow);
}

.lotto-stat-box {
  padding: 1rem;
  border: 1px solid rgba(27, 77, 255, 0.08);
  border-radius: 18px;
  background: var(--lotto-surface-strong);
}

.lotto-stat-box__title {
  margin-bottom: 0.75rem;
  color: var(--lotto-ink);
  font-weight: 900;
}

.lotto-period-select {
  max-width: 14rem;
  border-color: rgba(27, 77, 255, 0.16);
  font-weight: 800;
}

.lotto-stat-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.lotto-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(27, 77, 255, 0.1);
  border-radius: 999px;
  background: #fff;
  color: var(--lotto-primary-dark);
  font-weight: 900;
}

.lotto-stat-chip small {
  color: var(--lotto-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.lotto-stat-chip--excluded {
  border-color: rgba(216, 139, 7, 0.18);
  color: #a26105;
  background: #fff9eb;
}

.lotto-result-panel .badge,
.lotto-side .badge {
  letter-spacing: 0.02em;
}

.lotto-results {
  display: grid;
  gap: 0.9rem;
}

.lotto-card {
  padding: 1rem 1rem 1.05rem;
  border: 1px solid rgba(27, 77, 255, 0.08);
  border-radius: 20px;
  background: var(--lotto-surface-strong);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.lotto-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.lotto-card__title {
  color: var(--lotto-ink);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.lotto-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lotto-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.lotto-ball--main {
  background: linear-gradient(180deg, #5f8dff 0%, #214bd6 100%);
}

.lotto-ball--special {
  background: linear-gradient(180deg, #ffbf4d 0%, #d88b07 100%);
}

.lotto-list {
  padding-left: 1rem;
  color: var(--lotto-muted);
}

.lotto-list li + li {
  margin-top: 0.5rem;
}

.lotto-rule {
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef3ff 100%);
  border: 1px solid rgba(27, 77, 255, 0.08);
}

.lotto-side .text-muted,
.lotto-side .small,
.lotto-result-panel .text-muted {
  color: var(--lotto-muted) !important;
}

.lotto-footer {
  color: var(--lotto-muted);
}

@media (max-width: 991.98px) {
  .lotto-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .lotto-latest__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .lotto-mini-grid {
    grid-template-columns: 1fr;
  }

  .lotto-latest {
    padding: 1rem;
    border-radius: 20px;
  }

  .lotto-stats {
    padding: 1rem;
    border-radius: 20px;
  }

  .lotto-ball {
    width: 2.1rem;
    height: 2.1rem;
  }
}
