:root {
  --bg: #08111f;
  --panel: rgba(15, 25, 45, 0.92);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #eef4ff;
  --muted: #a9b8d4;
  --accent: #ffb703;
  --accent-2: #4cc9f0;
  --danger: #ff4d6d;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(76, 201, 240, 0.15), transparent 25%),
    radial-gradient(circle at top right, rgba(255, 183, 3, 0.12), transparent 30%),
    linear-gradient(180deg, #050b14 0%, #08111f 100%);
}
.page-shell { max-width: 1200px; margin: 0 auto; padding: 32px 20px 48px; }
.hero, .layout, .section-header, .button-row, .grid-2 { display: grid; gap: 16px; }
.hero {
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  margin: 0 auto 28px;
  text-align: center;
  padding: 8px 28px 10px;
  max-width: 920px;
}
.hero > div {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  justify-items: center;
}
.hero .eyebrow, .hero h1, .hero .subcopy { text-align: center; }
.hero-icon {
  display: block;
  width: clamp(72px, 10vw, 104px);
  height: auto;
  margin: 6px auto 2px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.28));
}
.hero h1 { width: 100%; }
.hero .subcopy { max-width: none; font-size: 1.02rem; white-space: nowrap; }
.layout { grid-template-columns: 360px 1fr; margin-bottom: 24px; }
.hero-stats { display: grid; gap: 16px; }
.panel, .stat-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.panel { padding: 22px; }
.stat-card { padding: 18px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-2); font-size: 12px; font-weight: 700; }
h1 { margin: 8px 0 10px; font-size: clamp(2.1rem, 4vw, 4rem); line-height: 1; }
.subcopy, .help-text, .result-meta, .chip, .stat-label, .field span { color: var(--muted); }
.subcopy { max-width: 720px; margin: 0 auto; line-height: 1.6; }
.stat-label { display: block; margin-bottom: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field input, .field select {
  width: 100%; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: var(--text);
  border-radius: 12px; padding: 12px 14px; font: inherit;
}
.inline-checkbox { grid-template-columns: 20px 1fr; align-items: center; }
.button-row { grid-template-columns: 1fr 1fr; }
button {
  border: 0; border-radius: 14px; padding: 14px 16px; font: inherit; font-weight: 800; cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
button:hover:not(:disabled) { transform: translateY(-1px); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.primary-button { background: linear-gradient(135deg, var(--accent), #ff7b00); color: #1a1200; }
.ghost-button { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid rgba(255,255,255,0.1); }
.roulette-label { color: var(--accent-2); text-transform: uppercase; font-size: 12px; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 12px; }
.roulette-display {
  min-height: 132px; display: grid; place-items: center; text-align: center;
  border-radius: 18px; border: 1px dashed rgba(255,255,255,0.15); background: rgba(255,255,255,0.03);
  font-size: clamp(1.5rem, 3vw, 2.8rem); font-weight: 800; padding: 24px;
}
.result-card { margin-top: 18px; padding: 18px; border-radius: 18px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); }
.result-card.hidden { display: none; }
.details-grid { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 0; }
.details-grid dt { color: var(--accent-2); font-weight: 700; }
.details-grid dd { margin: 0; }
.section-header { grid-template-columns: 1fr auto; align-items: center; margin-bottom: 16px; }

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--accent-2);
  flex: 0 0 auto;
}

.section-icon svg {
  width: 100%;
  height: 100%;
}
.candidate-list { display: flex; flex-wrap: wrap; gap: 10px; max-height: 300px; overflow: auto; }
.chip {
  padding: 10px 12px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
}
.win-flash {
  animation: pulse 0.6s ease 3;
}
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(255,183,3,0); }
  50% { transform: scale(1.015); box-shadow: 0 0 40px rgba(255,183,3,0.22); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(255,183,3,0); }
}

.footer-stats {
  margin-top: 32px;
}

.candidates-panel {
  margin-bottom: 20px;
}

@media (max-width: 920px) {
  .hero, .layout { grid-template-columns: 1fr; }
  .hero .subcopy { white-space: normal; }
}


.result-card-layout {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr;
  gap: 18px;
  align-items: start;
}
.result-card-layout > .result-artwork-col {
  align-self: center;
}
.result-artwork-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.result-artwork-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-artwork-wrap.hidden {
  display: none;
}
.result-artwork {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 16px;
}
.result-copy {
  min-width: 0;
}
.artwork-view-larger {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: var(--accent);
  opacity: 0.8;
  padding: 6px 0 4px;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.artwork-view-larger:hover {
  opacity: 1;
  text-decoration: underline;
}
.details-grid dd a {
  color: var(--accent);
}
@media (max-width: 720px) {
  .result-card-layout {
    grid-template-columns: 1fr;
  }
}


.site-credit {
  margin-top: 28px;
  padding: 8px 4px 0;
  text-align: center;
}

.site-credit p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.site-credit a {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
}

.site-credit a:hover {
  text-decoration: underline;
}


.rating-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.rating-section.hidden {
  display: none;
}
.rating-label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-bottom: 10px;
}
.rating-label {
  color: var(--accent-2);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.rating-note {
  color: var(--muted);
  font-size: 0.95rem;
}
.rating-stars {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.star-button {
  padding: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.35);
  font-size: 1.55rem;
  line-height: 1;
}
.star-button.is-active {
  color: var(--accent);
  border-color: rgba(255,183,3,0.4);
  background: rgba(255,183,3,0.12);
}
.top-rated-panel {
  margin-top: 20px;
  margin-bottom: 28px;
}

.candidates-panel {
  margin-top: 12px;
  margin-bottom: 20px;
}
.top-rated-list {
  display: grid;
  gap: 14px;
}
.top-rated-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}
.top-rated-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.top-rated-card__meta,
.top-rated-card__authors {
  margin: 0;
  color: var(--muted);
}
.top-rated-card__stars {
  margin: 8px 0 0;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.top-rated-card__actions a {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
}
.top-rated-card__actions a:hover {
  text-decoration: underline;
}
.empty-panel-text {
  margin: 0;
  color: var(--muted);
}
@media (max-width: 720px) {
  .top-rated-card {
    grid-template-columns: 1fr;
  }
}

.empty-panel-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.community-status {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.top-rated-card__score {
  margin: 8px 0 0;
  color: var(--muted);
}

.star-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}


.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.pagination-button {
  min-width: 110px;
}

.pagination-info {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}
