@import url('style.css');

/* ── Lottery subnav ── */
.lottery-subnav {
  background: #3b0764;
  border-radius: 10px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(59,7,100,0.3);
}
.lottery-subnav a {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #d8b4fe;
  background: rgba(255,255,255,0.07);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.lottery-subnav a:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
  text-decoration: none;
}
.lottery-subnav a.active {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,0.4);
}
.lottery-subnav .nav-sep { color: #6b21a8; font-size: 16px; }

/* ── Results section ── */
.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, #7c3aed, #a78bfa);
  padding: 13px 18px;
}
.section-header h2 {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.section-header .section-meta {
  color: rgba(255,255,255,0.82);
  font-size: 11px;
  margin-top: 5px;
  letter-spacing: 0.4px;
}
.section-header .data-range-badge {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.section-body { padding: 16px 18px; }

/* ── Draw selector row ── */
.draw-select-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.draw-select-label { font-size: 13px; font-weight: 600; color: #555; }
.draw-select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: #333;
  background: #f9f7ff;
  cursor: pointer;
  outline: none;
}
.draw-select:focus { border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,0.15); }

/* ── Draw result display ── */
.draw-result { display: flex; flex-direction: column; gap: 12px; }
.draw-date-row { font-size: 13px; color: #666; font-weight: 500; }

.prize-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.top3-row { display: flex; gap: 16px; flex-wrap: wrap; }
.top3-cell { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; min-width: 90px; }
.top3-cell .prize-label { width: 100%; text-align: center; }
.prize-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  min-width: 88px;
  padding: 3px 8px;
  border-radius: 12px;
  text-align: center;
  flex-shrink: 0;
}
.prize-label.first       { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.prize-label.second      { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.prize-label.third       { background: #fdf4ec; color: #7c2d12; border: 1px solid #f6c49a; }
.prize-label.starter     { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.prize-label.consolation { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }

.num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 8px;
  width: 52px;
  height: 36px;
  font-size: 15px;
}
.num-badge.first  { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #fff; box-shadow: 0 3px 10px rgba(245,158,11,0.45); width: 84px; height: 56px; font-size: 26px; border-radius: 10px; }
.num-badge.second { background: linear-gradient(135deg, #64748b, #94a3b8); color: #fff; box-shadow: 0 3px 10px rgba(100,116,139,0.4); width: 78px; height: 52px; font-size: 24px; border-radius: 10px; }
.num-badge.third  { background: linear-gradient(135deg, #92400e, #b87333); color: #fff; box-shadow: 0 3px 10px rgba(146,64,14,0.35); width: 74px; height: 48px; font-size: 22px; border-radius: 10px; }
.num-badge.starter     { background: #dbeafe; color: #1e40af; font-size: 16px; width: 58px; height: 38px; }
.num-badge.consolation { background: #ede9fe; color: #5b21b6; font-size: 16px; width: 58px; height: 38px; }

.num-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Permutation section ── */
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.perm-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #fafafa;
}

.perm-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f5f0ff;
  border-bottom: 1px solid #ede9fe;
}

.perm-source-num {
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #1e1b4b;
  letter-spacing: 2px;
}

.perm-count-label {
  margin-left: auto;
  font-size: 10px;
  color: #7c3aed;
  font-weight: 600;
  background: #ede9fe;
  padding: 2px 7px;
  border-radius: 10px;
}

.perm-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Each number row */
.perm-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;
}

/* Winning number row */
.perm-row-self {
  background: #ede9fe;
  border: 1px solid #c4b5fd;
  margin-bottom: 4px;
}
.perm-row-self .perm-num {
  color: #4c1d95;
  font-weight: 800;
}

/* Previously won row */
.perm-row-won {
  background: #fefce8;
  border: 1px solid #fde68a;
}
.perm-row-won .perm-num {
  color: #78350f;
  font-weight: 700;
}

/* Number itself */
.perm-num {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: 1px;
  flex-shrink: 0;
}

/* Date(s) container */
.perm-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.perm-date {
  font-size: 10px;
  color: #6b7280;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}
.perm-date em { font-style: normal; color: #9ca3af; }

.perm-current-draw {
  font-size: 10px;
  color: #7c3aed;
  font-style: italic;
}

.perm-also-label {
  font-size: 10px;
  color: #9ca3af;
  margin-right: 2px;
}

/* Top-3 prize row highlight */
.perm-row-top3 {
  background: #fdf2f8;
  border-color: #f0abdb;
}
.perm-row-top3 .perm-num { color: #9d174d; }

/* Top-3 date badge highlight */
.perm-date-top3 {
  background: #fdf2f8;
  border-color: #f0abdb;
  color: #9d174d;
  font-weight: 700;
}
.perm-date-top3 em { color: #be185d; }

/* Month colours — one per calendar month */
.perm-month-1  { border-left: 3px solid #3b82f6; } /* Jan — blue */
.perm-month-2  { border-left: 3px solid #8b5cf6; } /* Feb — violet */
.perm-month-3  { border-left: 3px solid #10b981; } /* Mar — emerald */
.perm-month-4  { border-left: 3px solid #f59e0b; } /* Apr — amber */
.perm-month-5  { border-left: 3px solid #ef4444; } /* May — red */
.perm-month-6  { border-left: 3px solid #f97316; } /* Jun — orange */
.perm-month-7  { border-left: 3px solid #06b6d4; } /* Jul — cyan */
.perm-month-8  { border-left: 3px solid #84cc16; } /* Aug — lime */
.perm-month-9  { border-left: 3px solid #ec4899; } /* Sep — pink */
.perm-month-10 { border-left: 3px solid #14b8a6; } /* Oct — teal */
.perm-month-11 { border-left: 3px solid #a855f7; } /* Nov — purple */
.perm-month-12 { border-left: 3px solid #0ea5e9; } /* Dec — sky */

/* Group labels */
.perm-group-label {
  font-size: 10px;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
  margin-bottom: 2px;
  padding: 0 2px;
}
.perm-group-label-never {
  color: #9ca3af;
}

/* Never-won list */
.perm-never-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 2px;
}
.perm-num-never {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #111827;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: 2px 6px;
  letter-spacing: 0.5px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .prize-label  { min-width: 72px; font-size: 10px; padding: 2px 6px; }
  .num-badge    { width: 46px; height: 32px; font-size: 13px; }
  .num-badge.first  { width: 70px; height: 46px; font-size: 21px; }
  .num-badge.second { width: 64px; height: 42px; font-size: 19px; }
  .num-badge.third  { width: 60px; height: 40px; font-size: 18px; }
  .top3-row { gap: 10px; }
  .perm-grid { grid-template-columns: 1fr; }
  .perm-num { font-size: 12px; }
}
