/* ── Lottery Subnav ── */
.lottery-subnav {
  background: #0f766e;
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(13,148,136,0.35);
}

.lottery-subnav a {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #99f6e4;
  background: rgba(255,255,255,0.1);
  transition: background 0.2s, color 0.2s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}
.lottery-subnav a:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
}
.lottery-subnav a.active {
  background: linear-gradient(135deg, #0d9488, #34d399);
  color: #fff;
  box-shadow: 0 2px 8px rgba(52,211,153,0.4);
}
.lottery-subnav .nav-sep {
  color: #2dd4bf;
  font-size: 16px;
}

/* ── Results sections ── */
.results-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  overflow: hidden;
}

.section-header {
  background: linear-gradient(135deg, #0d9488, #34d399);
  padding: 14px 20px;
}
.section-header h2 {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.section-body {
  padding: 20px;
  transition: padding 0.25s ease;
}

.section-body-collapsed {
  display: none;
}

.section-header {
  cursor: pointer;
  user-select: none;
}

.section-chevron {
  float: right;
  font-size: 11px;
  opacity: 0.65;
  margin-left: 8px;
  line-height: 1.6;
}

/* ── Draw selector ── */
.draw-select-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.draw-select-label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

.draw-select {
  flex: 1;
  max-width: 380px;
  padding: 7px 12px;
  border: 1.5px solid #d1fae5;
  border-radius: 8px;
  font-size: 13px;
  color: #0d9488;
  background: #f0fdfb;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.draw-select:focus, .draw-select:hover {
  border-color: #34d399;
  box-shadow: 0 0 0 3px rgba(52,211,153,0.15);
}

/* ── Draw info line ── */
.draw-info {
  font-size: 13px;
  color: #555;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.draw-info .draw-num {
  font-weight: 700;
  color: #0d9488;
  font-size: 14px;
}
.draw-info .draw-sep {
  color: #bbb;
}
.draw-info .draw-date {
  color: #666;
}

/* ── Number balls ── */
.balls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ball-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ball {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  box-shadow: 0 3px 8px rgba(0,0,0,0.18), inset 0 -2px 4px rgba(0,0,0,0.12);
}

.ball-main {
  background: linear-gradient(145deg, #0d9488, #34d399);
}

.ball-add {
  background: linear-gradient(145deg, #d97706, #fbbf24);
}

.ball-add-label {
  font-size: 10px;
  color: #d97706;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.balls-divider {
  width: 2px;
  height: 40px;
  background: #e5e7eb;
  border-radius: 1px;
  margin: 0 4px;
  align-self: center;
}

/* ── Odd / Even options ── */
.oe-options {
  margin-bottom: 14px;
}
.oe-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  user-select: none;
}
.oe-checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #0d9488;
  cursor: pointer;
}

/* ── Odd / Even table ── */
.oe-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.oe-table thead tr {
  background: #f0fdfb;
  border-bottom: 2px solid #d1fae5;
}

.oe-table th {
  padding: 9px 12px;
  text-align: left;
  font-weight: 700;
  color: #0d9488;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.oe-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.oe-table tbody tr:last-child td { border-bottom: none; }

/* ── Number Group ── */
.ng-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.ng-row:last-child { margin-bottom: 0; }

.ng-row-label {
  width: 36px;
  min-width: 36px;
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  padding-top: 14px;
  text-align: right;
}

.ng-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.oe-row-selected {
  background: #f0fdfb;
}
.oe-row-selected td { font-weight: 600; }

.oe-current-tag {
  color: #0d9488;
  font-size: 10px;
}

.oe-draw { color: #0d9488; font-weight: 700; white-space: nowrap; }
.oe-date { color: #666; white-space: nowrap; }
.oe-sum  { font-weight: 700; color: #4f46e5; white-space: nowrap; }

.oe-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.oe-pill-odd  { background: #fef3c7; color: #92400e; }
.oe-pill-even { background: #dbeafe; color: #1e40af; }

.oe-nums { display: flex; flex-wrap: wrap; gap: 5px; }

.oe-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}
.oe-odd  { background: #fef3c7; color: #92400e; border: 1.5px solid #fcd34d; }
.oe-even { background: #dbeafe; color: #1e40af; border: 1.5px solid #93c5fd; }
.oe-add-num { outline: 2px solid #0d9488; outline-offset: 1px; }

@media (max-width: 600px) {
  .ball { width: 40px; height: 40px; font-size: 14px; }
  .freq-ball { width: 36px; height: 36px; font-size: 12px; }
  .freq-grid { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
  .balls-row { gap: 8px; }

  /* OE table → stacked card layout */
  .oe-table thead { display: none; }
  .oe-table, .oe-table tbody, .oe-table tr, .oe-table td { display: block; width: 100%; }
  .oe-table tr {
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
  }
  .oe-table tbody tr:last-child td { border-bottom: 1px solid #f3f4f6; }
  .oe-table tbody tr:last-child td:last-child { border-bottom: none; }
  .oe-table td {
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f3f4f6;
  }
  .oe-table td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    color: #0d9488;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 52px;
    flex-shrink: 0;
  }
  .oe-nums { flex-wrap: wrap; }
}

/* ── Frequency options ── */
.freq-options {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.freq-count-label, .freq-count-unit {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

.freq-count-input {
  width: 72px;
  padding: 6px 10px;
  border: 1.5px solid #d1fae5;
  border-radius: 8px;
  font-size: 13px;
  color: #0d9488;
  background: #f0fdfb;
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.freq-count-input:focus, .freq-count-input:hover {
  border-color: #34d399;
  box-shadow: 0 0 0 3px rgba(52,211,153,0.15);
}

/* ── Frequency section ── */
.freq-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 16px;
}

.freq-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 11px;
  color: #666;
}
.freq-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.legend-hot        { background: linear-gradient(145deg, #0d9488, #34d399); }
.legend-warm       { background: linear-gradient(145deg, #0891b2, #67e8f9); }
.legend-cold       { background: linear-gradient(145deg, #94a3b8, #cbd5e1); }
.legend-winner     { background: linear-gradient(145deg, #b91c1c, #f87171); }
.legend-add-winner { background: linear-gradient(145deg, #b45309, #fbbf24); }

.freq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 12px;
}

.freq-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.freq-ball {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15), inset 0 -2px 4px rgba(0,0,0,0.1);
}

.ball-hot  { background: linear-gradient(145deg, #0d9488, #34d399); }
.ball-warm { background: linear-gradient(145deg, #0891b2, #67e8f9); }
.ball-cold { background: linear-gradient(145deg, #94a3b8, #cbd5e1); }

/* Winning ball — larger, full opacity */
.freq-ball-win {
  width: 50px;
  height: 50px;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25), inset 0 -2px 4px rgba(0,0,0,0.15);
}

/* Non-winning ball — dimmed */
.freq-ball-dim {
  opacity: 0.32;
}

/* Dot indicator below the additional winning ball */
.freq-add-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1e1b4b;
  margin: 0 auto -3px;
}

.freq-count {
  font-size: 12px;
  font-weight: 700;
  color: #555;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .ball { width: 40px; height: 40px; font-size: 14px; }
  .freq-ball { width: 36px; height: 36px; font-size: 12px; }
  .freq-grid { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
  .balls-row { gap: 8px; }
}
