:root {
  color-scheme: dark;
  --bg: #080d12;
  --bg-soft: #0d141d;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.09);
  --line: rgba(166, 231, 255, 0.16);
  --line-strong: rgba(117, 226, 255, 0.33);
  --text: #f4fbff;
  --muted: rgba(244, 251, 255, 0.67);
  --soft: rgba(244, 251, 255, 0.46);
  --accent: #28d9ef;
  --accent-2: #765cff;
  --accent-3: #72ffb6;
  --danger: #ff6978;
  --warning: #ffd36a;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1180px;
  --font: Inter, Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f8fb;
  --bg-soft: #edf3f7;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --line: rgba(19, 60, 78, 0.18);
  --line-strong: rgba(23, 153, 185, 0.38);
  --text: #0c1720;
  --muted: rgba(12, 23, 32, 0.68);
  --soft: rgba(12, 23, 32, 0.48);
  --shadow: 0 18px 55px rgba(29, 68, 88, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(130deg, rgba(40, 217, 239, 0.08), transparent 32%),
    linear-gradient(230deg, rgba(118, 92, 255, 0.11), transparent 36%),
    var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 20;
  padding: 10px 14px;
  transform: translateY(-140%);
  border-radius: 999px;
  background: var(--accent);
  color: #061018;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar,
.footer,
.app {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 0;
}

.topbar__actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: end;
  gap: 8px;
}

.topbar > *,
.hero,
.hero__copy,
.hero__panel,
.toolbar,
.filters,
.game-hero,
.game-hero__copy,
.content-grid,
.section {
  min-width: 0;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand__mark {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(40, 217, 239, 0.52);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(40, 217, 239, 0.2), rgba(118, 92, 255, 0.2)),
    #071017;
  color: #f4fbff;
  box-shadow: 0 0 24px rgba(40, 217, 239, 0.16);
  filter: drop-shadow(0 0 18px rgba(40, 217, 239, 0.28));
}

.brand__mark::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 3px solid transparent;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.brand__mark span {
  position: relative;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
}

.brand__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.12rem;
}

.topnav {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.topnav a,
.language-button,
.theme-button,
.pill,
.filter-button,
.back-link {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  font-weight: 800;
}

.topnav a {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topnav a:hover,
.topnav a.is-active {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(40, 217, 239, 0.11);
}

.language-button,
.theme-button {
  padding: 0 15px;
  background: linear-gradient(135deg, rgba(40, 217, 239, 0.16), rgba(118, 92, 255, 0.15));
  border-color: var(--line-strong);
}

.language-button {
  min-width: 52px;
}

.app {
  min-height: calc(100vh - 150px);
  padding: 16px 0 54px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: stretch;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, rgba(40, 217, 239, 0.1), rgba(118, 92, 255, 0.12));
  box-shadow: var(--shadow);
}

.hero__copy {
  display: grid;
  align-content: center;
  gap: 16px;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
  border-color: var(--line);
  font-size: 0.82rem;
}

.pill--accent {
  color: #061018;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  border-color: transparent;
}

.hero h1,
.game-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p,
.game-hero p,
.help-text {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  overflow-wrap: anywhere;
}

.hero__panel {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.17);
}

:root[data-theme="light"] .hero__panel {
  background: rgba(255, 255, 255, 0.5);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.stat strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 22px 0 16px;
}

.search {
  position: relative;
}

.search input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: var(--panel);
}

.search input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(40, 217, 239, 0.1);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-button {
  padding: 0 14px;
  background: var(--panel);
  border-color: var(--line);
  white-space: nowrap;
}

.filter-button.is-active {
  color: #061018;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  border-color: transparent;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.game-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--panel-strong);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.game-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #101820;
}

.game-card__media-link {
  display: block;
  min-width: 0;
}

.game-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.game-card:hover .game-card__media img,
.game-card:focus-visible .game-card__media img {
  transform: scale(1.035);
}

.game-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 45%, rgba(0, 0, 0, 0.56));
}

.game-card__body {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.game-card__title {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.game-card h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.05rem;
  line-height: 1.2;
}

.game-card__heading {
  min-width: 0;
}

.game-card__heading:focus-visible,
.platform-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.game-card p {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.platform-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.platform-link {
  display: inline-flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.88rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.platform-link:hover,
.platform-link.is-active {
  transform: translateY(-1px);
}

.platform-link--twitch {
  border-color: transparent;
  background: linear-gradient(135deg, #9146ff, #6f35d7);
  box-shadow: 0 10px 24px rgba(145, 70, 255, 0.18);
  color: #ffffff;
}

.platform-link--twitch:hover,
.platform-link--twitch.is-active {
  background: linear-gradient(135deg, #9146ff, #6f35d7);
  box-shadow: 0 10px 24px rgba(145, 70, 255, 0.25);
  color: #ffffff;
}

.platform-link--kick {
  border-color: transparent;
  background: linear-gradient(135deg, #53fc18, #17c964);
  box-shadow: 0 10px 24px rgba(83, 252, 24, 0.14);
  color: #061018;
}

.platform-link--kick:hover,
.platform-link--kick.is-active {
  background: linear-gradient(135deg, #53fc18, #17c964);
  box-shadow: 0 10px 24px rgba(83, 252, 24, 0.2);
  color: #061018;
}

.game-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.76rem;
  font-weight: 900;
}

.badge--pack,
.badge--type {
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
}

.badge--pack-kick {
  color: #03140a;
  border-color: transparent;
  background: linear-gradient(135deg, #72ffb6, #32d96b);
  box-shadow: 0 0 0 1px rgba(114, 255, 182, 0.18), 0 8px 22px rgba(50, 217, 107, 0.16);
}

.badge--pack-twitch {
  color: #f6f0ff;
  border-color: rgba(173, 128, 255, 0.48);
  background: linear-gradient(135deg, rgba(145, 70, 255, 0.52), rgba(92, 66, 214, 0.34));
}

.badge--type-skin {
  color: #061018;
  border-color: transparent;
  background: linear-gradient(135deg, #8aefff, #72a7ff);
  box-shadow: 0 0 0 1px rgba(138, 239, 255, 0.18), 0 8px 22px rgba(40, 217, 239, 0.12);
}

.badge--type-emote,
.badge--type-emoji,
.badge--type-mood {
  color: #1b0f00;
  border-color: transparent;
  background: linear-gradient(135deg, #ffd978, #ffad66);
}

.badge--type-spray {
  color: #081017;
  border-color: transparent;
  background: linear-gradient(135deg, #c6ff85, #5ce3c1);
}

.game-layout {
  display: grid;
  gap: 18px;
}

.back-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-color: var(--line);
  background: var(--panel);
}

.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: stretch;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.game-hero__copy {
  display: grid;
  align-content: center;
  gap: 14px;
}

.game-hero__cover {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #111923;
}

.game-hero__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-hero__copy .platform-links {
  width: min(100%, 330px);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.tab:hover,
.tab:focus-visible {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  outline: none;
}

.tab__count {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--text);
  background: var(--panel-strong);
  font-size: 0.76rem;
}

.tab > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab.is-active {
  color: #061018;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
}

.tab.is-active .tab__count {
  color: #061018;
  background: rgba(6, 16, 24, 0.12);
}

.tab.tab--guide,
.tab.tab--guide.is-active {
  color: #1f1600;
  background: linear-gradient(135deg, #ffd36a, #ff9f43);
  box-shadow: 0 10px 24px rgba(255, 159, 67, 0.16);
}

.tab.tab--guide:hover,
.tab.tab--guide:focus-visible {
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(255, 159, 67, 0.24);
}

.tab.tab--guide .tab__count {
  color: #1f1600;
  background: rgba(31, 22, 0, 0.14);
}

.content-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.28fr;
  gap: 18px;
  align-items: start;
}

.guide-strip {
  display: grid;
  gap: 12px;
}

.guide-details {
  display: grid;
  gap: 12px;
}

.guide-details summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.guide-details summary::-webkit-details-marker {
  display: none;
}

.guide-details summary::after {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  transform: rotate(45deg);
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transition: transform 0.18s ease;
}

.guide-details[open] summary::after {
  transform: translateY(3px) rotate(225deg);
}

.guide-details > .instruction-list,
.guide-details > .section {
  margin-top: 12px;
}

.section-title {
  margin: 0;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 950;
}

.guide-strip .instruction-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-strip .note-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.section__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
}

.section h2 {
  margin: 0;
  font-size: 1.35rem;
}

.section__head span {
  color: var(--soft);
  font-size: 0.86rem;
  font-weight: 800;
}

.instruction-list,
.note-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.instruction-list li,
.note-list li,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.instruction-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 13px;
}

.step-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #061018;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  font-weight: 950;
}

.instruction-list h3,
.reward-card h3 {
  margin: 0;
  font-size: 0.98rem;
}

.instruction-list p,
.reward-card p,
.note-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.note-list li {
  padding: 13px;
}

.instruction-list p a,
.note-list p a {
  color: var(--accent);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-color: rgba(40, 217, 239, 0.55);
  text-underline-offset: 3px;
}

.note-list li.note-list__link {
  padding: 0;
  overflow: hidden;
  border-color: rgba(40, 217, 239, 0.38);
  background:
    linear-gradient(135deg, rgba(40, 217, 239, 0.18), rgba(114, 255, 182, 0.11)),
    var(--panel);
}

.note-list__link a {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-weight: 900;
}

.note-list__link a::after {
  content: "↗";
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(40, 217, 239, 0.38);
  border-radius: 999px;
  color: #061018;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
}

.note-list__link small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.rewards-section {
  gap: 14px;
}

.reward-controls {
  position: sticky;
  top: 8px;
  z-index: 5;
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(8, 13, 18, 0.86);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

:root[data-theme="light"] .reward-controls {
  background: rgba(245, 248, 251, 0.88);
}

.reward-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 2fr);
  gap: 10px;
  align-items: start;
}

.reward-toolbar--tabs-only {
  grid-template-columns: 1fr;
}

.guide-panel {
  display: grid;
  gap: 14px;
}

.guide-panel .instruction-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-panel .note-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.reward-card {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  cursor: zoom-in;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.reward-card:hover,
.reward-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--panel-strong);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
  outline: none;
}

.reward-card__image {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(40, 217, 239, 0.16), rgba(118, 92, 255, 0.18));
}

.game-layout--sea-of-thieves .reward-card__image,
.reward-modal--sea-of-thieves .reward-modal__image {
  border-color: rgba(232, 177, 72, 0.34);
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 215, 123, 0.2), transparent 28%),
    radial-gradient(circle at 72% 78%, rgba(21, 151, 167, 0.34), transparent 34%),
    linear-gradient(145deg, rgba(6, 35, 45, 0.96), rgba(12, 78, 92, 0.9) 52%, rgba(92, 66, 30, 0.86));
  box-shadow: inset 0 0 0 1px rgba(255, 242, 186, 0.08);
}

.reward-card__image img {
  width: 100%;
  height: 100%;
  padding: 10px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.reward-card:hover .reward-card__image img,
.reward-card:focus-visible .reward-card__image img {
  transform: scale(1.04);
}

.reward-card__image.is-missing img {
  display: none;
}

.reward-card__image.is-missing::before {
  content: attr(data-fallback);
  color: var(--muted);
  font-weight: 950;
}

.reward-count {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-grid;
  min-width: 42px;
  min-height: 34px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid rgba(6, 16, 24, 0.18);
  border-radius: 999px;
  color: #061018;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  font-size: 0.92rem;
  font-weight: 950;
}

.reward-count--modal {
  top: 14px;
  right: 14px;
}

.reward-card__body {
  min-width: 0;
}

.reward-card__top {
  display: flex;
  min-width: 0;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.reward-card h3 {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.22;
}

.reward-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.tag-warning {
  color: #1f1600;
  border-color: transparent;
  background: var(--warning);
}

.empty-state {
  padding: 18px;
  color: var(--muted);
}

.loading-state {
  display: grid;
  min-height: 52vh;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
}

.loading-state .brand__mark {
  width: 72px;
  height: 72px;
}

body.modal-open {
  overflow: hidden;
}

.reward-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.reward-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 10, 0.74);
  backdrop-filter: blur(12px);
}

.reward-modal__panel {
  position: relative;
  display: grid;
  width: min(920px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: 18px;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    var(--bg-soft);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
}

:root[data-theme="light"] .reward-modal__panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(232, 246, 250, 0.78)),
    var(--bg-soft);
  box-shadow: 0 28px 90px rgba(29, 68, 88, 0.24);
}

.reward-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--panel-strong);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

.reward-modal__image {
  position: relative;
  display: grid;
  min-height: 360px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(40, 217, 239, 0.12), rgba(118, 92, 255, 0.14));
}

.reward-modal__image img {
  width: 100%;
  height: 100%;
  max-height: 640px;
  padding: 18px;
  object-fit: contain;
}

.reward-modal__body {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
  padding: 10px 8px 10px 0;
}

.reward-modal__body h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 3.2rem);
  line-height: 1.02;
}

.reward-modal__body p {
  margin: 0;
  color: var(--muted);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 24px 0 34px;
  color: var(--soft);
  font-size: 0.88rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hero,
  .game-hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero__panel {
    grid-row: auto;
  }

  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rewards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .guide-strip .instruction-list {
    grid-template-columns: 1fr;
  }

  .guide-strip .note-list,
  .guide-panel .note-list,
  .guide-panel .instruction-list {
    grid-template-columns: 1fr;
  }

  .reward-modal__panel {
    grid-template-columns: 1fr;
  }

  .reward-modal__image {
    min-height: 300px;
  }
}

@media (max-width: 680px) {
  .topbar,
  .footer,
  .app {
    width: min(100% - 20px, var(--max));
  }

  .topbar {
    gap: 10px;
    padding-top: 12px;
  }

  .topbar__actions {
    gap: 6px;
  }

  .brand__mark {
    width: 40px;
    height: 40px;
  }

  .brand__text {
    font-size: 1rem;
  }

  .topnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 18px;
  }

  .topnav a {
    min-width: 0;
    padding-inline: 10px;
  }

  .theme-button {
    min-width: 78px;
    padding: 0 10px;
  }

  .language-button {
    min-width: 48px;
    padding: 0 10px;
  }

  .hero,
  .game-hero {
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
  }

  .hero__copy {
    gap: 10px;
  }

  .hero h1,
  .game-hero h1 {
    font-size: clamp(2rem, 11vw, 3.05rem);
  }

  .hero p,
  .game-hero p,
  .help-text {
    font-size: 0.96rem;
  }

  .hero__panel {
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
  }

  .hero__panel .help-text {
    display: none;
  }

  .stat {
    padding: 11px;
  }

  .stat strong {
    font-size: 1.35rem;
  }

  .toolbar,
  .reward-toolbar {
    grid-template-columns: 1fr;
  }

  .reward-controls {
    position: static;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .tab {
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
  }

  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .filter-button {
    width: 100%;
    overflow: hidden;
    padding-inline: 10px;
    text-overflow: ellipsis;
  }

  .games-grid,
  .rewards-grid {
    grid-template-columns: 1fr;
  }

  .reward-modal {
    padding: 12px;
  }

  .reward-modal__panel {
    max-height: calc(100vh - 24px);
    padding: 12px;
    border-radius: 18px;
  }

  .reward-modal__image {
    min-height: 260px;
  }

  .reward-modal__body {
    padding: 0 2px 4px;
  }

  .game-card p {
    min-height: 0;
  }

  .section__head {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 410px) {
  .topbar,
  .footer,
  .app {
    width: min(100% - 14px, var(--max));
  }

  .hero,
  .game-hero {
    padding: 14px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reward-card {
    grid-template-columns: 1fr;
  }

  .reward-card__image {
    width: 100%;
    height: auto;
  }
}
