.lotto-header p {
  margin-top: 0.5rem;
  color: rgba(226, 232, 240, 0.85);
}

.lotto-header {
  padding: 2rem 1.5rem 1.25rem;
}

.lotto-main {
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.lotto-meta {
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.85);
  margin-bottom: 1rem;
}

.lotto-combo-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lotto-combo-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.2rem;
  padding: 0.9rem 1.2rem;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(15, 23, 42, 0.9), rgba(17, 24, 39, 0.76));
  border: 1px solid rgba(94, 234, 212, 0.18);
  box-shadow: 0 18px 30px -24px rgba(59, 130, 246, 0.5);
}

.lotto-combo-header {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(226, 232, 240, 0.85);
  min-width: 70px;
  text-align: left;
}

.lotto-combo-numbers {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
}

.lotto-number-list {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.lotto-history {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.lotto-history-entry {
  border: none;
  border-radius: 0;
  padding: 1rem 1.25rem;
  background-color: rgba(15, 23, 42, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lotto-history-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.8);
}

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

.lotto-history-combo {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(94, 234, 212, 0.16);
}

.lotto-history-label {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.75);
}

.lotto-history-combo .lotto-number-list {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 1rem;
}

.lotto-history-result {
  text-align: right;
  min-width: 120px;
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.9);
}

.lotto-history-result strong {
  color: #facc15;
  display: block;
  font-size: 1rem;
}

.lotto-history-actual {
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.92);
}

.analysis-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hidden {
  display: none;
}

.analysis-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.analysis-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.analysis-heading h2 {
  margin: 0;
}

.analysis-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.78);
}

.analysis-description {
  margin: 0;
  color: rgba(226, 232, 240, 0.75);
  font-size: 0.92rem;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.table-wrapper::-webkit-scrollbar {
  height: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.4);
  border-radius: 999px;
}

.lotto-table {
  width: 100%;
  border-collapse: collapse;
  background-color: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.lotto-table th,
.lotto-table td {
  padding: 0.7rem 0.6rem;
  text-align: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  white-space: nowrap;
  font-size: 0.92rem;
}

.lotto-table tbody tr:hover {
  background-color: rgba(30, 41, 59, 0.55);
}

.lotto-table th {
  font-weight: 600;
  color: rgba(226, 232, 240, 0.95);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .lotto-header {
    padding: clamp(0.6rem, 3.5vw, 1rem) clamp(0.5rem, 4vw, 1rem) clamp(0.4rem, 3vw, 0.8rem);
  }

  .lotto-main {
    padding: 0 clamp(0.3rem, 3vw, 0.6rem) clamp(1rem, 4vw, 1.8rem);
  }

  .analysis-main {
    gap: clamp(0.45rem, 2.5vw, 0.7rem);
    padding: 0;
  }

  .analysis-main .model-section {
    padding: clamp(0.25rem, 2vw, 0.45rem) clamp(0.25rem, 2.4vw, 0.5rem);
    margin-bottom: clamp(0.3rem, 2.4vw, 0.55rem);
    width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .analysis-main .model-section:last-of-type {
    margin-bottom: 0;
  }

  .analysis-heading {
    gap: clamp(0.3rem, 2.5vw, 0.5rem);
  }

  .analysis-meta {
    font-size: clamp(0.74rem, 2.5vw, 0.82rem);
  }

  .analysis-description {
    font-size: clamp(0.76rem, 2.7vw, 0.84rem);
  }

  .analysis-section .lotto-table th,
  .analysis-section .lotto-table td {
    padding: clamp(0.24rem, 1.8vw, 0.32rem) clamp(0.2rem, 1.6vw, 0.28rem);
    font-size: clamp(0.7rem, 2.2vw, 0.78rem);
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }

  .analysis-section .lotto-table th {
    font-size: clamp(0.74rem, 2.4vw, 0.8rem);
  }

  .analysis-section .lotto-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
  }

  .analysis-section .table-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    overflow-x: visible;
  }

  .analysis-section .table-wrapper table {
    min-width: 100%;
  }
  .analysis-section .table-sort-button {
    font-size: clamp(0.7rem, 2.2vw, 0.78rem);
    gap: 0.15rem;
  }

  .analysis-section .lotto-table th:nth-child(1),
  .analysis-section .lotto-table td:nth-child(1) {
    width: 33%;
  }

  .analysis-section .lotto-table th:nth-child(2),
  .analysis-section .lotto-table td:nth-child(2) {
    width: 34%;
  }

  .analysis-section .lotto-table th:nth-child(3),
  .analysis-section .lotto-table td:nth-child(3) {
    width: 33%;
  }

  .analysis-section .lotto-table-number .lotto-table-ball {
    width: clamp(30px, 9vw, 36px);
    height: clamp(30px, 9vw, 36px);
    font-size: clamp(0.68rem, 2vw, 0.76rem);
  }

  .analysis-section .lotto-number.lotto-range-ball {
    padding: 0 clamp(0.4rem, 2.6vw, 0.65rem);
    min-width: clamp(42px, 12vw, 56px);
    height: clamp(30px, 9vw, 36px);
    font-size: clamp(0.68rem, 2vw, 0.76rem);
  }

  .analysis-section .stats-table-wrapper {
    overflow-x: visible;
  }
}


@media (max-width: 480px) {
  .analysis-section .lotto-table-number .lotto-table-ball {
    width: clamp(26px, 10vw, 30px);
    height: clamp(26px, 10vw, 30px);
    font-size: clamp(0.58rem, 2.3vw, 0.68rem);
  }

  .analysis-section .lotto-number.lotto-range-ball {
    min-width: clamp(38px, 14vw, 46px);
    height: clamp(26px, 10vw, 30px);
    font-size: clamp(0.58rem, 2.3vw, 0.68rem);
  }

  .analysis-section .lotto-table th,
  .analysis-section .lotto-table td,
  .analysis-section .table-sort-button {
    font-size: clamp(0.62rem, 2.4vw, 0.7rem);
  }

  .analysis-section .lotto-table th,
  .analysis-section .lotto-table td {
    padding: clamp(0.16rem, 2.4vw, 0.24rem) clamp(0.15rem, 2vw, 0.22rem);
  }
}

.stats-table-wrapper {
  max-height: 460px;
  overflow-y: auto;
  overflow-x: hidden;
}

.table-sort-button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
}

.table-sort-button:hover,
.table-sort-button:focus-visible {
  color: #facc15;
  outline: none;
}

.table-sort-button .table-sort-button-label {
  white-space: nowrap;
}

.lotto-table-number {
  text-align: center;
}

.lotto-number.lotto-table-ball {
  width: 42px;
  height: 42px;
  font-size: 0.9rem;
}

.lotto-number.lotto-range-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  min-width: 52px;
  height: 42px;
  font-size: 0.85rem;
  border-radius: 999px;
}

.draws-number-cell {
  min-width: 260px;
}

.draws-number-list {
  gap: 0.55rem;
  justify-content: center;
}

.draws-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}

.draws-load-button {
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.draws-load-button:hover {
  background: rgba(59, 130, 246, 0.35);
  border-color: rgba(59, 130, 246, 0.55);
}

@media (max-width: 600px) {
  .lotto-main {
    padding-bottom: 3rem;
  }

  .lotto-combo-grid {
    gap: 0.75rem;
  }

  .lotto-combo-row {
    grid-template-columns: 1fr;
    justify-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
  }

  .lotto-combo-header {
    font-size: 0.85rem;
    text-align: left;
  }

  .lotto-combo-numbers {
    --combo-gap: 0.35rem;
    justify-content: flex-start;
    gap: var(--combo-gap);
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.1rem;
  }

  .lotto-combo-numbers::-webkit-scrollbar {
    display: none;
  }

  .lotto-number-list {
    gap: var(--combo-gap);
    flex-wrap: nowrap;
  }

  .lotto-combo-numbers.lotto-number-list {
    gap: var(--combo-gap);
  }

  .lotto-history-combo {
    grid-template-columns: 1fr;
    justify-items: flex-start;
    gap: 0.8rem;
  }

  .lotto-history-combo .lotto-number-list {
    flex-wrap: nowrap;
    gap: 0.45rem;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.1rem;
  }

  .lotto-history-combo .lotto-number-list::-webkit-scrollbar {
    display: none;
  }

  .lotto-history-result {
    text-align: left;
    min-width: auto;
  }

  .analysis-meta {
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
  }

  .analysis-section .lotto-table thead th,
  .analysis-section .table-sort-button {
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .lotto-table th {
    display: none;
  }

  .lotto-table,
  .lotto-table tbody,
  .lotto-table tr,
  .lotto-table td {
    display: block;
    width: 100%;
  }

  .lotto-table tr {
    margin-bottom: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    overflow: hidden;
  }

  .lotto-table td {
    padding: 0.6rem 0.9rem;
    text-align: left;
    position: relative;
    border: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    white-space: normal;
  }

  .lotto-table td:last-child {
    border-bottom: none;
  }

  .lotto-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.85);
    margin-bottom: 0.25rem;
  }

  .analysis-section .lotto-table {
    display: table;
  }

  .analysis-section .lotto-table tbody {
    display: table-row-group;
  }

  .analysis-section .lotto-table tr {
    display: table-row;
    margin-bottom: 0;
    border: none;
    border-radius: 0;
  }

  .analysis-section .lotto-table th,
  .analysis-section .lotto-table td {
    display: table-cell;
    padding: min(2.5vw, 0.45rem) min(1.5vw, 0.35rem);
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-size: clamp(0.7rem, 2.6vw, 0.8rem);
  }

  .analysis-section .lotto-table th {
    display: table-cell;
  }

  .analysis-section .lotto-table td::before {
    display: none;
  }

  .analysis-section .lotto-table td:last-child {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }

  .analysis-section .lotto-table {
    table-layout: fixed;
    width: 100%;
  }

  .analysis-section .table-wrapper {
    overflow-x: visible;
  }

  .analysis-section .table-wrapper table {
    min-width: 100%;
  }

  .analysis-section .lotto-table th:nth-child(1),
  .analysis-section .lotto-table td:nth-child(1) {
    width: 33%;
  }

  .analysis-section .lotto-table th:nth-child(2),
  .analysis-section .lotto-table td:nth-child(2) {
    width: 34%;
  }

  .analysis-section .lotto-table th:nth-child(3),
  .analysis-section .lotto-table td:nth-child(3) {
    width: 33%;
  }

  .analysis-section .lotto-table .lotto-number.lotto-table-ball {
    width: 26px;
    height: 26px;
    font-size: 0.62rem;
  }

  .draws-number-cell {
    min-width: auto;
  }

  .draws-number-list {
    justify-content: center;
    flex-wrap: nowrap;
  }

  .draws-load-button {
    width: 100%;
  }
}

.lotto-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.02rem;
  color: #ffffff;
  box-shadow: 0 12px 18px -12px rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.lotto-number-yellow {
  background: linear-gradient(150deg, #facc15, #f59e0b);
  color: #ffffff;
}

.lotto-number-blue {
  background: linear-gradient(150deg, #3b82f6, #1d4ed8);
  color: #ffffff;
}

.lotto-number-red {
  background: linear-gradient(150deg, #ef4444, #b91c1c);
  color: #ffffff;
}

.lotto-number-black {
  background: linear-gradient(150deg, #0f172a, #1f2937);
  color: #ffffff;
}

.lotto-number-green {
  background: linear-gradient(150deg, #22c55e, #15803d);
  color: #ffffff;
}

@media (max-width: 600px) {
  .lotto-combo-grid .lotto-number,
  .lotto-history-combo .lotto-number {
    flex: 0 1 auto;
    width: clamp(30px, calc((100% - 5 * var(--combo-gap, 0.35rem)) / 6), 36px);
    height: clamp(30px, calc((100% - 5 * var(--combo-gap, 0.35rem)) / 6), 36px);
    font-size: 0.78rem;
  }
}
@media (max-width: 640px) {
  .draws-main .table-wrapper {
    overflow-x: visible;
  }

  .draws-main .table-wrapper table {
    min-width: 100%;
  }

  .draws-main .lotto-table thead {
    display: none;
  }

  .draws-main .lotto-table,
  .draws-main .lotto-table tbody,
  .draws-main .lotto-table tr,
  .draws-main .lotto-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .draws-main .lotto-table tr {
    margin-bottom: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 12px 18px -18px rgba(59, 130, 246, 0.45);
  }

  .draws-main .lotto-table tr:last-child {
    margin-bottom: 0;
  }

  .draws-main .lotto-table td {
    padding: 0.65rem 0.95rem;
    border: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    min-width: 100%;
  }

  .draws-main .lotto-table td:last-child {
    border-bottom: none;
  }

  .draws-main .lotto-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.78);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .draws-main .draws-number-cell {
    padding: 0.6rem 0.95rem;
    min-width: auto;
  }

  .draws-main .draws-number-list {
    justify-content: space-between;
    flex-wrap: nowrap;
    width: 100%;
    gap: clamp(0.25rem, 3vw, 0.35rem);
  }

  .draws-main .draws-number-list .lotto-number {
    width: clamp(30px, 8vw, 34px);
    height: clamp(30px, 8vw, 34px);
    font-size: clamp(0.68rem, 2.2vw, 0.76rem);
  }
}

@media (max-width: 480px) {
  .draws-main .lotto-table td {
    padding: 0.55rem 0.85rem;
    font-size: 0.86rem;
  }

  .draws-main .lotto-table td::before {
    font-size: 0.72rem;
  }

  .draws-main .draws-number-list {
    gap: clamp(0.2rem, 3vw, 0.28rem);
  }

  .draws-main .draws-number-list .lotto-number {
    width: clamp(28px, 9vw, 32px);
    height: clamp(28px, 9vw, 32px);
    font-size: clamp(0.62rem, 2.5vw, 0.72rem);
  }
}
