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

:root {
  --bg: #0e1114;
  --panel: #171c21;
  --line: #262e35;
  --text: #e8edf0;
  --muted: #93a0aa;
  --monster: #ff3d3d;
  --friend: #40c4ff;
}

html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rubik', system-ui, sans-serif;
  line-height: 1.45;
}

.top {
  padding: 28px 16px 0;
  text-align: center;
}

.back {
  position: absolute;
  left: 16px;
  top: 16px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.back:hover { color: var(--text); }

.title {
  font-family: 'Creepster', 'Rubik', cursive;
  font-weight: normal;
  font-size: clamp(48px, 9vw, 88px);
  letter-spacing: 3px;
  color: #ffd54f;
  text-shadow: 0 0 22px rgba(255, 213, 79, 0.35), 0 4px 0 #3a2a00;
}

.lead { color: var(--muted); max-width: 620px; margin: 6px auto 0; }

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin: 18px auto 0;
  font-size: 15px;
}
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.ring {
  display: inline-block;
  width: 26px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid;
  background: rgba(0, 0, 0, 0.5);
}
.ring.red { border-color: var(--monster); }
.ring.blue { border-color: var(--friend); }
.glow {
  display: inline-block;
  width: 26px;
  height: 5px;
  border-radius: 4px;
  background: #fff59d;
  box-shadow: 0 0 8px 3px rgba(255, 235, 59, 0.7);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 22px -16px 0;
  padding: 10px 16px;
  background: rgba(14, 17, 20, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--c, var(--line));
  background: color-mix(in srgb, var(--c, #555) 12%, transparent);
}
.nav a:hover { background: color-mix(in srgb, var(--c, #555) 30%, transparent); }

main { max-width: 1240px; margin: 0 auto; padding: 8px 16px 60px; }

section { margin-top: 36px; }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--c, var(--line));
  padding-bottom: 6px;
  margin-bottom: 16px;
}
.sec-head h2 {
  font-family: 'Creepster', 'Rubik', cursive;
  font-weight: normal;
  font-size: 38px;
  letter-spacing: 1.5px;
  color: var(--c, var(--text));
}
.sec-head p { color: var(--muted); font-size: 15px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--c, var(--line));
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card canvas {
  display: block;
  width: 100%;
  aspect-ratio: 300 / 200;
  background: #15191d;
}

.card .body { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

.card h3 { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.card h3 .ic { font-size: 22px; }

.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--c, var(--muted));
  border: 1px solid color-mix(in srgb, var(--c, #888) 55%, transparent);
  background: color-mix(in srgb, var(--c, #888) 12%, transparent);
}

.desc { font-size: 15px; }
.more { font-size: 13px; color: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: auto;
  padding-top: 6px;
}
.stat {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 12px;
  color: var(--muted);
}
.stat b { display: block; color: var(--text); font-size: 15px; }

/* small cards without a picture (items, powers, chests) */
.mini { flex-direction: row; align-items: flex-start; gap: 12px; padding: 14px; }
.mini .big { font-size: 38px; line-height: 1; }
.mini .body { padding: 0; }

.odds { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }

@media (max-width: 520px) {
  .back { position: static; display: inline-block; margin-bottom: 6px; }
  .grid { grid-template-columns: 1fr; }
}
