@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap");

:root {
  color-scheme: dark;
  --bg: #0b0f16;
  --bg-accent: #111827;
  --panel: rgba(18, 24, 36, 0.9);
  --panel-strong: rgba(24, 32, 48, 0.92);
  --border: #22304a;
  --text: #eef1f7;
  --muted: #95a2b8;
  --primary: #2dd4bf;
  --primary-strong: #14b8a6;
  --secondary: #60a5fa;
  --danger: #f87171;
  --glow: rgba(45, 212, 191, 0.18);
  --admin-sidebar-width: 270px;
  font-family: "Space Grotesk", "JetBrains Mono", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  background:
    radial-gradient(
      1200px 600px at 10% -10%,
      rgba(45, 212, 191, 0.12),
      transparent 60%
    ),
    radial-gradient(
      1000px 500px at 90% -20%,
      rgba(96, 165, 250, 0.14),
      transparent 55%
    ),
    linear-gradient(180deg, #0b0f16 0%, #0c1220 55%, #0b0f16 100%);
  color: inherit;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px
  );
  background-size: 22px 22px;
  opacity: 0.12;
  pointer-events: none;
  z-index: -1;
}

header {
  padding: 14px 20px;
  background: linear-gradient(
    120deg,
    rgba(18, 26, 40, 0.9),
    rgba(12, 18, 32, 0.9)
  );
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

header .row {
  width: min(1180px, 100%);
  margin: 0 auto;
}

header h1 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1;
}

header .muted {
  margin: 4px 0 0;
  font-size: 0.84rem;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 34px;
  display: grid;
  gap: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(34, 48, 74, 0.9);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 20px 45px rgba(4, 8, 16, 0.5);
  position: relative;
  overflow: hidden;
  animation: fadeUp 420ms ease;
}

.trophy-list-view,
#trophyGameDetailView,
#trophyItemDetailView {
  overflow: visible;
}

.card h2 {
  margin-top: 0;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px 120px at 20% 0%,
    rgba(45, 212, 191, 0.08),
    transparent 60%
  );
  opacity: 0.6;
  pointer-events: none;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

button,
input,
textarea,
select {
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(9, 13, 22, 0.9);
  color: inherit;
  padding: 10px 12px;
}

button {
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: white;
  font-weight: 600;
}

button.secondary {
  background: #1f2937;
}

button.danger {
  background: var(--danger);
}

pre {
  background: rgba(9, 13, 22, 0.95);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre;
  width: 100%;
  max-width: 80vw;
  box-sizing: border-box;
  max-height: 320px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

label {
  display: block;
  margin-bottom: 8px;
}

input,
textarea {
  width: 100%;
  box-sizing: border-box;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--border);
}

.status-pill.online {
  color: #22c55e;
}

.status-pill.offline {
  color: #f97316;
}

.link-button {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 600;
}

.inline-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #1f2937;
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--border);
}

.inline-link-button:hover {
  background: #273044;
}

.psn-token-row {
  align-items: stretch;
}

.cta-button {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 12px 24px rgba(45, 212, 191, 0.25);
}

.cta-button:hover {
  background: #2563eb;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat-item {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(34, 48, 74, 0.85);
  background: var(--panel-strong);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.05);
}

.stat-item strong {
  font-size: 1.15rem;
}

.exp-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid var(--border);
  margin: 8px 0 6px;
  overflow: hidden;
}

.exp-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 999px;
  transition: width 200ms ease;
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.leaderboard-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(34, 48, 74, 0.85);
  background: var(--panel-strong);
}

.leaderboard-item span {
  font-weight: 600;
}

.leaderboard-item.top-1 {
  border-color: #f5c542;
  box-shadow: 0 0 0 1px rgba(245, 197, 66, 0.25);
}

.leaderboard-item.top-2 {
  border-color: #c0c0c0;
  box-shadow: 0 0 0 1px rgba(192, 192, 192, 0.25);
}

.leaderboard-item.top-3 {
  border-color: #cd7f32;
  box-shadow: 0 0 0 1px rgba(205, 127, 50, 0.25);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.badge {
  background: rgba(31, 41, 55, 0.9);
  border: 1px solid var(--border);
  color: #cbd5f5;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.1;
}

.achievement-summary {
  display: grid;
  gap: 4px;
  text-align: right;
  min-width: 120px;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.achievement-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(34, 48, 74, 0.85);
  background:
    linear-gradient(180deg, rgba(16, 22, 34, 0.96), rgba(10, 15, 24, 0.94)),
    var(--panel-strong);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.04);
}

.achievement-card.locked {
  opacity: 0.72;
}

.achievement-card.funny {
  border-color: rgba(251, 146, 60, 0.38);
}

.achievement-card.unlocked {
  box-shadow:
    inset 0 0 0 1px rgba(45, 212, 191, 0.1),
    0 0 0 1px rgba(45, 212, 191, 0.12);
}

.achievement-hex {
  width: 72px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #f8fafc;
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.9), rgba(96, 165, 250, 0.92));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.1),
    0 12px 24px rgba(45, 212, 191, 0.16);
}

.achievement-card.funny .achievement-hex {
  background:
    linear-gradient(135deg, rgba(251, 146, 60, 0.9), rgba(244, 63, 94, 0.92));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.1),
    0 12px 24px rgba(244, 114, 182, 0.14);
}

.achievement-card.locked .achievement-hex {
  filter: grayscale(0.25);
}

.achievement-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.achievement-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.achievement-badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.achievement-type {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.9);
  border: 1px solid rgba(34, 48, 74, 0.85);
  color: #cbd5f5;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.achievement-tier {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(34, 48, 74, 0.85);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.achievement-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--muted);
}

.achievement-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(34, 48, 74, 0.85);
  background: rgba(9, 13, 22, 0.92);
}

.achievement-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 220ms ease;
}

.achievement-card.funny .achievement-progress-fill {
  background: linear-gradient(90deg, #fb923c, #f43f5e);
}

.achievement-card.tier-bronze {
  border-color: rgba(180, 111, 69, 0.42);
}

.achievement-card.tier-bronze .achievement-hex {
  background:
    linear-gradient(135deg, rgba(205, 127, 50, 0.92), rgba(154, 92, 52, 0.94));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(205, 127, 50, 0.16);
}

.achievement-card.tier-silver {
  border-color: rgba(148, 163, 184, 0.45);
}

.achievement-card.tier-silver .achievement-hex {
  background:
    linear-gradient(135deg, rgba(226, 232, 240, 0.9), rgba(148, 163, 184, 0.92));
  color: #0f172a;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.12),
    0 12px 24px rgba(148, 163, 184, 0.16);
}

.achievement-card.tier-gold {
  border-color: rgba(250, 204, 21, 0.42);
}

.achievement-card.tier-gold .achievement-hex {
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.94), rgba(245, 158, 11, 0.92));
  color: #1f2937;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.1),
    0 12px 24px rgba(245, 158, 11, 0.18);
}

.achievement-card.tier-platinum {
  border-color: rgba(129, 140, 248, 0.42);
}

.achievement-card.tier-platinum .achievement-hex {
  background:
    linear-gradient(135deg, rgba(147, 197, 253, 0.92), rgba(129, 140, 248, 0.94));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.1),
    0 12px 24px rgba(129, 140, 248, 0.18);
}

.achievement-tier.tier-bronze {
  background: rgba(205, 127, 50, 0.16);
  border-color: rgba(205, 127, 50, 0.35);
  color: #f5d0b5;
}

.achievement-tier.tier-silver {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

.achievement-tier.tier-gold {
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.35);
  color: #fde68a;
}

.achievement-tier.tier-platinum {
  background: rgba(129, 140, 248, 0.16);
  border-color: rgba(129, 140, 248, 0.35);
  color: #c7d2fe;
}

.achievement-card.hidden-locked {
  border-style: dashed;
  opacity: 0.62;
}

.achievement-card.hidden-locked .achievement-hex {
  background:
    linear-gradient(135deg, rgba(71, 85, 105, 0.92), rgba(30, 41, 59, 0.96));
  color: #cbd5e1;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.06),
    0 12px 24px rgba(15, 23, 42, 0.22);
  filter: grayscale(0.1);
}

.achievement-card.hidden-locked .achievement-progress-fill {
  background: linear-gradient(90deg, #475569, #334155);
}

.psn-block {
  display: grid;
  gap: 8px;
  align-items: start;
}

.psn-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.95rem;
}

.tournament-list {
  display: grid;
  gap: 16px;
}

.tournament-card {
  background: rgba(15, 21, 34, 0.85);
  border: 1px solid rgba(34, 48, 74, 0.85);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.tournament-card h3 {
  margin: 0;
}

.participant-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.participant-row span {
  font-size: 0.9rem;
}

.participant-row button {
  background: #2b3144;
}

.tab-row {
  display: flex;
  gap: 12px;
}

.dashboard-tab-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 6px;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1f2937;
  border: 1px solid #2b3144;
  color: #cbd5f5;
  font-weight: 600;
}

.tab-button.active {
  background: #3b82f6;
  color: #fff;
  border-color: transparent;
}

.dashboard-tab-row {
  gap: 10px;
  margin-bottom: -8px;
}

.dashboard-panel {
  display: grid;
  gap: 24px;
}

.dashboard-panel.hidden,
#tabPanelHome.hidden,
#tabPanelStats.hidden,
#tabPanelAchievements.hidden,
#tabPanelTrophies.hidden,
#tabPanelTrophyLeaderboard.hidden,
#tabPanelTrophyGames.hidden,
#tabPanelMarket.hidden {
  display: none !important;
}

#tabPanelHome,
#tabPanelTrophies,
#tabPanelTrophyLeaderboard,
#tabPanelTrophyGames {
  display: grid;
  gap: 16px;
  min-width: 0;
  justify-items: center;
  align-content: start;
}

#tabPanelHome > *,
#tabPanelTrophies > section,
#tabPanelTrophyLeaderboard > section,
#tabPanelTrophyGames > section {
  width: min(100%, 960px);
  margin-inline: auto;
  box-sizing: border-box;
}

.home-grid {
  width: min(100%, 960px);
  align-items: start;
}

.home-hero-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.home-hero-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.home-hero-head h2 {
  margin-bottom: 4px;
}

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

.home-section-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

#homeCacheStatus:empty,
#homePopularGamesStatus:empty,
#homeRecentPlayedStatus:empty,
#homeRecentPlatinumsStatus:empty,
#homeRecentTrophiesStatus:empty,
#trophyRecentStatus:empty,
#trophyGamesStatus:empty,
#trophyLeaderboardStatus:empty,
#gameCatalogStatus:empty {
  display: none;
}

.home-activity-list {
  gap: 8px;
}

.home-activity-item {
  padding: 0;
  overflow: hidden;
}

.home-activity-item,
.home-section-card {
  min-width: 0;
}

.home-activity-button,
.trophy-leaderboard-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  color: inherit;
  border: 0;
}

.home-activity-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 76px;
}

.home-activity-button:hover,
.home-activity-button:focus-visible,
.trophy-leaderboard-button:hover,
.trophy-leaderboard-button:focus-visible {
  background: rgba(96, 165, 250, 0.08);
}

.home-activity-left,
.trophy-leaderboard-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.home-activity-left {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
}

.home-activity-icon,
.trophy-leaderboard-avatar,
.home-user-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 14, 22, 0.96);
  border: 1px solid rgba(34, 48, 74, 0.88);
}

.home-activity-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
  box-sizing: border-box;
  background: rgba(10, 15, 24, 0.92);
  display: block;
}

.trophy-leaderboard-avatar img,
.home-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-activity-copy,
.trophy-leaderboard-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.home-activity-copy {
  align-content: center;
  min-height: 46px;
}

.home-activity-title,
.trophy-leaderboard-name {
  font-size: 0.92rem;
  line-height: 1.15;
}

.home-activity-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: calc(1.15em * 2);
  overflow: hidden;
}

.home-activity-meta,
.trophy-leaderboard-discord {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.home-activity-meta-user {
  color: #eaf3ff;
  font-weight: 800;
}

.home-activity-meta {
  display: block;
  min-height: 1.3em;
}

.home-activity-value,
.trophy-leaderboard-right {
  flex: 0 0 auto;
  text-align: right;
  color: #d8e3ef;
  font-size: 0.78rem;
  font-weight: 700;
}

.home-activity-value {
  min-width: 90px;
  align-self: center;
}

.home-activity-item.is-popular .home-activity-button {
  min-height: 88px;
}

.home-activity-item.is-popular .home-activity-left {
  grid-template-columns: 56px minmax(0, 1fr);
}

.home-activity-item.is-popular .home-activity-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.home-activity-item.is-popular .home-activity-title {
  min-height: 0;
  -webkit-line-clamp: 2;
}

.home-activity-fallback-icon {
  width: 20px;
  height: 20px;
}

.trophy-leaderboard-list {
  gap: 8px;
}

.trophy-leaderboard-item {
  padding: 0;
}

.trophy-leaderboard-copy {
  gap: 5px;
}

.trophy-leaderboard-name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.trophy-leaderboard-rank {
  color: #7dd3fc;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trophy-leaderboard-counts .trophy-count-inline {
  gap: 6px;
}

.trophy-leaderboard-counts .trophy-count-inline-item strong {
  font-size: 0.76rem;
}

.trophy-leaderboard-right {
  display: grid;
  gap: 4px;
  min-width: 72px;
}

.trophy-leaderboard-plats {
  color: #f8fafc;
  font-size: 0.9rem;
}

.trophy-leaderboard-points {
  color: #fbbf24;
  font-size: 0.76rem;
  font-weight: 700;
}

.trophy-overview-card {
  display: grid;
  gap: 12px;
}

#trophySyncButton.is-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#trophySyncButton.is-loading::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 2px solid rgba(125, 211, 252, 0.24);
  border-top-color: #7dd3fc;
  animation: trophy-sync-spin 0.9s linear infinite;
}

#trophySyncStatus.syncing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cde7ff;
}

#trophySyncStatus.syncing::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2dd4bf;
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.5);
  animation: trophy-sync-pulse 1.2s ease-out infinite;
}

.trophy-overview-toolbar,
.trophy-list-block-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.trophy-overview-toolbar h2,
.trophy-list-block-header h2 {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.trophy-panel-kicker,
.trophy-profile-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: #7dd3fc;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.trophy-panel-kicker-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 6px;
}

.trophy-log-summary-grid {
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trophy-profile-search-row {
  margin-top: 2px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.trophy-profile-hero {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(36, 57, 88, 0.94);
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.12), transparent 28%),
    radial-gradient(circle at 16% 24%, rgba(96, 165, 250, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(13, 21, 35, 0.98), rgba(8, 13, 22, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(96, 165, 250, 0.05),
    0 14px 28px rgba(1, 6, 15, 0.16);
  overflow: hidden;
}

.trophy-profile-hero::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #2dd4bf, #60a5fa, #a78bfa);
  opacity: 0.9;
}

.trophy-profile-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.trophy-profile-hero-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.trophy-profile-hero-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(45, 212, 191, 0.2), transparent 45%),
    rgba(12, 18, 30, 0.95);
  border: 1px solid rgba(40, 58, 89, 0.92);
  color: #f8fafc;
  font-size: 1.5rem;
  font-weight: 800;
}

.trophy-profile-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trophy-profile-hero-avatar img.trophy-profile-hero-logo {
  object-fit: contain;
  padding: 4px;
  box-sizing: border-box;
}

.trophy-profile-hero-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.trophy-profile-hero-copy h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.08;
}

.trophy-profile-hero-copy p {
  margin: 0;
  font-size: 0.84rem;
}

.trophy-log-summary-grid .stat-item {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(34, 48, 74, 0.86);
  background: rgba(12, 18, 29, 0.76);
  box-shadow: none;
}

.trophy-log-summary-grid .stat-item strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trophy-type-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.trophy-type-badge {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 7px;
  row-gap: 2px;
  min-width: 88px;
  padding: 6px 9px;
  border-radius: 10px;
  border: 1px solid rgba(34, 48, 74, 0.9);
  background: rgba(15, 23, 36, 0.92);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.trophy-type-badge-symbol {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trophy-type-badge-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.trophy-type-badge-count {
  font-size: 1rem;
  line-height: 1;
}

.trophy-type-badge-label {
  display: block;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trophy-type-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.trophy-type-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trophy-count-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.trophy-count-inline-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.trophy-count-inline-item strong {
  font-size: 0.84rem;
  line-height: 1;
}

.trophy-count-inline-icon {
  width: 14px;
  height: 14px;
}

.trophy-recent-fallback-icon {
  width: 22px;
  height: 22px;
}

.trophy-detail-fallback-icon {
  width: 20px;
  height: 20px;
}

.trophy-item-fallback-icon {
  width: 56px;
  height: 56px;
}

.trophy-type-badge.trophy-type-platinum,
.trophy-meta-pill.trophy-pill-platinum {
  background: rgba(125, 211, 252, 0.12);
  border-color: rgba(125, 211, 252, 0.3);
  color: #bae6fd;
}

.trophy-type-badge.trophy-type-gold,
.trophy-meta-pill.trophy-pill-gold {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.3);
  color: #fde68a;
}

.trophy-type-badge.trophy-type-silver,
.trophy-meta-pill.trophy-pill-silver {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.32);
  color: #e2e8f0;
}

.trophy-type-badge.trophy-type-bronze,
.trophy-meta-pill.trophy-pill-bronze {
  background: rgba(180, 111, 69, 0.16);
  border-color: rgba(180, 111, 69, 0.34);
  color: #f5d0b5;
}

.trophy-recent-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 6;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-inline-size: 100%;
  overflow: visible;
  overflow-y: visible;
  padding-top: 2px;
  box-sizing: border-box;
}

.trophy-recent-group {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  min-width: max-content;
  max-width: none;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(34, 48, 74, 0.82);
  background: rgba(12, 18, 29, 0.66);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.03);
  position: relative;
  z-index: 2;
}

.trophy-recent-group.is-multi {
  border-color: rgba(54, 78, 120, 0.95);
  background: rgba(15, 21, 34, 0.82);
}

.trophy-recent-card {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  transition: transform 120ms ease;
}

.trophy-recent-card:hover,
.trophy-recent-card:focus-visible {
  transform: translateY(-1px) scale(1.03);
  z-index: 32;
}

.trophy-recent-icon {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  font-size: 1.4rem;
}

.trophy-recent-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trophy-recent-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 8px);
  min-width: 240px;
  max-width: min(320px, 70vw);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(45, 59, 86, 0.92);
  background: rgba(10, 15, 24, 0.98);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 30;
}

.trophy-recent-card:hover .trophy-recent-popover,
.trophy-recent-card:focus-visible .trophy-recent-popover {
  opacity: 1;
  transform: translate(-50%, 0);
}

.trophy-recent-popover::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: rgba(10, 15, 24, 0.98);
  border-right: 1px solid rgba(45, 59, 86, 0.92);
  border-bottom: 1px solid rgba(45, 59, 86, 0.92);
  transform: rotate(45deg);
}

.trophy-recent-copy {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.trophy-recent-title {
  display: block;
  font-size: 0.92rem;
  line-height: 1.2;
}

.trophy-recent-meta {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.trophy-game-list {
  display: grid;
  gap: 6px;
}

.trophy-list-view {
  min-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
}

#trophyGamesFilterInput {
  width: min(100%, 360px);
  margin-top: 2px;
}

.trophy-games-load-more-row {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.trophy-game-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(34, 48, 74, 0.88);
  background: rgba(12, 18, 29, 0.82);
  box-shadow: none;
  text-align: left;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.trophy-game-card:hover,
.trophy-game-card:focus-visible {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(14, 21, 33, 0.92);
  transform: translateY(-1px);
}

.trophy-game-card-art {
  width: 66px;
  height: 66px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 14, 22, 0.96);
  border: 1px solid rgba(34, 48, 74, 0.9);
  font-size: 1.65rem;
}

.trophy-game-card-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
  background: rgba(10, 15, 24, 0.92);
  display: block;
  box-sizing: border-box;
}

.trophy-game-card-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.trophy-game-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  min-height: calc(1.16em * 2);
}

.trophy-game-card-title {
  font-size: 0.92rem;
  line-height: 1.16;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trophy-game-card-progress {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.14);
  border: 1px solid rgba(45, 212, 191, 0.34);
  color: #99f6e4;
  font-size: 0.76rem;
  font-weight: 700;
}

.trophy-game-card-progress.is-complete {
  background: rgba(74, 222, 128, 0.14);
  border-color: rgba(74, 222, 128, 0.3);
  color: #bbf7d0;
}

.trophy-game-card-meta-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(200px, 1fr) minmax(130px, 165px);
  gap: 6px 10px;
  align-items: center;
  min-width: 0;
}

.trophy-game-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  color: var(--muted);
  font-size: 0.7rem;
  min-width: 0;
}

.trophy-game-card-meta-left {
  justify-content: flex-start;
}

.trophy-game-card-meta-center {
  justify-content: flex-start;
}

.trophy-game-card-meta-right {
  justify-content: flex-end;
  text-align: right;
  white-space: nowrap;
}

.trophy-game-card-updated {
  white-space: nowrap;
}

.trophy-platform-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trophy-platform-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.66rem;
  border: 1px solid rgba(96, 165, 250, 0.3);
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
}

.trophy-platform-badge.platform-ps5 {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(96, 165, 250, 0.14);
  color: #bfdbfe;
}

.trophy-platform-badge.platform-ps4 {
  border-color: rgba(59, 130, 246, 0.36);
  background: rgba(37, 99, 235, 0.14);
  color: #c7d2fe;
}

.trophy-platform-badge.platform-ps3 {
  border-color: rgba(167, 139, 250, 0.36);
  background: rgba(109, 40, 217, 0.14);
  color: #ddd6fe;
}

.trophy-platform-badge.platform-vita {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(217, 119, 6, 0.14);
  color: #fde68a;
}

.trophy-platform-badge.platform-vr {
  border-color: rgba(45, 212, 191, 0.34);
  background: rgba(13, 148, 136, 0.14);
  color: #99f6e4;
}

.trophy-platform-badge.platform-default {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(71, 85, 105, 0.14);
  color: #e2e8f0;
}

.trophy-game-card-progress-row {
  display: grid;
  grid-template-columns: minmax(92px, 112px) auto minmax(132px, 1fr);
  gap: 7px;
  align-items: center;
  justify-content: flex-start;
}

.trophy-game-card-progress-row.is-counts-only {
  grid-template-columns: minmax(0, 1fr);
}

.trophy-game-card-progress-track {
  position: relative;
  height: 6px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(71, 85, 105, 0.35);
  border: 1px solid rgba(34, 48, 74, 0.82);
}

.trophy-game-card-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2dd4bf, #60a5fa);
}

.trophy-game-card-progress-value {
  color: #d8e3ef;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.trophy-game-card-counts {
  display: flex;
  justify-content: flex-end;
  justify-self: end;
  min-width: 132px;
  color: #d8e3ef;
  font-size: 0.72rem;
  font-weight: 600;
}

.trophy-game-hero {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 10px;
}

.trophy-game-hero-art {
  width: 140px;
  height: 140px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(45, 212, 191, 0.2), transparent 45%),
    rgba(12, 18, 30, 0.95);
  border: 1px solid rgba(34, 48, 74, 0.9);
  font-size: 2.6rem;
}

.trophy-game-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  background: rgba(10, 15, 24, 0.96);
  display: block;
  box-sizing: border-box;
}

.trophy-game-hero-copy {
  display: grid;
  gap: 10px;
}

.trophy-game-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.trophy-game-summary-item {
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 0;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(34, 48, 74, 0.88);
  background: rgba(14, 20, 32, 0.88);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.03);
}

.trophy-game-summary-item strong {
  font-size: 0.92rem;
  line-height: 1.2;
}

.trophy-game-summary-item .muted {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trophy-game-summary-item.accent {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.28);
  color: #ccfbf1;
}

.trophy-game-summary-item.is-wide {
  grid-column: span 2;
}

.trophy-group-sections-shell {
  margin-top: 18px;
}

.trophy-group-sections {
  display: grid;
  gap: 18px;
}

.trophy-group-section {
  display: grid;
  gap: 12px;
}

.trophy-group-section.is-collapsible {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(34, 48, 74, 0.88);
  background:
    linear-gradient(180deg, rgba(14, 20, 32, 0.88), rgba(9, 15, 24, 0.9)),
    var(--panel-strong);
}

.trophy-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.trophy-group-toggle {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.trophy-group-toggle .trophy-group-title {
  flex: 1 1 240px;
  min-width: 0;
}

.trophy-group-toggle .trophy-group-summary {
  flex: 0 1 auto;
}

.trophy-group-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  transition: transform 120ms ease, color 120ms ease;
}

.trophy-group-toggle[aria-expanded="false"] .trophy-group-chevron {
  transform: rotate(-90deg);
}

.trophy-group-toggle:hover .trophy-group-chevron,
.trophy-group-toggle:focus-visible .trophy-group-chevron {
  color: #dbeafe;
}

.trophy-group-title {
  display: grid;
  gap: 4px;
}

.trophy-group-title h3 {
  margin: 0;
  font-size: 1.02rem;
}

.trophy-group-summary {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trophy-group-list {
  display: grid;
  gap: 12px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.trophy-group-section.is-collapsible .trophy-group-list {
  padding-top: 2px;
}

.trophy-detail-item {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(34, 48, 74, 0.88);
  background:
    linear-gradient(180deg, rgba(16, 22, 34, 0.96), rgba(10, 15, 24, 0.94)),
    var(--panel-strong);
  text-align: left;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.trophy-detail-item:hover,
.trophy-detail-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.34);
}

.trophy-detail-item.is-achieved {
  background:
    linear-gradient(180deg, rgba(22, 43, 36, 0.96), rgba(10, 21, 18, 0.95)),
    var(--panel-strong);
  border-color: rgba(74, 222, 128, 0.24);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.06);
}

.trophy-detail-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 18, 30, 0.95);
  border: 1px solid rgba(34, 48, 74, 0.9);
  font-size: 1.5rem;
}

.trophy-detail-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trophy-detail-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.trophy-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.trophy-detail-title {
  font-size: 0.98rem;
  line-height: 1.2;
}

.trophy-detail-rate {
  flex-shrink: 0;
  color: #b6c3d7;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: right;
}

.trophy-log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trophy-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(34, 48, 74, 0.88);
  background: rgba(15, 23, 36, 0.9);
  color: #d7e1ee;
  font-size: 0.71rem;
  font-weight: 700;
}

.trophy-meta-pill.trophy-pill-hidden {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.trophy-meta-pill.trophy-pill-reward {
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.32);
  color: #99f6e4;
}

.trophy-meta-pill.trophy-pill-astro {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.32);
  color: #bfdbfe;
}

.trophy-detail-description {
  margin: 0;
  color: #d6deea;
  line-height: 1.45;
  font-size: 0.9rem;
}

.trophy-item-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 10px;
}

.trophy-item-hero-art {
  width: 112px;
  height: 112px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(96, 165, 250, 0.18), transparent 45%),
    rgba(12, 18, 30, 0.95);
  border: 1px solid rgba(34, 48, 74, 0.9);
  font-size: 2.2rem;
}

.trophy-item-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trophy-item-hero-copy {
  display: grid;
  gap: 10px;
}

.trophy-item-detail-meta {
  margin-top: 2px;
}

.trophy-item-detail-description {
  margin: 0;
  color: #dbe5f0;
  line-height: 1.55;
}

.trophy-achievers-columns {
  margin-top: 20px;
}

.trophy-achievers-column {
  display: grid;
  gap: 12px;
}

.trophy-achievers-list {
  display: grid;
  gap: 10px;
}

.trophy-achiever-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(34, 48, 74, 0.88);
  background: rgba(13, 20, 33, 0.9);
}

.trophy-achiever-button {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.trophy-achiever-button:hover,
.trophy-achiever-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(16, 24, 38, 0.96);
}

.trophy-achiever-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #dbeafe;
}

.trophy-achiever-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trophy-achiever-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.trophy-achiever-name {
  font-size: 0.94rem;
}

.trophy-achiever-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.trophy-achiever-date {
  color: #dbe5f0;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: right;
}

.market-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.market-filter-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.market-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.market-filter-toggle input {
  margin: 0;
}

.market-select-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  text-align: left;
}

.market-select-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.market-select-name {
  font-weight: 700;
}

.market-select-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.market-chart-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(34, 48, 74, 0.85);
  background:
    linear-gradient(180deg, rgba(16, 22, 34, 0.94), rgba(10, 15, 24, 0.94)),
    var(--panel-strong);
}

.market-chart-shell {
  position: relative;
  margin-top: 12px;
  min-height: 260px;
  border-radius: 14px;
  border: 1px solid rgba(34, 48, 74, 0.85);
  background:
    radial-gradient(
      400px 120px at 20% 0%,
      rgba(45, 212, 191, 0.08),
      transparent 60%
    ),
    rgba(10, 15, 24, 0.96);
  overflow: hidden;
}

.market-history-chart {
  display: block;
  width: 100%;
  height: 260px;
}

.market-chart-empty {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 18px;
}

.market-axis-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.82rem;
}

.market-history-events {
  max-height: min(50vh, 560px);
}

.market-positive {
  color: #7ff5e6;
}

.market-negative {
  color: #fca5a5;
}

.role-settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.psn-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.psn-help-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 0.8rem;
  text-decoration: none;
}

.psn-help-link:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fee2e2;
}

.psn-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: #0f1115;
  font-weight: 800;
  font-size: 0.75rem;
}

.psn-help-text {
  font-weight: 600;
}

.psn-help-list {
  margin: 0;
  padding-left: 18px;
}

.psn-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.psn-help-shot {
  background: #0b1220;
  border: 1px dashed #334155;
  border-radius: 14px;
  padding: 18px;
  color: #94a3b8;
  text-align: center;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-backdrop.hidden {
  display: none;
}

.modal {
  width: min(720px, 92vw);
  background: #0f172a;
  border: 1px solid #1f2a44;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: #cbd5f5;
  font-size: 1.1rem;
  cursor: pointer;
}

.modal-hint {
  margin: 0 0 12px;
}

.modal-textarea {
  width: 100%;
  min-height: 240px;
  background: #0b1220;
  color: #e2e8f0;
  border: 1px solid #1f2a44;
  border-radius: 12px;
  padding: 12px;
  font-family: "Roboto Mono", monospace;
  font-size: 0.9rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.emoji-role-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emoji-role-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.emoji-role-header {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.emoji-role-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.emoji-role-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.card + .card {
  margin-top: 16px;
}

.card + .grid-2 {
  margin-top: 16px;
}

.grid-2 + .card {
  margin-top: 16px;
}

.grid-2 .card + .card {
  margin-top: 0;
}

.grid-2 + .grid-2 {
  margin-top: 16px;
}

.admin-layout {
  display: block;
  min-height: 100vh;
}

.admin-sidebar {
  background: rgba(12, 16, 26, 0.96);
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  display: grid;
  gap: 20px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--admin-sidebar-width);
  overflow-y: auto;
  z-index: 10;
}

.admin-sidebar h1 {
  font-size: 1.1rem;
  margin: 0;
}

.admin-nav {
  display: grid;
  gap: 10px;
}

.admin-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #cbd5f5;
  background: rgba(15, 21, 34, 0.9);
  border: 1px solid transparent;
}

.admin-nav a.active {
  background: rgba(45, 212, 191, 0.15);
  border-color: rgba(45, 212, 191, 0.35);
  color: #fff;
}

.admin-content header {
  padding: 24px 32px;
  background: linear-gradient(
    120deg,
    rgba(18, 26, 40, 0.9),
    rgba(12, 18, 32, 0.9)
  );
  border-bottom: 1px solid var(--border);
}

.admin-content main {
  padding: 24px 32px 40px;
}

.admin-content {
  left: 0;
  position: relative;
  z-index: 1;
  padding-left: calc(var(--admin-sidebar-width) + 40px);
}

.floating-help {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  border: 1px solid rgba(45, 212, 191, 0.45);
  box-shadow: 0 14px 28px var(--glow);
  z-index: 1000;
}

.floating-help:hover {
  background: linear-gradient(135deg, var(--primary-strong), var(--secondary));
}

.role-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.role-row {
  display: grid;
  grid-template-columns:
    minmax(140px, 1fr) minmax(140px, 1fr) minmax(140px, 1fr)
    minmax(220px, 2fr) auto;
  gap: 10px;
  align-items: start;
  background: var(--panel-strong);
  border: 1px solid rgba(34, 48, 74, 0.85);
  border-radius: 12px;
  padding: 12px;
}

.role-row-header {
  background: transparent;
  border: none;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.role-row textarea {
  min-height: 70px;
}

.role-actions {
  display: grid;
  gap: 8px;
}

.group-editor-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(260px, 2fr) auto;
  gap: 10px;
  align-items: start;
  background: var(--panel-strong);
  border: 1px solid rgba(34, 48, 74, 0.85);
  border-radius: 12px;
  padding: 12px;
}

.group-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.button-small {
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
}

.giveaway-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.giveaway-actions button {
  width: auto;
  min-width: 0;
  justify-self: start;
}

.multiplier-editor {
  display: grid;
  gap: 8px;
}

.multiplier-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 160px) auto;
  gap: 8px;
  align-items: center;
}

.multiplier-row button {
  width: auto;
}

.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  max-height: min(65vh, 720px);
  overflow-y: auto;
  padding-right: 6px;
}

.event-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(34, 48, 74, 0.85);
  background: var(--panel-strong);
}

.event-item .event-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.event-tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.event-tag.earn {
  background: rgba(45, 212, 191, 0.15);
  border-color: rgba(45, 212, 191, 0.4);
  color: #7ff5e6;
}

.event-tag.transfer {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.45);
  color: #93c5fd;
}

.event-tag.duel {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fda4af;
}

.event-tag.admin {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.45);
  color: #fde68a;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.shop-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(34, 48, 74, 0.85);
  background:
    linear-gradient(180deg, rgba(16, 24, 36, 0.94), rgba(12, 18, 28, 0.94)),
    var(--panel-strong);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.04);
}

.shop-card h3 {
  margin: 0;
  font-size: 1rem;
}

.shop-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.shop-price {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.14);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: #98fff2;
  font-size: 0.82rem;
  font-weight: 700;
}

.shop-card input[type="file"] {
  padding: 10px;
}

.shop-card input[type="color"] {
  min-width: 56px;
  width: 56px;
  height: 44px;
  padding: 4px;
}

.shop-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.shop-status {
  min-height: 1.2rem;
}

.bet-list {
  display: grid;
  gap: 16px;
}

.bet-card h2 {
  margin-bottom: 6px;
}

.bet-side-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.bet-side-box {
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(34, 48, 74, 0.85);
  background: var(--panel-strong);
}

.bet-entry-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

.bet-entry-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.bet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.bet-status-open {
  color: #38bdf8;
}

.bet-status-locked {
  color: #fbbf24;
}

.bet-status-resolved {
  color: #22c55e;
}

.bet-status-cancelled {
  color: #f97316;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(34, 48, 74, 0.85);
}

.admin-table th {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes trophy-sync-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes trophy-sync-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.42);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(45, 212, 191, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
  }
}

@media (max-width: 900px) {
  .admin-sidebar {
    position: relative;
    width: auto;
    border-right: none;
    border-bottom: 1px solid #232838;
  }
  .admin-content {
    margin-left: 0;
  }

  .market-search-row {
    grid-template-columns: 1fr;
  }

  .trophy-overview-toolbar,
  .trophy-list-block-header,
  .trophy-profile-hero-top,
  .home-hero-head {
    flex-direction: column;
  }

  .trophy-type-badges {
    justify-content: flex-start;
  }

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

  #tabPanelHome > *,
  #tabPanelTrophies > section,
  #tabPanelTrophyLeaderboard > section,
  #tabPanelTrophyGames > section {
    width: 100%;
  }

  .trophy-profile-hero-copy h3 {
    font-size: 1.3rem;
  }

  .trophy-game-hero,
  .trophy-item-hero,
  .trophy-game-card,
  .trophy-detail-item,
  .trophy-recent-card {
    grid-template-columns: 1fr;
  }

  .trophy-game-hero-art,
  .trophy-game-card-art,
  .trophy-detail-icon,
  .trophy-item-hero-art {
    width: 100%;
    max-width: 140px;
  }

  .trophy-game-card-head,
  .trophy-detail-head {
    flex-direction: column;
  }

  .trophy-game-card-head {
    min-height: 0;
  }

  .trophy-game-card-meta-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .trophy-game-card-meta-right {
    justify-content: flex-start;
    text-align: left;
  }

  .home-activity-button,
  .trophy-leaderboard-button {
    align-items: flex-start;
  }

  .trophy-game-card-progress-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .trophy-game-summary-item.is-wide {
    grid-column: auto;
  }

  .trophy-game-card-counts {
    grid-column: 1 / -1;
    justify-self: start;
    min-width: 0;
  }

  .trophy-group-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .trophy-achiever-item {
    grid-template-columns: 1fr;
  }

  .trophy-detail-rate {
    text-align: left;
  }

  .trophy-recent-strip {
    gap: 8px;
    padding-bottom: 6px;
  }

  .trophy-recent-group {
    max-width: none;
  }

  .trophy-recent-popover {
    left: 0;
    right: auto;
    transform: translate(0, 8px);
    max-width: min(280px, 80vw);
  }

  .trophy-recent-card:hover .trophy-recent-popover,
  .trophy-recent-card:focus-visible .trophy-recent-popover {
    transform: translate(0, 0);
  }

  .trophy-recent-popover::after {
    left: 24px;
  }
}
