@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ══════════════════════════════════════════════════════
   Global Winners Block — Refined Editorial
   Same palette, elevated execution.
   Key upgrades:
   · Multi-layer shadows with precise depth
   · Blue top-accent on cards
   · Staggered fade-up entrance
   · Stats bar as a showcase piece
   · Winner rows with subtle left-indent rhythm
   · All spacing on a consistent 4px grid
══════════════════════════════════════════════════════ */

.gw-wrap {
  --gw-blue:        #2563eb;
  --gw-blue-dk:     #1d4ed8;
  --gw-blue-lt:     #eff6ff;
  --gw-blue-mid:    #bfdbfe;
  --gw-blue-xlt:    #f0f7ff;
  --gw-green:       #059669;
  --gw-green-lt:    #ecfdf5;
  --gw-green-mid:   #bbf7d0;
  --gw-gray-50:     #f8f9fb;
  --gw-gray-100:    #f3f4f6;
  --gw-gray-200:    #e8eaed;
  --gw-gray-300:    #d1d5db;
  --gw-gray-400:    #b0b6c3;
  --gw-gray-500:    #7c8294;
  --gw-gray-700:    #3a3f4b;
  --gw-gray-900:    #0f1117;
  --gw-white:       #ffffff;
  --gw-radius:      12px;
  --gw-radius-sm:   7px;
  --gw-radius-xs:   4px;

  /* Layered shadows — the secret to depth without darkness */
  --gw-shadow-xs:   0 1px 2px rgba(15,17,23,0.04);
  --gw-shadow-sm:   0 1px 3px rgba(15,17,23,0.06), 0 1px 2px rgba(15,17,23,0.04);
  --gw-shadow:      0 2px 8px rgba(15,17,23,0.06), 0 1px 3px rgba(15,17,23,0.04);
  --gw-shadow-md:   0 4px 20px rgba(15,17,23,0.08), 0 2px 6px rgba(15,17,23,0.04);
  --gw-shadow-blue: 0 4px 20px rgba(37,99,235,0.10), 0 2px 6px rgba(37,99,235,0.06);

  --gw-font:        'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --gw-mono:        'DM Mono', 'SF Mono', monospace;

  --gw-transition:  0.16s cubic-bezier(0.4, 0, 0.2, 1);

  font-family: var(--gw-font);
  color: var(--gw-gray-900);
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
}

/* ── Heading ──────────────────────────────────────── */
.gw-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--gw-gray-900);
  margin: 0 0 20px;
  letter-spacing: -0.03em;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gw-heading::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 20px;
  background: linear-gradient(180deg, var(--gw-blue) 0%, #60a5fa 100%);
  border-radius: 99px;
  flex-shrink: 0;
}

/* ── Stats bar ────────────────────────────────────── */
.gw-stats {
  display: flex;
  align-items: stretch;
  background: var(--gw-white);
  border: 1px solid var(--gw-gray-200);
  border-radius: var(--gw-radius);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--gw-shadow);
  /* Subtle top highlight line */
  position: relative;
}

.gw-stats::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gw-blue) 0%, #60a5fa 50%, transparent 100%);
  opacity: 0.6;
}

.gw-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
  padding: 20px 24px;
  position: relative;
}

.gw-stat:first-child {
  border-right: 1px solid var(--gw-gray-100);
}

.gw-stat__num {
  font-size: 30px;
  font-weight: 700;
  color: var(--gw-blue);
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.gw-stat__label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gw-gray-400);
}

.gw-stat__divider { display: none; }

/* ── Lottery cards ────────────────────────────────── */
.gw-lottery {
  background: var(--gw-white);
  border: 1px solid var(--gw-gray-200);
  border-radius: var(--gw-radius);
  padding: 0;
  margin-bottom: 10px;
  box-shadow: var(--gw-shadow-sm);
  overflow: hidden;
  transition:
    box-shadow var(--gw-transition),
    border-color var(--gw-transition),
    transform var(--gw-transition);

  /* Staggered entrance */
  opacity: 0;
  animation: gw-rise 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.gw-lottery:nth-child(1) { animation-delay: 0.04s; }
.gw-lottery:nth-child(2) { animation-delay: 0.09s; }
.gw-lottery:nth-child(3) { animation-delay: 0.14s; }
.gw-lottery:nth-child(4) { animation-delay: 0.19s; }
.gw-lottery:nth-child(5) { animation-delay: 0.24s; }
.gw-lottery:nth-child(n+6) { animation-delay: 0.28s; }

@keyframes gw-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gw-lottery:hover {
  border-color: var(--gw-blue-mid);
  box-shadow: var(--gw-shadow-blue);
  transform: translateY(-1px);
}

/* Blue accent line on top of each card */
.gw-lottery::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--gw-blue), var(--gw-blue-mid));
  opacity: 0;
  transition: opacity var(--gw-transition);
}

.gw-lottery:hover::before {
  opacity: 1;
}

/* ── Lottery header ───────────────────────────────── */
.gw-lottery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gw-gray-100);
  background: var(--gw-gray-50);
}

.gw-lottery-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gw-gray-900);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.gw-lottery-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.gw-lottery-date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--gw-gray-500);
  white-space: nowrap;
  font-family: var(--gw-mono);
  background: var(--gw-white);
  border: 1px solid var(--gw-gray-200);
  border-radius: var(--gw-radius-xs);
  padding: 3px 8px;
  box-shadow: var(--gw-shadow-xs);
}

.gw-lottery-date-label {
  font-family: var(--gw-font);
  font-size: 10px;
  font-weight: 500;
  color: var(--gw-gray-400);
  letter-spacing: 0;
}

.gw-lottery-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--gw-white);
  color: var(--gw-gray-500);
  border: 1px solid var(--gw-gray-200);
  white-space: nowrap;
  box-shadow: var(--gw-shadow-xs);
}

.gw-lottery-badge--winners {
  background: var(--gw-blue-xlt);
  color: var(--gw-blue);
  border-color: var(--gw-blue-mid);
}

/* ── Card body ────────────────────────────────────── */
.gw-lottery-body {
  padding: 16px 20px;
}

/* ── Description ──────────────────────────────────── */
.gw-lottery-desc {
  font-size: 13px;
  color: var(--gw-gray-500);
  margin: 0 0 14px;
  line-height: 1.65;
}

/* ── Progress bar ─────────────────────────────────── */
.gw-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.gw-progress {
  flex: 1;
  height: 4px;
  background: var(--gw-gray-100);
  border-radius: 99px;
  overflow: hidden;
}

.gw-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gw-blue) 0%, #60a5fa 100%);
  border-radius: 99px;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.gw-progress-bar--full {
  background: linear-gradient(90deg, var(--gw-green) 0%, #34d399 100%);
}

.gw-progress-label {
  font-size: 10.5px;
  font-family: var(--gw-mono);
  color: var(--gw-gray-400);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ── Gift pills ───────────────────────────────────── */
.gw-gifts {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.gw-gifts-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gw-gray-400);
  padding-top: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.gw-gift-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.gw-gift-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--gw-gray-700);
  background: var(--gw-gray-50);
  border: 1px solid var(--gw-gray-200);
  border-radius: var(--gw-radius-sm);
  padding: 3px 10px;
  line-height: 1.4;
  transition:
    background var(--gw-transition),
    border-color var(--gw-transition),
    color var(--gw-transition),
    box-shadow var(--gw-transition);
  box-shadow: var(--gw-shadow-xs);
}

.gw-gift-pill:hover {
  background: var(--gw-blue-xlt);
  border-color: var(--gw-blue-mid);
  color: var(--gw-blue);
  box-shadow: 0 2px 6px rgba(37,99,235,0.10);
}

/* ── Winners section ──────────────────────────────── */
.gw-winners-section {
  border-top: 1px solid var(--gw-gray-100);
  padding-top: 14px;
}

.gw-winners-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gw-gray-400);
  margin: 0 0 10px;
}

.gw-no-winners {
  font-size: 13px;
  color: var(--gw-gray-400);
  margin: 0;
  font-style: italic;
}

/* ── Winner rows ──────────────────────────────────── */
.gw-winners-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  border: none;
}

.gw-winners-table th,
.gw-winners-table td {
  border: none;
  border-width: 0;
}

.gw-winners-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gw-gray-500);
  padding: 0 20px 12px;
  border-bottom: 1px solid var(--gw-gray-100);
}

.gw-winners-table th:first-child,
.gw-winner-row td:first-child {
  padding-left: 4px;
}

.gw-winner-row td {
  padding: 14px 20px;
  vertical-align: middle;
  border: none;
  transition: background var(--gw-transition);
}

.gw-winner-row:hover td {
  background: var(--gw-blue-xlt);
}

.gw-winner-gift-cell {
  width: 1%;
  white-space: nowrap;
}

.gw-winner-name-cell {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gw-gray-900);
  text-align: left;
  letter-spacing: -0.01em;
}

.gw-winner-gift {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 11px;
  color: var(--gw-green);
  background: var(--gw-green-lt);
  border: 1px solid var(--gw-green-mid);
  border-radius: 99px;
  padding: 4px 14px;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: var(--gw-shadow-xs);
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 560px) {
  .gw-lottery-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .gw-stat {
    padding: 16px;
  }

  .gw-stat__num {
    font-size: 24px;
  }
}
