/* ══════════════════════════════════════════════
   Arcade Hub — Design System & Hub Styles
   ══════════════════════════════════════════════ */

:root {
  --bg-color: #050505;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-bg-hover: rgba(255, 255, 255, 0.06);
  --primary: #6366f1;
  --secondary: #a855f7;
  --accent: #ec4899;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.18);
  --radius-card: 20px;
  --radius-pill: 100px;
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Light Theme ── */

[data-theme="light"] {
  --bg-color: #f5f5f7;
  --card-bg: rgba(0, 0, 0, 0.03);
  --card-bg-hover: rgba(0, 0, 0, 0.05);
  --text-main: #1a1a2e;
  --text-muted: #64748b;
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-hover: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] body {
  background-color: var(--bg-color);
}

[data-theme="light"] header {
  background: rgba(245, 245, 247, 0.85);
}

[data-theme="light"] .blob-bg {
  filter: blur(100px);
  opacity: 0.5;
}

[data-theme="light"] .modal-panel {
  background: #ffffff;
}

[data-theme="light"] .game-card:hover {
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.05),
    0 0 24px -6px color-mix(in oklch, var(--accent) 15%, transparent);
}

[data-theme="light"] .gradient-text {
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .ach-toast {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .profile-lb-row {
  background: rgba(0, 0, 0, 0.02);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Outfit", system-ui, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Page Transitions ── */

body.page-enter {
  opacity: 0;
}

body.page-enter-active {
  opacity: 1;
  transition: opacity 0.25s ease-out;
}

.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
}

.transition-overlay.active {
  pointer-events: all;
  animation: overlay-expand 0.35s var(--ease-out-expo) forwards;
}

@keyframes overlay-expand {
  from {
    opacity: 1;
    clip-path: circle(0% at var(--cx) var(--cy));
  }
  to {
    opacity: 1;
    clip-path: circle(var(--max-r) at var(--cx) var(--cy));
  }
}

/* ── Background ── */

.blob-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    radial-gradient(
      ellipse at 20% 20%,
      rgba(99, 102, 241, 0.12) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 80%,
      rgba(236, 72, 153, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 60% 40%,
      rgba(168, 85, 247, 0.06) 0%,
      transparent 40%
    );
  filter: blur(80px);
}

/* ── Header ── */

header {
  padding: 1.25rem 5%;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--glass-border);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sound-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 1.1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sound-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--glass-border-hover);
}

.arcade-coins {
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(251, 191, 36, 0.15);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
}

/* ── Language Picker ── */

.lang-picker-wrap {
  position: relative;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(20, 20, 40, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
  opacity: 0;
  transform: translateY(-8px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.lang-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.lang-option {
  background: none;
  border: none;
  color: var(--text-muted, #a1a1aa);
  font-family: "Outfit", sans-serif;
  font-size: 0.875rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main, #f0f0f0);
}

.lang-option.active {
  color: var(--accent, #00f2ff);
  background: rgba(0, 242, 255, 0.08);
}

/* ── Main Layout ── */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 4rem) 5%;
}

/* ── Hero ── */

.hero {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 4rem);
}

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--secondary),
    var(--accent)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ── Platform Dashboard ── */

.challenge-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -0.35rem 0 1.35rem;
  padding: 0.95rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent, #fbbf24) 36%, transparent);
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 10%, color-mix(in srgb, var(--accent, #fbbf24) 20%, transparent), transparent 34%),
    rgba(255, 255, 255, 0.045);
}

.challenge-banner[hidden] {
  display: none;
}

.challenge-banner-body {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.challenge-banner-body strong {
  color: var(--text-main);
  font-size: 1rem;
}

.challenge-banner-body span {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.challenge-banner-play {
  flex: 0 0 auto;
  border: none;
  border-radius: 12px;
  padding: 0.72rem 1rem;
  background: var(--accent, #fbbf24);
  color: #04121a;
  cursor: pointer;
  font-weight: 800;
}

.platform-dashboard {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.35fr);
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.dash-snapshot,
.dash-row-block,
.dash-highlights,
.dash-activity,
.dash-missions,
.dash-friend-activity {
  border: 1px solid rgba(255, 196, 61, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 196, 61, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.dash-snapshot {
  padding: 1.15rem;
  min-width: 0;
}

.dash-kicker,
.dash-section-title {
  color: #fbbf24;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.dash-welcome {
  margin: 0.3rem 0 0.85rem;
  color: var(--text-main);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.08;
}

.dash-level-meter {
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
}

.dash-level-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fbbf24, #fb7185, #22d3ee);
}

.dash-snapshot-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.dash-snapshot-stat {
  min-width: 0;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-snapshot-value,
.dash-snapshot-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-snapshot-value {
  color: var(--text-main);
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
}

.dash-snapshot-label {
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.dash-game-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
}

.dash-row-block,
.dash-highlights,
.dash-activity,
.dash-missions,
.dash-friend-activity {
  min-width: 0;
  padding: 1rem;
}

.dash-section-title {
  margin-bottom: 0.75rem;
}

.dash-game-list {
  display: grid;
  gap: 0.55rem;
}

.dash-daily-mix {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
  width: 100%;
  min-height: 78px;
  margin-bottom: 0.65rem;
  padding: 0.72rem;
  border: 1px solid color-mix(in srgb, var(--accent, #fbbf24) 38%, rgba(255, 255, 255, 0.16));
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 20%, color-mix(in srgb, var(--accent, #fbbf24) 22%, transparent), transparent 36%),
    rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition:
    transform var(--duration-fast),
    border-color var(--duration-fast),
    background var(--duration-fast);
}

.dash-daily-mix:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent, #fbbf24) 58%, transparent);
  background: rgba(255, 255, 255, 0.095);
}

.dash-daily-mix-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--accent, #fbbf24);
  color: #101018;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent, #fbbf24) 28%, transparent);
}

.dash-daily-mix-body {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.dash-daily-mix-kicker,
.dash-daily-mix-title,
.dash-daily-mix-sub {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-daily-mix-kicker {
  color: var(--accent, #fbbf24);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-daily-mix-title {
  color: var(--text-main);
  font-weight: 900;
}

.dash-daily-mix-sub {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.dash-game {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 62px;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 3px solid var(--accent, #fbbf24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition:
    transform var(--duration-fast),
    border-color var(--duration-fast),
    background var(--duration-fast);
}

.dash-game:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent, #fbbf24) 52%, transparent);
  background: rgba(255, 255, 255, 0.075);
}

.dash-game-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.55), transparent 32%),
    color-mix(in srgb, var(--accent, #fbbf24) 30%, rgba(255, 255, 255, 0.08));
  color: #160f18;
  font-weight: 900;
}

.dash-game-body {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.dash-game-name,
.dash-game-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-game-name {
  color: var(--text-main);
  font-weight: 800;
}

.dash-game-sub {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.dash-play {
  color: #fbbf24;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dash-lower {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 1rem;
}

.dash-mission-list,
.dash-friend-list {
  display: grid;
  gap: 0.65rem;
}

.dash-mission {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 86px;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.dash-mission.complete {
  border-color: rgba(52, 211, 153, 0.32);
}

.dash-mission-body {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.dash-mission-title,
.dash-mission-sub,
.dash-mission-progress {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-mission-title {
  color: var(--text-main);
  font-weight: 800;
}

.dash-mission-sub,
.dash-mission-progress {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.dash-mission-progress {
  color: #fbbf24;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
}

.dash-mission-meter {
  height: 6px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
}

.dash-mission-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #22d3ee);
}

.dash-mission-claim {
  min-width: 76px;
  min-height: 34px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
}

.dash-mission-claim:disabled {
  cursor: default;
  opacity: 0.5;
}

.dash-friend-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  min-height: 54px;
}

.dash-friend-avatar {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.dash-highlight-strip {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.dash-highlight-strip::-webkit-scrollbar {
  display: none;
}

.dash-highlight-chip {
  min-width: 180px;
  max-width: 220px;
  padding: 0.75rem;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.11), rgba(251, 113, 133, 0.075));
}

.dash-highlight-title,
.dash-highlight-sub,
.dash-highlight-score {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-highlight-title {
  color: var(--text-main);
  font-weight: 800;
}

.dash-highlight-sub {
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.dash-highlight-score {
  margin-top: 0.45rem;
  color: #fbbf24;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
}

.dash-activity-list {
  display: grid;
  gap: 0.55rem;
}

.dash-activity-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
}

.dash-activity-dot {
  width: 8px;
  height: 8px;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.55);
}

.dash-activity-text {
  min-width: 0;
}

.dash-activity-title,
.dash-activity-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-activity-title {
  color: var(--text-main);
  font-weight: 700;
}

.dash-activity-sub {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.dash-empty {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* ── Stats Strip ── */

.stats-strip {
  display: flex;
  gap: 1px;
  background: var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.stat-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ── Filter Bar ── */

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  flex-wrap: wrap;
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--duration-fast),
    color var(--duration-fast),
    border-color var(--duration-fast);
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.filter-chip.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #818cf8;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.85rem;
  pointer-events: none;
}

.search-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.5rem 0.75rem 0.5rem 2.2rem;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.85rem;
  width: 200px;
  outline: none;
  transition:
    border-color var(--duration-fast),
    width var(--duration-normal);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: rgba(99, 102, 241, 0.4);
  width: 260px;
}

/* ── Card Sections ── */

.card-section {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.25rem;
  padding-left: 2px;
}

/* ── Horizontal Scroll Section ── */

.game-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 2px 10px;
  margin: -8px -2px 0;
}

.game-scroll::-webkit-scrollbar {
  display: none;
}

.game-scroll .game-card {
  width: clamp(216px, 22vw, 248px);
  min-width: clamp(216px, 22vw, 248px);
  flex-shrink: 0;
  padding: 1rem;
  border-radius: 16px;
}

.game-scroll .card-top-row {
  margin-bottom: 0.65rem;
}

.game-scroll .category-pill {
  font-size: 0.58rem;
  padding: 2px 8px;
  letter-spacing: 1px;
}

.game-scroll .card-actions {
  gap: 4px;
}

.game-scroll .info-toggle,
.game-scroll .fav-toggle {
  width: 24px;
  height: 24px;
}

.game-scroll .card-cover {
  aspect-ratio: 1.72;
  border-radius: 12px;
  margin: -0.05rem 0 0.7rem;
  box-shadow:
    0 10px 20px rgba(122, 74, 58, 0.13),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

.game-scroll .card-cover-canvas::before {
  inset: 9px;
  border-radius: 10px;
}

.game-scroll .card-cover .game-icon-canvas,
.game-scroll .game-card.art-feature .card-cover .game-icon-canvas {
  width: min(38%, 82px);
  border-radius: 16px;
}

.game-scroll .game-icon-canvas {
  width: 52px;
  height: 52px;
  margin-bottom: 0.55rem;
}

.game-scroll .game-card h3 {
  font-size: 1rem;
  margin-bottom: 0.28rem;
}

.game-scroll .card-tagline {
  font-size: 0.78rem;
  line-height: 1.35;
  margin-bottom: 0.7rem;
}

.game-scroll .stats-ribbon {
  gap: 0.5rem;
  padding-top: 0.55rem;
  flex-wrap: wrap;
}

.game-scroll .stats-ribbon .stat {
  font-size: 0.66rem;
}

/* ── Game Grid ── */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* ── Game Card ── */

.game-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--accent, var(--primary));
  border-radius: var(--radius-card);
  padding: 1.5rem;
  transition:
    transform var(--duration-normal) var(--ease-out-expo),
    background var(--duration-normal),
    border-color var(--duration-normal),
    box-shadow var(--duration-normal);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 0%,
    color-mix(in oklch, var(--accent) 8%, transparent) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--duration-normal);
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-6px);
  background: var(--card-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 24px -6px color-mix(in oklch, var(--accent) 20%, transparent);
}

.game-card:hover::before {
  opacity: 1;
}

.game-card.recently-played {
  border-left-color: var(--accent, #6366f1);
  box-shadow:
    0 0 20px -8px color-mix(in oklch, var(--accent) 30%, transparent);
}

.game-card.art-feature {
  --syn-card-ink: #2a2140;
  --syn-card-muted: #6b4e76;
  background:
    radial-gradient(circle at 18% 82%, rgba(86, 214, 232, 0.28), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(255, 143, 184, 0.3), transparent 30%),
    linear-gradient(145deg, #fff7d8 0%, #e4fbff 52%, #ffe1ee 100%);
  border-color: rgba(255, 151, 92, 0.24);
  border-left-color: #ffc43d;
  box-shadow:
    0 14px 38px rgba(255, 196, 61, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.42) inset;
}

.game-card.art-feature::before {
  opacity: 1;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.8) 0 8%, transparent 18%),
    radial-gradient(circle at 78% 72%, rgba(255, 196, 61, 0.28) 0 12%, transparent 26%);
}

.game-card.art-feature:hover {
  background:
    radial-gradient(circle at 18% 82%, rgba(86, 214, 232, 0.34), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(255, 143, 184, 0.36), transparent 32%),
    linear-gradient(145deg, #fff9df 0%, #dbfbff 52%, #ffdce9 100%);
  border-color: rgba(255, 151, 92, 0.4);
  box-shadow:
    0 18px 48px rgba(255, 143, 184, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.54) inset,
    0 0 28px -10px rgba(34, 199, 232, 0.8);
}

.game-card.art-feature .category-pill {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(255, 151, 92, 0.26);
  color: #6b4e76;
}

.game-card.art-feature .info-toggle,
.game-card.art-feature .fav-toggle {
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 151, 92, 0.22);
  color: #6b4e76;
}

.game-card.art-feature .game-icon-canvas {
  width: 112px;
  height: 112px;
  margin: -0.2rem auto 0.9rem;
  border-radius: 18px;
  box-shadow:
    0 14px 32px rgba(34, 199, 232, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

.game-card.art-feature h3 {
  color: var(--syn-card-ink);
  text-align: center;
}

.game-card.art-feature .card-tagline {
  color: var(--syn-card-muted);
  text-align: center;
}

.game-card.art-feature .stats-ribbon {
  justify-content: center;
  border-top-color: rgba(107, 78, 118, 0.14);
}

.game-card.art-feature .stats-ribbon .stat {
  color: rgba(42, 33, 64, 0.68);
}

.game-card.warm-cover-card {
  --warm-card-ink: #3a2441;
  --warm-card-muted: #7e5f75;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.72), transparent 26%),
    radial-gradient(circle at 82% 88%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%),
    linear-gradient(145deg, #fff4d8 0%, #fce1e8 44%, #d9f8ff 100%);
  border-color: rgba(255, 166, 92, 0.32);
  border-left-color: #ffc43d;
  box-shadow:
    0 18px 44px rgba(255, 166, 92, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.54) inset;
}

.game-card.warm-cover-card::before {
  opacity: 1;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.32), transparent 38%),
    radial-gradient(circle at 88% 12%, rgba(255, 210, 63, 0.32) 0 10%, transparent 24%);
}

.game-card.warm-cover-card:hover {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.82), transparent 28%),
    radial-gradient(circle at 82% 88%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 36%),
    linear-gradient(145deg, #fff7df 0%, #ffdfe9 44%, #d4fbff 100%);
  border-color: rgba(255, 166, 92, 0.48);
  box-shadow:
    0 22px 56px rgba(255, 143, 110, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.66) inset,
    0 0 30px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}

.game-card.warm-cover-card .category-pill {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(128, 86, 96, 0.16);
  color: #70506a;
  box-shadow: 0 4px 12px rgba(122, 74, 58, 0.08);
}

.game-card.warm-cover-card .info-toggle,
.game-card.warm-cover-card .fav-toggle {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(128, 86, 96, 0.16);
  color: #70506a;
  box-shadow: 0 4px 12px rgba(122, 74, 58, 0.08);
}

.game-card.warm-cover-card h3 {
  color: var(--warm-card-ink);
  text-align: left;
}

.game-card.warm-cover-card .card-tagline {
  color: var(--warm-card-muted);
  text-align: left;
}

.game-card.warm-cover-card .stats-ribbon {
  border-top-color: rgba(85, 57, 73, 0.13);
}

.game-card.warm-cover-card .stats-ribbon .stat {
  color: rgba(58, 36, 65, 0.7);
}

.card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1.48;
  border-radius: 16px;
  overflow: hidden;
  margin: -0.15rem 0 1rem;
  background: linear-gradient(135deg, #ffe9ba, #c9f6ff);
  box-shadow:
    0 16px 30px rgba(122, 74, 58, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.74) inset;
}

.card-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.card-cover-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.72), transparent 24%),
    radial-gradient(circle at 74% 72%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 34%),
    linear-gradient(135deg, #fff1c8 0%, #ffe3ef 46%, #c9f7ff 100%);
}

.card-cover-canvas::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.46), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08));
  box-shadow:
    0 8px 24px rgba(122, 74, 58, 0.09) inset,
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.card-cover .game-icon-canvas,
.game-card.art-feature .card-cover .game-icon-canvas {
  position: relative;
  z-index: 1;
  width: min(42%, 112px);
  height: auto;
  aspect-ratio: 1;
  margin: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 16px 32px rgba(122, 74, 58, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.72) inset;
}

.game-card.micro-cover-card .card-cover {
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.72), transparent 18%),
    radial-gradient(circle at 76% 72%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 34%),
    linear-gradient(135deg, #fff0c9 0%, #ffe4f0 48%, #d4fbff 100%);
}

.game-card.micro-cover-card .card-cover-canvas::before {
  background:
    radial-gradient(circle at 45% 45%, rgba(255,255,255,0.34), transparent 18%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 58%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.08));
}

.game-card.micro-cover-card .card-cover .game-icon-canvas {
  width: min(48%, 122px);
  filter: drop-shadow(0 14px 18px color-mix(in srgb, var(--accent) 28%, transparent));
}

.game-card.warm-cover-card:hover .card-cover img {
  transform: scale(1.07);
}

.game-card.warm-cover-card:hover .card-cover .game-icon-canvas {
  transform: scale(1.05);
}

.card-cover-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.45), transparent 36%),
    linear-gradient(to top, rgba(58, 36, 65, 0.18), transparent 42%);
  mix-blend-mode: screen;
}

.card-inner {
  position: relative;
  z-index: 1;
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.category-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--pill-color, var(--text-muted));
  background: color-mix(in oklch, var(--pill-color, #94a3b8) 10%, transparent);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in oklch, var(--pill-color, #94a3b8) 20%, transparent);
}

.fav-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: color var(--duration-fast), transform var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fav-toggle:hover {
  color: #fbbf24;
  transform: scale(1.15);
}

.fav-toggle.active {
  color: #fbbf24;
}

.game-icon-canvas {
  display: block;
  width: 64px;
  height: 64px;
  margin-bottom: 0.75rem;
  border-radius: 12px;
}

.game-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.card-tagline {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.stats-ribbon {
  display: flex;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--glass-border);
}

.stats-ribbon .stat {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

/* ── Header Icon Buttons ── */

.header-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast), transform var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--glass-border-hover);
  transform: scale(1.08);
}

/* ── Modal Overlay ── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-panel {
  background: #0a0a0a;
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-card);
  width: 90%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.modal-overlay.open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color var(--duration-fast), background var(--duration-fast);
}

.modal-close:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

/* ── Highlight Feed ── */

.highlight-feed-panel {
  width: min(94vw, 860px);
  max-width: 860px;
}

.highlight-feed-body {
  display: grid;
  gap: 1rem;
}

.highlight-feed-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.highlight-filter-reset,
.highlight-filter-pin,
.highlight-filter-select {
  min-height: 38px;
  border: 1px solid rgba(255, 196, 61, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.82rem;
}

.highlight-filter-reset,
.highlight-filter-pin {
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font-weight: 700;
  transition:
    background var(--duration-fast),
    border-color var(--duration-fast),
    transform var(--duration-fast);
}

.highlight-filter-reset:hover,
.highlight-filter-pin:hover,
.highlight-filter-pin.active {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(251, 191, 36, 0.12);
}

.highlight-filter-reset:hover,
.highlight-filter-pin:hover {
  transform: translateY(-1px);
}

.highlight-filter-select {
  min-width: 150px;
  padding: 0.5rem 0.75rem;
  outline: none;
}

.highlight-filter-select:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.14);
}

.highlight-filter-select option {
  background: #1a1420;
  color: #f8fafc;
}

.highlight-feed-list {
  display: grid;
  gap: 0.7rem;
}

.highlight-feed-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 191, 36, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.035);
}

.highlight-feed-row.pinned {
  border-color: rgba(251, 191, 36, 0.34);
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 191, 36, 0.18), transparent 36%),
    rgba(255, 255, 255, 0.045);
}

.highlight-feed-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(251, 113, 133, 0.16));
  color: #fbbf24;
}

.highlight-feed-row-body,
.profile-highlight-body {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.highlight-feed-row-title,
.highlight-feed-row-meta,
.highlight-feed-row-sub,
.profile-highlight-title,
.profile-highlight-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.highlight-feed-row-title,
.profile-highlight-title {
  color: var(--text-main);
  font-weight: 800;
}

.highlight-feed-row-meta,
.highlight-feed-row-sub,
.profile-highlight-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.highlight-feed-score {
  color: #fbbf24;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  white-space: nowrap;
}

.highlight-feed-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.highlight-feed-actions button,
.profile-highlight-share {
  min-height: 34px;
  padding: 0.42rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  transition:
    background var(--duration-fast),
    border-color var(--duration-fast);
}

.highlight-feed-actions button:hover,
.profile-highlight-share:hover {
  border-color: rgba(251, 191, 36, 0.36);
  background: rgba(251, 191, 36, 0.12);
}

.highlight-feed-actions .danger {
  color: #fca5a5;
}

.highlight-feed-actions .danger:hover {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.12);
}

.highlight-feed-empty {
  display: grid;
  gap: 0.35rem;
  padding: 2rem 1rem;
  border: 1px dashed rgba(251, 191, 36, 0.24);
  border-radius: 14px;
  color: var(--text-muted);
  text-align: center;
}

.highlight-feed-empty strong {
  color: var(--text-main);
}

/* ── Settings Rows ── */

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.setting-row-stack {
  align-items: flex-start;
}

.setting-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.setting-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.setting-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.setting-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 0.5rem 0;
}

.setting-toggle {
  width: 48px;
  height: 28px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  position: relative;
  transition: background var(--duration-fast);
  flex-shrink: 0;
}

.setting-toggle.active {
  background: rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.5);
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-main);
  transition: transform var(--duration-fast);
}

.setting-toggle.active .toggle-knob {
  transform: translateX(20px);
}

.setting-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast);
  flex-shrink: 0;
}

.setting-btn.danger {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.setting-btn.danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

.setting-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.setting-status {
  flex-basis: 100%;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-align: right;
}

.setting-select {
  background: var(--card-bg, rgba(255, 255, 255, 0.05));
  color: var(--text-main, #f0f0f0);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  min-width: 140px;
}
.setting-select:focus {
  border-color: var(--accent, #00f2ff);
  box-shadow: 0 0 0 2px rgba(0, 242, 255, 0.15);
}
.setting-select option {
  background: #1a1a2e;
  color: #f0f0f0;
}

.setting-about {
  padding-top: 0.75rem;
}

.setting-about h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.setting-about p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.setting-version {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}

/* ── Achievement Toast ── */

.ach-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 14px;
  padding: 14px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(251, 191, 36, 0.1);
  transform: translateY(20px);
  opacity: 0;
  transition: transform var(--duration-normal) var(--ease-out-expo), opacity var(--duration-normal);
}

.ach-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.ach-toast-icon {
  font-size: 1.8rem;
}

.ach-toast-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ach-toast-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fbbf24;
  font-weight: 700;
}

.ach-toast-name {
  font-size: 1rem;
  font-weight: 700;
}

/* ── Achievement Panel ── */

.achievements-panel {
  margin-bottom: 2rem;
}

.ach-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.ach-panel-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.ach-counter {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: #fbbf24;
  font-weight: 700;
}

.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.ach-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: background var(--duration-fast);
}

.ach-card.unlocked {
  border-color: rgba(251, 191, 36, 0.2);
  background: rgba(251, 191, 36, 0.04);
}

.ach-card.locked {
  opacity: 0.5;
}

.ach-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.ach-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ach-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.ach-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── Profile Panel ── */

.profile-header-btn {
  padding: 3px;
}

.profile-header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-identity {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 196, 61, 0.14);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 191, 36, 0.13), transparent 36%),
    rgba(255, 255, 255, 0.035);
}

.profile-avatar {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.profile-avatar-img {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
}

.profile-identity-body {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.profile-username {
  font-size: 1.18rem;
  overflow-wrap: anywhere;
}

.profile-friend-code {
  color: #fbbf24;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
}

.profile-edit-row {
  display: flex;
  gap: 0.5rem;
  min-width: 0;
}

.profile-edit-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-main);
  font: inherit;
  font-size: 0.82rem;
  padding: 0.48rem 0.62rem;
}

.profile-edit-row button,
.profile-action-btn {
  min-height: 34px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 9px;
  background: rgba(251, 191, 36, 0.09);
  color: var(--text-main);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.42rem 0.65rem;
  transition: background var(--duration-fast), border-color var(--duration-fast), transform var(--duration-fast);
}

.profile-edit-row button:hover,
.profile-action-btn:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.36);
  transform: translateY(-1px);
}

.profile-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.profile-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.profile-tab {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.45rem 0.65rem;
}

.profile-tab.active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(251, 191, 36, 0.12);
}

.profile-rank {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #fbbf24;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.profile-stat-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  font-weight: 700;
}

.profile-stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Profile Leaderboard ── */

.profile-lb-heading {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.profile-lb-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
}

.profile-lb-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-lb-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.profile-lb-rank {
  width: 2rem;
  text-align: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.profile-lb-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.85rem;
}

.profile-lb-score {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.profile-highlight-list {
  display: grid;
  gap: 0.45rem;
}

.profile-highlight-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.58rem 0.65rem;
  border: 1px solid rgba(255, 196, 61, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
}

.profile-highlight-mark {
  color: #fbbf24;
  text-align: center;
}

.profile-highlight-share {
  min-height: 30px;
  padding: 0.35rem 0.55rem;
  white-space: nowrap;
}

.profile-provider-grid,
.profile-avatar-grid,
.profile-interest-grid,
.profile-medal-grid,
.profile-wall-grid {
  display: grid;
  gap: 0.7rem;
}

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

.profile-provider-card,
.profile-medal-card,
.profile-wall-item,
.profile-friend-code-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-provider-card span,
.profile-medal-card p,
.profile-wall-item span,
.profile-medal-meta,
.profile-tab-hint {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.profile-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-bottom: 0.85rem;
  border: 1px dashed rgba(251, 191, 36, 0.35);
  border-radius: 10px;
  color: #fbbf24;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.55rem 0.8rem;
}

.profile-upload input {
  display: none;
}

.profile-avatar-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-avatar-choice {
  display: grid;
  gap: 0.38rem;
  justify-items: center;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-main);
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.45rem;
}

.profile-avatar-choice.active {
  border-color: rgba(251, 191, 36, 0.44);
  background: rgba(251, 191, 36, 0.12);
}

.profile-avatar-choice img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
}

.profile-avatar-choice span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-friend-code-card strong {
  color: #fbbf24;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
}

.profile-friend-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.profile-friend-row img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.profile-friend-body {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.profile-friend-body span {
  color: var(--text-muted);
  font-size: 0.72rem;
}

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

.profile-interest-chip {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-main);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-interest-chip.active {
  color: #111827;
  border-color: rgba(251, 191, 36, 0.62);
  background: linear-gradient(135deg, #fbbf24, #f472b6);
}

.profile-showcase {
  margin-top: 1rem;
}

.profile-showcase-row,
.profile-medal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.profile-showcase-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.1);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.32rem 0.58rem;
}

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

.profile-wall-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.profile-medal-icon {
  font-size: 1.8rem;
}

.profile-medal-card {
  align-content: start;
}

.profile-medal-card.rarity-epic,
.profile-showcase-chip.rarity-epic,
.profile-wall-item.rarity-epic {
  border-color: rgba(168, 85, 247, 0.36);
  background: rgba(168, 85, 247, 0.12);
}

.profile-medal-card.rarity-legendary,
.profile-showcase-chip.rarity-legendary,
.profile-wall-item.rarity-legendary {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(251, 191, 36, 0.14);
}

/* ── Footer ── */

footer {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--glass-border);
}

/* ══════════════════════════════════════════════
   Responsive Breakpoints
   ══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .platform-dashboard,
  .dash-lower {
    grid-template-columns: 1fr;
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 768px) {
  header {
    padding: 1rem 4%;
  }

  nav {
    align-items: flex-start;
    gap: 0.85rem;
    overflow: hidden;
  }

  .header-right {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .header-right::-webkit-scrollbar {
    display: none;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 6vw, 2.8rem);
  }

  .hero p {
    font-size: 0.95rem;
  }

  .stats-strip {
    flex-wrap: wrap;
  }

  .dash-game-rows {
    grid-template-columns: 1fr;
  }

  .dash-mission {
    grid-template-columns: 1fr;
  }

  .dash-mission-claim {
    width: 100%;
  }

  .setting-row,
  .setting-actions {
    align-items: stretch;
  }

  .setting-row-stack {
    flex-direction: column;
  }

  .highlight-feed-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .highlight-feed-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }

  .stat-item {
    flex: 1 1 45%;
    min-width: 0;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    overflow: hidden;
  }

  .filter-chips,
  .search-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .search-input {
    width: 100%;
    min-width: 0;
  }

  .search-input:focus {
    width: 100%;
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  main {
    padding: 1.5rem 4%;
  }

  .hero {
    margin-bottom: 1.5rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .stats-strip {
    border-radius: 10px;
  }

  .dash-snapshot-stats {
    grid-template-columns: 1fr;
  }

  .dash-game {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .dash-mission-title,
  .dash-mission-sub,
  .dash-mission-progress {
    white-space: normal;
  }

  .dash-game-mark {
    width: 38px;
    height: 38px;
  }

  .highlight-feed-panel {
    width: 94%;
    padding: 1.2rem;
  }

  .highlight-feed-filters {
    align-items: stretch;
  }

  .highlight-filter-reset,
  .highlight-filter-pin,
  .highlight-filter-select {
    width: 100%;
  }

  .highlight-feed-row {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
  }

  .highlight-feed-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .highlight-feed-score,
  .highlight-feed-actions {
    grid-column: 2;
  }

  .highlight-feed-actions button,
  .profile-highlight-share {
    min-height: 44px;
  }

  .profile-identity {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.65rem;
  }

  .profile-avatar-img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  .profile-edit-row {
    flex-direction: column;
  }

  .profile-provider-grid,
  .profile-medal-grid,
  .profile-wall-grid {
    grid-template-columns: 1fr;
  }

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

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

  .profile-friend-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .profile-friend-row .profile-action-btn {
    grid-column: 1 / -1;
  }

  .profile-highlight-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .profile-highlight-share {
    grid-column: 2;
    justify-self: start;
  }

  .dash-play {
    grid-column: 2;
  }

  .stat-item {
    padding: 0.75rem 0.5rem;
  }

  .stat-value {
    font-size: 0.95rem;
  }

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

  .game-scroll .game-card {
    width: 218px;
    min-width: 218px;
    padding: 0.9rem;
    border-radius: 15px;
  }

  .game-scroll .card-cover {
    aspect-ratio: 1.8;
    margin-bottom: 0.6rem;
  }

  .game-scroll .card-cover .game-icon-canvas,
  .game-scroll .game-card.art-feature .card-cover .game-icon-canvas {
    width: min(36%, 72px);
  }

  .game-card {
    padding: 1.25rem;
  }

  .game-icon-canvas {
    width: 48px;
    height: 48px;
  }

  .game-card.art-feature .game-icon-canvas {
    width: 88px;
    height: 88px;
  }

  .game-card h3 {
    font-size: 1.1rem;
  }

  .stats-ribbon {
    gap: 0.6rem;
    flex-wrap: wrap;
  }

  /* 44px minimum touch targets on mobile */
  .filter-chip {
    min-height: 44px;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .header-icon-btn,
  .sound-toggle {
    width: 44px;
    height: 44px;
  }

  .fav-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .welcome-dismiss {
    min-width: 44px;
    min-height: 44px;
  }

  .modal-close {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ── Welcome Banner ── */

.welcome-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  animation: banner-in 0.4s var(--ease-out-expo) both;
}

.welcome-banner.hiding {
  animation: banner-out 0.25s ease-in forwards;
}

@keyframes banner-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes banner-out {
  to { opacity: 0; transform: translateY(-10px); }
}

.welcome-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.welcome-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.welcome-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.welcome-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.welcome-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: color var(--duration-fast), background var(--duration-fast);
}

.welcome-dismiss:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

/* ── Empty Hint ── */

.empty-hint-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 1rem 1.5rem;
  background: var(--card-bg);
  border: 1px dashed var(--glass-border);
  border-radius: 12px;
  text-align: center;
}

/* ── Reduced Motion ── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
