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

/* ── Game subnav ── */
.lottery-subnav {
  background: #1e3a8a;
  border-radius: 10px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(30,58,138,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: #93c5fd;
  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,#1d4ed8,#60a5fa); color: #fff; box-shadow: 0 2px 8px rgba(29,78,216,0.4); }
.lottery-subnav .nav-sep { color: #1e40af; 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,#1d4ed8,#60a5fa); 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: #eff6ff; cursor: pointer; outline: none; }
.draw-select:focus { border-color: #1d4ed8; box-shadow: 0 0 0 2px rgba(29,78,216,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-legend { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; color: #666; margin-bottom: 14px; padding: 8px 12px; background: #eff6ff; border-radius: 8px; border: 1px solid #dbeafe; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 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: #eff6ff; border-bottom: 1px solid #dbeafe; }
.perm-source-num { font-family: 'Courier New', monospace; font-size: 16px; font-weight: 700; color: #1e3a8a; letter-spacing: 2px; }
.perm-count-label { margin-left: auto; font-size: 10px; color: #1d4ed8; font-weight: 600; background: #dbeafe; padding: 2px 7px; border-radius: 10px; }
.perm-badges { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px; }
.perm-badge { position: relative; display: inline-flex; align-items: center; gap: 3px; font-family: 'Courier New', monospace; font-size: 12px; font-weight: 600; padding: 3px 7px; border-radius: 6px; background: #f3f4f6; color: #9ca3af; cursor: default; border: 1px solid #e5e7eb; letter-spacing: 0.5px; transition: transform 0.15s; }
.perm-badge.self { background: #dbeafe; color: #1e3a8a; border-color: #93c5fd; font-weight: 700; }
.perm-badge.found { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #78350f; border-color: #f59e0b; cursor: pointer; }
.perm-badge.found:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(245,158,11,0.35); }
.perm-badge.self.found { background: linear-gradient(135deg,#dbeafe,#93c5fd); color: #1e3a8a; border-color: #1d4ed8; }
.perm-hit-count { display: inline-flex; align-items: center; justify-content: center; background: #f59e0b; color: #fff; font-size: 9px; font-family: sans-serif; font-weight: 700; width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.perm-badge.self.found .perm-hit-count { background: #1d4ed8; }

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