@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,600;1,600&display=swap');

body {
  background-color: white;
}

h1 {
  position: absolute;
  top: 4%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Nunito", sans-serif;
}
h2 {
  font-size: 40px;
  margin: 5px 5px;
  text-align: center;
}
h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #777;
  margin: 24px 0px 0px 0px;
  font-family: "Nunito", sans-serif;
}

.button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  --button-color: black;
  --button-bg: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--button-bg);
  color: var(--button-color);
  padding: 14px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  font-size: 1em;
  border: 2px solid var(--button-color);
  transition: 100ms ease;
  box-shadow: 5px 5px 0 0 var(--button-color);
}
.button:hover  { box-shadow: 2px 2px 0 0 var(--button-color); }
.button:active { transition: 50ms ease; box-shadow: 0 0 0 0 var(--button-color); }

.counter {
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 50px;
}

.informer {
  position: absolute;
  top: 12%;
  left: 4%;
  font-family: "Nunito", sans-serif;
  color: orange;
  opacity: 0;
}

.fade-in-trigger  { animation: fade-in  1s forwards; }
.fade-out-trigger { animation: fade-out 1s forwards; }

@keyframes fade-in  { to { top: 8%; opacity: 1; } }
@keyframes fade-out { from { top: 8%; opacity: 1; } to { top: 8%; opacity: 0; } }

.auto-save {
  font-family: "Nunito", sans-serif;
  position: absolute;
  top: 92%;
  font-size: 14px;
}

/* ── Modal backdrop ── */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  padding: auto;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

/* ── Modal box ── */
.modal-content {
  background-color: white;
  margin: auto;
  margin-top: 50px;
  padding: 28px 20px;
  border: 3px solid black;
  border-radius: 8px;
  width: 40%;
  font-family: "Nunito", sans-serif;
  color: black;
  box-shadow: 5px 5px 0 0 black;
  max-height: 80vh;
  overflow-y: auto;
}

/* ── Close button ── */
.close {
  color: black;
  float: right;
  font-size: 28px;
  font-weight: bold;
  background: white;
  padding: 5px 15px;
  border: 3px solid black;
  border-radius: 8px;
  box-shadow: 5px 5px 0 0 black;
  cursor: pointer;
  transition: 100ms ease;
}
.close:hover  { box-shadow: 2px 2px 0 0 black; }
.close:active { box-shadow: 0 0 0 0 black; }

/* ── Divider ── */
.modal-divider {
  border: none;
  height: 2px;
  background-color: black;
  margin: 12px -20px;
  width: calc(100% + 40px);
}

/* ── Reset row ── */
.reset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.reset-desc {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
  margin: 0;
}

.reset-btn {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  flex-shrink: 0;
  padding: 9px 18px;
  --button-color: #c0392b;
  --button-bg: #fff0f0;
}

/* ── Leaderboard ── */
.leaderboard-list {
  margin-top: 12px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
}

.leaderboard-rank {
  font-size: 20px;
  font-weight: 700;
  font-family: "Nunito", sans-serif;
}

.leaderboard-score {
  font-size: 24px;
  font-weight: 700;
  font-family: "Nunito", sans-serif;
  color: #333;
}

/* ── Tag badge ── */
/* Colors are set per-tag in the TAGS object in script.js via --tag-color and --tag-bg */
/* Everything else about how the tag looks is controlled here */
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  font-family: "Nunito", sans-serif;
  padding: 4px 8px;
  border-radius: 20px;
  margin-left: 8px;
  color: var(--tag-color);
  background: var(--tag-bg);
  border: 1.5px solid var(--tag-color);
  vertical-align: middle;
  position: relative;
  cursor: default;
}

/* ── Tag tooltip ── */
/* Shows above the badge on hover. Text comes from data-tooltip in script.js */
.tag::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: black;
  color: white;
  font-size: 11px;
  font-family: "Nunito", sans-serif;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.tag:hover::before {
  opacity: 1;
}
