.results-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 13010;
  padding: 76px 16px 24px;
  pointer-events: auto;
}

.results-panel {
  position: relative;
  max-width: 460px;
  width: min(100%, 460px);
  padding: 26px 22px 20px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.14), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-panel) 100%);
  border: 1px solid rgba(20, 184, 166, 0.16);
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.32);
  animation: resultsPop 0.25s ease-out;
}

@keyframes resultsPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.results-header {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  margin-bottom: 10px;
}

.results-kicker {
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

#resultsTitle {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 2.3rem);
}

.results-meta {
  text-align: center;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--category-puzzle);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.result-box {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 16px 14px;
  text-align: center;
}

.result-label {
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.result-value {
  margin-top: 8px;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text-main);
}

.result-value--coins {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.result-coin-icon {
  width: 11px;
  height: 11px;
  object-fit: contain;
}

.results-home-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 50;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
}

.results-home-icon {
  width: 56px;
  height: 56px;
  padding: 8px;
  border-radius: 999px;
  background: white;
  border: 2px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}

.results-home-icon img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.results-home-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}

.results-home-icon:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.results-actions {
  margin-top: 18px;
  display: grid;
  justify-items: center;
}

#playAgainBtn {
  min-width: 170px;
  background: var(--category-puzzle);
  color: white;
  border: 2px solid #0f766e;
}

.coins-burst {
  position: absolute;
  top: 52px;
  right: 18px;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--yellow);
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  pointer-events: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.coins-burst.show {
  animation: coinsPop 0.9s ease-out forwards;
}

@keyframes coinsPop {
  0% { opacity: 0; transform: translateY(10px) scale(0.9); }
  20% { opacity: 1; transform: translateY(0) scale(1.15); }
  100% { opacity: 0; transform: translateY(-14px) scale(1); }
}

.ad-results {
  margin: 14px auto 0;
  padding: 6px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  width: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 560px) {
  .results-overlay {
    padding: 70px 12px 18px;
  }

  .results-panel {
    padding: 22px 16px 18px;
    border-radius: 22px;
  }

  .results-grid {
    gap: 10px;
  }

  .result-box {
    padding: 14px 10px;
    border-radius: 16px;
  }

  .result-value {
    font-size: 1.42rem;
  }

  .coins-burst {
    top: 46px;
    right: 14px;
    font-size: 1rem;
  }
}

@media (max-width: 360px) {
  .ad-results {
    width: 300px;
  }
}
