/* Home-page reviews block, inserted after "How it works" by reviews-runtime.js. */

.skr-panel {
  position: relative;
  width: 100%;
  max-width: 80rem;
  border: 1px solid #2a2a2e;
  border-radius: 12px;
  background: linear-gradient(180deg, #161619, #121214);
  padding: 20px;
}
.skr-panel::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  width: 16rem;
  height: 10rem;
  transform: translateX(-50%);
  border-radius: 9999px;
  background: rgba(34, 197, 94, .1);
  filter: blur(48px);
  pointer-events: none;
}

.skr-subtitle { font-weight: 500 }

.skr-summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  color: #8f8f93;
  font-size: 15px;
}
.skr-summary b { color: #fff; font-weight: 800 }
.skr-summary-score { display: inline-flex; align-items: center; gap: 6px; color: #d9fff0; font-weight: 800 }

.skr-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.skr-extra-wrap {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: height .36s cubic-bezier(.2,.7,.2,1), opacity .28s ease;
}
.skr-extra-wrap[hidden] { display: none }
.skr-extra-wrap.is-expanded { opacity: 1 }
.skr-extra-wrap > .skr-grid { padding-top: 12px }
.skr-extra-wrap .skr-card {
  opacity: 0;
  transform: translateY(12px);
  transition: border-color .25s ease, opacity .32s ease, transform .36s cubic-bezier(.2,.7,.2,1);
}
.skr-extra-wrap.is-expanded .skr-card { opacity: 1; transform: translateY(0) }
@media (max-width: 1024px) { .skr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 640px) { .skr-grid { grid-template-columns: minmax(0, 1fr) } .skr-panel { padding: 12px } }

.skr-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid #2a2a2e;
  border-radius: 10px;
  background: #131316;
  transition: border-color .25s ease;
}
.skr-card:hover { border-color: #3a3a3e }

.skr-card-head { display: flex; align-items: center; gap: 10px; min-width: 0 }

/* The author block links out to the review author's Steam profile. */
.skr-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.skr-author img,
.skr-author .skr-avatar-fallback {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 9999px;
  border: 1px solid #2f2f35;
  object-fit: cover;
  background: #1c1c21;
}
.skr-avatar-fallback {
  display: grid;
  place-items: center;
  color: #6d6d75;
  font-size: 13px;
  font-weight: 800;
}
.skr-author-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.skr-author:hover .skr-author-name { color: #4ade80 }
.skr-author-meta { display: block; color: #6d6d75; font-size: 11px; font-weight: 500 }

.skr-stars { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto }
.skr-stars span { display: block; transform-origin: center; will-change: transform }
.skr-stars svg { width: 19px; height: 19px; display: block }
.skr-star-on {
  color: #2ff096;
  filter: drop-shadow(0 0 5px rgba(34, 197, 94, .55)) drop-shadow(0 1px 1px rgba(0, 0, 0, .5));
}
.skr-star-off { color: #2e2e35 }

/*
 * The stars land one after another the first time a card is scrolled into view.
 * The revealed state is written as plain declarations and the entrance uses a
 * `backwards` fill, so nothing depends on an animation staying applied to keep
 * the stars visible — swapping animations on hover used to drop them back to
 * opacity 0. Only transform and opacity move, so the run stays on the
 * compositor and never forces layout on a phone.
 */
.skr-stars span {
  opacity: 0;
  transform: scale(.4);
  transition: transform .26s cubic-bezier(.2, 1.2, .4, 1);
}
.in .skr-stars span {
  opacity: 1;
  transform: none;
  animation: skr-star-pop .42s cubic-bezier(.2, 1.25, .4, 1) backwards;
  animation-delay: calc(var(--i, 0) * 65ms);
}
@keyframes skr-star-pop {
  0% { opacity: 0; transform: scale(.4) rotate(-22deg) }
  60% { opacity: 1; transform: scale(1.18) rotate(4deg) }
  100% { opacity: 1; transform: scale(1) rotate(0) }
}

/* A light ripple across the filled stars when the card is hovered. */
.skr-card.in:hover .skr-star-on {
  transform: scale(1.18) translateY(-2px);
  transition-delay: calc(var(--i, 0) * 45ms);
}

@media (prefers-reduced-motion: reduce) {
  .skr-stars span,
  .in .skr-stars span { animation: none; transition: none; opacity: 1; transform: none }
  .skr-card.in:hover .skr-star-on { transform: none }
}

.skr-body {
  margin: 0;
  color: #a9a9b0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.skr-date { color: #5f5f67; font-size: 11px }

.skr-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.skr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 9px;
  border: 1px solid #2a2a2e;
  background: #17171b;
  color: #d4d4d8;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.skr-btn:hover:not(:disabled) { border-color: #3a3a3e; background: #1d1d22; color: #fff }
.skr-btn:disabled { opacity: .5; cursor: default }
.skr-btn-primary {
  border-color: transparent;
  background: linear-gradient(112deg, #24e786, #38efa0);
  color: #06150d;
}
.skr-btn-primary:hover:not(:disabled) {
  background: linear-gradient(112deg, #2ff096, #55f3b0);
  color: #06150d;
}

.skr-state { padding: 26px 8px; text-align: center; color: #8f8f93; font-size: 13px }
.skr-state.error { color: #f87171 }

/* ---- "Leave a review" dialog ------------------------------------------------ */

.skr-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 6, 9, .72);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .26s ease;
}
.skr-modal[hidden] { display: none }
.skr-modal.is-visible { opacity: 1; pointer-events: auto }

.skr-dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border: 1px solid #2a2a2e;
  border-radius: 14px;
  background: linear-gradient(180deg, #161619, #101013);
  padding: 22px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8);
  opacity: 0;
  transform: translateY(16px) scale(.97);
  transition: opacity .26s ease, transform .26s cubic-bezier(.2,.7,.2,1);
}
.skr-modal.is-visible .skr-dialog { opacity: 1; transform: translateY(0) scale(1) }
@media (prefers-reduced-motion: reduce) {
  .skr-modal, .skr-dialog { transition: none }
}
.skr-dialog h3 { margin: 0; color: #fff; font-size: 17px; font-weight: 800 }
.skr-dialog-sub { margin: 6px 0 0; color: #8f8f93; font-size: 12px }

.skr-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #2a2a2e;
  border-radius: 8px;
  background: transparent;
  color: #8f8f93;
  cursor: pointer;
}
.skr-close:hover { color: #fff; border-color: #3a3a3e }

.skr-field { margin-top: 16px }
.skr-label { display: block; margin-bottom: 8px; color: #d4d4d8; font-size: 12px; font-weight: 800 }

/* Star picker: radios stay in the DOM for keyboard and screen-reader use. */
.skr-rating { display: inline-flex; align-items: center; gap: 4px }
.skr-rating input { position: absolute; opacity: 0; width: 0; height: 0 }
.skr-rating label {
  display: grid;
  place-items: center;
  padding: 2px;
  color: #34343a;
  cursor: pointer;
  transition: color .15s ease, transform .15s ease;
}
.skr-rating label svg { width: 26px; height: 26px; display: block }
.skr-rating label:hover { transform: scale(1.12) }
.skr-rating label.on {
  color: #2ff096;
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, .55));
  animation: skr-star-pick .32s cubic-bezier(.2, 1.3, .4, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes skr-star-pick {
  0% { transform: scale(.85) }
  55% { transform: scale(1.25) }
  100% { transform: scale(1) }
}
.skr-rating input:focus-visible + label { outline: 2px solid #22c55e; outline-offset: 2px; border-radius: 6px }

.skr-textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid #2a2a2e;
  border-radius: 9px;
  background: #111114;
  color: #e4e4e7;
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
}
.skr-textarea:focus { outline: none; border-color: rgba(34, 197, 94, .5) }
.skr-textarea::placeholder { color: #55555d }

.skr-counter { margin-top: 6px; text-align: right; color: #5f5f67; font-size: 11px }

.skr-error {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(248, 113, 113, .3);
  border-radius: 9px;
  background: rgba(248, 113, 113, .08);
  color: #fca5a5;
  font-size: 12px;
  line-height: 1.5;
}
.skr-error[hidden] { display: none }

.skr-success {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 197, 94, .3);
  border-radius: 9px;
  background: rgba(34, 197, 94, .08);
  color: #86efac;
  font-size: 12px;
}
.skr-success[hidden] { display: none }

.skr-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px }

@media (prefers-reduced-motion: reduce) {
  .skr-card, .skr-btn, .skr-rating label { transition: none }
  .skr-extra-wrap, .skr-extra-wrap .skr-card { transition: none }
}
