:root {
  --bg: #070708;
  --bg-2: #101010;
  --surface: rgba(22, 22, 24, 0.82);
  --surface-solid: #161618;
  --border: rgba(255, 255, 255, 0.08);
  --border-hot: rgba(196, 51, 17, 0.55);
  --text: #f3f3f3;
  --muted: #9a9a9a;
  --crimson: #c43311;
  --crimson-hot: #e8431f;
  --ember: #ff6a3d;
  --gold: #e8b84a;
  --silver: #c0c7d1;
  --bronze: #cd7f32;
  --radius: 10px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  --font: "Montserrat", system-ui, sans-serif;
  --scroll-track: #0c0c0e;
  --scroll-thumb: #3a1a14;
  --scroll-thumb-hover: var(--crimson);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--scroll-track);
  border-radius: 8px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--crimson-hot), var(--scroll-thumb));
  border-radius: 8px;
  border: 2px solid var(--scroll-track);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--ember), var(--crimson));
  border: 2px solid var(--scroll-track);
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: var(--scroll-track);
}

html, body {
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

.bg-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(196, 51, 17, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 30%, rgba(232, 184, 74, 0.06), transparent 50%),
    radial-gradient(ellipse 40% 50% at 10% 70%, rgba(196, 51, 17, 0.08), transparent 45%),
    linear-gradient(180deg, #0c0c0e 0%, #070708 55%, #050505 100%);
}

.bg-embers {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 140, 80, 0.45), transparent),
    radial-gradient(1px 1px at 28% 68%, rgba(232, 184, 74, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 62% 18%, rgba(255, 100, 50, 0.4), transparent),
    radial-gradient(1px 1px at 78% 52%, rgba(255, 160, 90, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 88% 80%, rgba(196, 51, 17, 0.45), transparent),
    radial-gradient(1px 1px at 42% 40%, rgba(255, 120, 60, 0.25), transparent);
  animation: emberDrift 18s ease-in-out infinite alternate;
  opacity: 0.7;
}

@keyframes emberDrift {
  from { transform: translateY(0) scale(1); opacity: 0.55; }
  to { transform: translateY(-24px) scale(1.03); opacity: 0.85; }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 12, 0.75);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 44px;
  width: auto;
  max-width: min(220px, 46vw);
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(196, 51, 17, 0.4));
}

.brand-text {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}

.top-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.link-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}

.link-chip:hover {
  color: var(--text);
  border-color: var(--border-hot);
  background: rgba(196, 51, 17, 0.12);
  transform: translateY(-1px);
}

main {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.hero {
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0 64px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 8% 5% auto;
  height: 55%;
  background:
    linear-gradient(180deg, transparent, rgba(7, 7, 8, 0.2)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath fill='none' stroke='rgba(196,51,17,0.08)' stroke-width='1' d='M0 60h120M60 0v120'/%3E%3C/svg%3E");
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  width: min(680px, 100%);
  text-align: center;
  position: relative;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 14px;
}

.brand-hero {
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: linear-gradient(180deg, #fff 20%, #f0b9a8 70%, var(--crimson) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(196, 51, 17, 0.2);
  margin-bottom: 14px;
}

.hero-tagline {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 28px;
}

.giveaway-desc {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.65;
  white-space: pre-wrap;
  max-width: 36rem;
  margin: 0 auto 22px;
  opacity: 0.92;
}

.end-timer {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px 12px;
  margin: 0 auto 24px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid rgba(232, 184, 74, 0.35);
  background: rgba(232, 184, 74, 0.08);
  box-shadow: 0 0 28px rgba(232, 184, 74, 0.06);
}

.end-timer-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.end-timer-value {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--text);
}

.end-timer-date {
  width: 100%;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.end-timer.ended {
  border-color: rgba(196, 51, 17, 0.45);
  background: rgba(196, 51, 17, 0.12);
}

.end-timer.ended .end-timer-label,
.end-timer.ended .end-timer-value {
  color: #ff8d7c;
}

.field-hint {
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}

.giveaway-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 0 auto 26px;
  max-width: 640px;
}

.gallery-item {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  aspect-ratio: 1;
  transition: border-color 0.2s, transform 0.2s;
}

.gallery-item.gallery-video {
  aspect-ratio: 16 / 9;
  grid-column: 1 / -1;
}

.gallery-item:hover {
  border-color: var(--border-hot);
  transform: translateY(-2px);
}

.gallery-item img,
.gallery-item video,
.gallery-item iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}

.gallery-item video,
.gallery-item iframe {
  object-fit: contain;
  background: #000;
}

.entries-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
}

.entry-chip {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
}

.entry-chip img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  image-rendering: pixelated;
}

.entry-name {
  font-weight: 700;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  outline: none;
  font-weight: 500;
  resize: vertical;
  min-height: 96px;
  line-height: 1.5;
}

.field textarea:focus {
  border-color: var(--border-hot);
  box-shadow: 0 0 0 3px rgba(196, 51, 17, 0.15);
}

.danger-zone {
  border-color: rgba(196, 51, 17, 0.35);
}

.danger-zone h2 {
  color: #ff8d7c;
}

.enter-form {
  margin-bottom: 18px;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.input-row:focus-within {
  border-color: var(--border-hot);
  box-shadow: 0 0 0 3px rgba(196, 51, 17, 0.18), var(--shadow);
}

.preview-head {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  image-rendering: pixelated;
  background: #1a1a1a;
  flex-shrink: 0;
}

.input-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 8px;
  font-size: 1rem;
  font-weight: 600;
}

.input-row input::placeholder {
  color: #666;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  border-radius: 8px;
  padding: 12px 18px;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(180deg, var(--crimson-hot), var(--crimson));
  color: #fff;
  box-shadow: 0 10px 28px rgba(196, 51, 17, 0.35);
  white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #ff4d28, var(--crimson-hot));
  transform: translateY(-1px);
}

.btn-shop {
  background: transparent;
  border: 1px solid rgba(232, 184, 74, 0.45);
  color: var(--gold);
  padding: 12px 22px;
  box-shadow: inset 0 0 24px rgba(232, 184, 74, 0.06);
}

.btn-shop:hover {
  background: rgba(232, 184, 74, 0.1);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.btn-tiny {
  padding: 6px 10px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-danger {
  background: linear-gradient(180deg, var(--crimson-hot), var(--crimson));
  color: #fff;
}

.cta-row {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.form-status {
  min-height: 1.4em;
  margin-top: 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

.form-status.ok {
  color: #6fdb8c;
}

.form-status.err {
  color: #ff7b6b;
}

.cooldown-line {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ember);
  animation: cooldownPulse 1.6s ease-in-out infinite;
}

@keyframes cooldownPulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; text-shadow: 0 0 18px rgba(255, 106, 61, 0.35); }
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat {
  padding: 16px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.stat-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-section {
  margin-top: 28px;
  padding: 28px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(16, 16, 18, 0.72);
  box-shadow: var(--shadow);
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.section-head p {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.empty-note {
  color: var(--muted);
  text-align: center;
  padding: 24px 12px;
  font-weight: 500;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.podium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 22px 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  overflow: hidden;
}

.podium-card.place-1 {
  border-color: rgba(232, 184, 74, 0.45);
  background: linear-gradient(180deg, rgba(232, 184, 74, 0.12), rgba(255, 255, 255, 0.02));
  order: 2;
}

.podium-card.place-2 {
  border-color: rgba(192, 199, 209, 0.35);
  order: 1;
}

.podium-card.place-3 {
  border-color: rgba(205, 127, 50, 0.4);
  order: 3;
}

.place-badge {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 12px;
  line-height: 1.2;
}

.place-1 .place-badge { color: var(--gold); }
.place-2 .place-badge { color: var(--silver); }
.place-3 .place-badge { color: var(--bronze); }

.podium-card img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  image-rendering: pixelated;
  margin: 0 auto 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.podium-card .name {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 4px;
  word-break: break-word;
  text-align: center;
  width: 100%;
}

.podium-card .entries {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  width: 100%;
}

.live-winners {
  margin: 0 0 24px;
  padding: 20px 16px;
  border-radius: 14px;
  border: 1px solid rgba(232, 184, 74, 0.4);
  background: linear-gradient(180deg, rgba(232, 184, 74, 0.12), rgba(255, 255, 255, 0.02));
  box-shadow: 0 0 40px rgba(232, 184, 74, 0.1);
}

.live-winners .section-head {
  margin-bottom: 16px;
}

.live-winners .section-head h2 {
  color: var(--gold);
}

.podium-card.place-1,
.podium-card.place-2,
.podium-card.place-3 {
  order: initial;
}

.hero.has-winners {
  min-height: auto;
  padding-bottom: 40px;
}

.chart-section {
  overflow: visible;
}

.chart-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 28px;
  align-items: center;
}

.chart-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.entry-donut {
  width: min(100%, 260px);
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(196, 51, 17, 0.22));
}

.chart-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 28;
}

.chart-track-fill {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 38;
}

.chart-hole {
  fill: rgba(10, 10, 12, 0.96);
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 1;
}

.chart-wedge {
  transform-origin: 120px 120px;
  opacity: 0;
  animation: chartPop 0.55s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.05s);
  cursor: pointer;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.chart-wedge.active {
  filter: brightness(1.15) drop-shadow(0 0 10px rgba(255, 106, 61, 0.45));
}

@keyframes chartPop {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.chart-slice {
  /* legacy no-op kept for safety */
}

.chart-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--swatch, #c43311);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}

.chart-center-value {
  fill: #fff;
  font-size: 28px;
  font-weight: 800;
  font-family: Montserrat, sans-serif;
}

.chart-center-label {
  fill: #9a9a9a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: Montserrat, sans-serif;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.chart-legend-item {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.chart-legend-item:hover {
  border-color: rgba(196, 51, 17, 0.3);
  background: rgba(196, 51, 17, 0.08);
}

.chart-legend-name {
  font-weight: 700;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-legend-stats {
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--ember);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(16, 16, 18, 0.95);
  border: 1px solid rgba(232, 184, 74, 0.35);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

@media (max-width: 720px) {
  .chart-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.lb-row {
  display: grid;
  grid-template-columns: 48px 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.025);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.lb-row:hover {
  background: rgba(196, 51, 17, 0.08);
  border-color: rgba(196, 51, 17, 0.25);
  transform: translateX(2px);
}

.lb-rank {
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.lb-row img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  image-rendering: pixelated;
}

.lb-name {
  font-weight: 700;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 7.5rem;
}

.lb-entries {
  font-weight: 800;
  color: var(--ember);
  font-variant-numeric: tabular-nums;
}

.lb-cooldown {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lb-cooldown.ready {
  color: #6fdb8c;
}

.site-footer {
  text-align: center;
  padding: 24px 16px 40px;
  color: #666;
  font-size: 0.8rem;
  font-weight: 500;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(120%);
  background: var(--surface-solid);
  border: 1px solid var(--border-hot);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  z-index: 100;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.reveal {
  animation: riseIn 0.7s ease both;
}

.reveal.delay-1 { animation-delay: 0.12s; }
.reveal.delay-2 { animation-delay: 0.22s; }
.reveal.delay-2b { animation-delay: 0.26s; }
.reveal.delay-2c { animation-delay: 0.3s; }
.reveal.delay-3 { animation-delay: 0.34s; }

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Admin */
.admin-shell {
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 80px;
}

.admin-card {
  padding: 28px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(16, 16, 18, 0.85);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.admin-card h1,
.admin-card h2 {
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.admin-card h1 {
  font-size: 1.8rem;
}

.admin-card h2 {
  font-size: 1.15rem;
}

.admin-card .sub {
  color: var(--muted);
  margin-bottom: 20px;
  font-weight: 500;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form.row {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.admin-form.triple {
  grid-template-columns: 1.4fr 0.7fr auto;
  align-items: end;
}

.field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  outline: none;
  font-weight: 600;
}

.field input:focus {
  border-color: var(--border-hot);
  box-shadow: 0 0 0 3px rgba(196, 51, 17, 0.15);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.table-wrap {
  overflow-x: auto;
}

table.entries-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.entries-table th,
.entries-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.entries-table th {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.entries-table td {
  font-weight: 600;
}

.entries-table .num {
  font-variant-numeric: tabular-nums;
  color: var(--ember);
}

.entries-table .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.draw-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.history-item .when {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.history-winners {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.history-winners span {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

@media (max-width: 720px) {
  .topbar {
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .input-row {
    flex-wrap: wrap;
  }

  .input-row input {
    width: 100%;
    order: 2;
  }

  .btn-primary {
    width: 100%;
    order: 3;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .podium {
    grid-template-columns: 1fr;
  }

  .podium-card.place-1,
  .podium-card.place-2,
  .podium-card.place-3 {
    order: initial;
  }

  .lb-row {
    grid-template-columns: 36px 40px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
  }

  .lb-meta {
    min-width: 0;
  }

  .lb-cooldown {
    font-size: 0.68rem;
  }

  .admin-form.row,
  .admin-form.triple {
    grid-template-columns: 1fr;
  }

  .draw-result {
    grid-template-columns: 1fr;
  }

  .panel-section {
    padding: 20px 16px;
  }
}
