@import url('../style.css');

/* ── Game subnav ── */
.lottery-subnav {
  background: #7f1d1d;
  border-radius: 10px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(127,29,29,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: #fca5a5;
  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,#dc2626,#f87171); color: #fff; box-shadow: 0 2px 8px rgba(220,38,38,0.4); }
.lottery-subnav .nav-sep { color: #991b1b; 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,#dc2626,#f87171); 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 ── */
.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: #fff5f5; cursor: pointer; outline: none; }
.draw-select:focus { border-color: #dc2626; box-shadow: 0 0 0 2px rgba(220,38,38,0.15); }

/* ── Draw result ── */
.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; }

/* ── Permutations ── */
.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: #fff5f5; border-bottom: 1px solid #fee2e2; }
.perm-source-num { font-family: 'Courier New', monospace; font-size: 16px; font-weight: 700; color: #7f1d1d; letter-spacing: 2px; }
.perm-count-label { margin-left: auto; font-size: 10px; color: #dc2626; font-weight: 600; background: #fee2e2; padding: 2px 7px; border-radius: 10px; }
.perm-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }

.perm-row { display: flex; align-items: baseline; gap: 8px; padding: 4px 6px; border-radius: 6px; }
.perm-row-self { background: #fee2e2; border: 1px solid #fca5a5; margin-bottom: 4px; }
.perm-row-self .perm-num { color: #7f1d1d; font-weight: 800; }
.perm-row-won { background: #fefce8; border: 1px solid #fde68a; }
.perm-row-won .perm-num { color: #78350f; font-weight: 700; }
.perm-row-top3 { background: #fdf2f8; border-color: #f0abdb; }
.perm-row-top3 .perm-num { color: #9d174d; }

.perm-num { font-family: 'Courier New', monospace; font-size: 13px; letter-spacing: 1px; flex-shrink: 0; }
.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-date-top3 { background: #fdf2f8; border-color: #f0abdb; color: #9d174d; font-weight: 700; }
.perm-date-top3 em { color: #be185d; }
.perm-current-draw { font-size: 10px; color: #dc2626; font-style: italic; }
.perm-also-label { font-size: 10px; color: #9ca3af; margin-right: 2px; }

.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; }
.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; }

/* Month colours */
.perm-month-1  { border-left: 3px solid #3b82f6; }
.perm-month-2  { border-left: 3px solid #8b5cf6; }
.perm-month-3  { border-left: 3px solid #10b981; }
.perm-month-4  { border-left: 3px solid #f59e0b; }
.perm-month-5  { border-left: 3px solid #ef4444; }
.perm-month-6  { border-left: 3px solid #f97316; }
.perm-month-7  { border-left: 3px solid #06b6d4; }
.perm-month-8  { border-left: 3px solid #84cc16; }
.perm-month-9  { border-left: 3px solid #ec4899; }
.perm-month-10 { border-left: 3px solid #14b8a6; }
.perm-month-11 { border-left: 3px solid #a855f7; }
.perm-month-12 { border-left: 3px solid #0ea5e9; }

@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; }
}
