/* 60-Min Brainrot — styles specific to this tool.
   Shared tokens/buttons/panels/hero/tiles/verdict/footer live in base.css. */

/* ---------- filters ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 18px 0 0; padding: 0; justify-content: center; }

/* ---------- the big roll button ---------- */

.roll-wrap { text-align: center; margin: 22px 0 6px; }
.roll-btn { min-height: 62px; font-size: 1.25rem; padding: 0 34px; }
.roll-note { margin: 10px 0 0; font-weight: 700; opacity: 0.85; }

/* ---------- challenge card ---------- */

.challenge {
  max-width: 760px;
  margin: 26px auto 0;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 30px;
  box-shadow: 9px 9px 0 var(--ink);
  overflow: hidden;
}

.challenge-banner {
  position: relative;
  min-height: 190px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.5), transparent 26%),
    radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.35), transparent 30%),
    linear-gradient(135deg, var(--pink), var(--tang) 55%, var(--yolk));
  border-bottom: 3px solid var(--ink);
}
.challenge-banner .dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(31, 17, 71, 0.16) 2.5px, transparent 2.5px);
  background-size: 22px 22px;
  opacity: 0.6;
}
.challenge-icon {
  position: relative;
  z-index: 2;
  font-size: 5rem;
  filter: drop-shadow(0.05em 0.07em 0 var(--ink));
}
.challenge-icon.spin { animation: die-spin 0.6s ease-out both; }
@keyframes die-spin {
  from { transform: rotate(-40deg) scale(0.6); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.challenge-body { padding: 24px; }
@media (min-width: 640px) { .challenge-body { padding: 30px; } }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.badge {
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--paper);
}
.badge.cat { background: var(--sky); }
.badge.easy { background: var(--mint); }
.badge.medium { background: var(--yolk); }
.badge.chaos { background: var(--pink); }

.challenge-body h2 { font-size: clamp(1.7rem, 5.5vw, 2.5rem); line-height: 1.05; margin-bottom: 12px; }
.challenge-desc { font-weight: 700; line-height: 1.6; margin: 0 0 20px; }

.objectives { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.objective {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 15px;
  border: 3px solid var(--ink);
  border-radius: 16px 16px 16px 4px;
  font-weight: 600;
  line-height: 1.5;
  background: #efe7ff;
}
.objective:nth-child(1) { background: var(--yolk); }
.objective:nth-child(2) { background: #efe7ff; }
.objective:nth-child(3) { background: var(--mint); }
.objective:nth-child(4) { background: #ffd0e3; }
.objective .oi { flex: none; font-size: 1.2rem; line-height: 1.4; }
.objective b { font-weight: 800; }

.challenge-id { margin-top: 16px; font-size: 0.75rem; font-weight: 700; opacity: 0.55; }

/* ---------- loading state (shown while "generating") ---------- */

.loading-wrap { padding: 46px 24px; text-align: center; }
.loading-die {
  font-size: 4.2rem;
  display: inline-block;
  animation: tumble 0.55s linear infinite;
}
@keyframes tumble {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(95deg) scale(1.08); }
  50% { transform: rotate(180deg) scale(1); }
  75% { transform: rotate(275deg) scale(1.08); }
  100% { transform: rotate(360deg) scale(1); }
}
.loading-text { margin: 18px 0 0; font-weight: 800; font-size: 1.15rem; min-height: 1.6em; }
.loading-dots { display: inline-flex; gap: 6px; margin-top: 14px; }
.loading-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); animation: bounce 0.9s infinite ease-in-out; }
.loading-dots i:nth-child(2) { animation-delay: 0.15s; }
.loading-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }

/* ---------- timer panel ---------- */

.timer-panel {
  max-width: 760px;
  margin: 18px auto 0;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 26px;
  box-shadow: var(--pop);
  padding: 22px;
}
@media (min-width: 640px) { .timer-panel { padding: 26px; } }
.timer-main { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.timer-label { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; }
.timer-value {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 8vw, 3.6rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-top: 4px;
}
.timer-value.warn { color: var(--red); }
.timer-value.done { color: var(--pink); }
.timer-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.timer-bar { margin-top: 18px; height: 16px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.timer-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--tang)); transition: width 1s linear; }
.timer-msg { margin: 10px 0 0; font-weight: 700; opacity: 0.85; }

/* ---------- history ---------- */

.history-box {
  max-width: 760px;
  margin: 18px auto 0;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 26px;
  box-shadow: var(--pop);
  overflow: hidden;
}
.history-box > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  gap: 10px;
}
.history-box > summary::-webkit-details-marker { display: none; }
.history-box > summary .count { font-family: var(--font-body); font-weight: 800; font-size: 0.85rem; opacity: 0.75; }
.history-list { list-style: none; margin: 0; padding: 0 22px 22px; display: grid; gap: 10px; }
.history-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--mint);
}
.history-check {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--ink);
  font-weight: 800;
}
.history-title { font-weight: 800; line-height: 1.3; }
.history-date { font-size: 0.78rem; font-weight: 700; opacity: 0.7; }
.history-empty { padding: 6px 0 2px; font-weight: 700; opacity: 0.8; }
