:root {
  --bg: #0b0f1a;
  --bg-elevated: #101627;
  --surface: #131a2c;
  --surface-hover: #19233b;
  --surface-glass: rgba(19, 26, 44, 0.78);
  --surface-glass-strong: rgba(13, 19, 34, 0.92);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.28);

  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --cyan: #22d3ee;
  --purple: #a855f7;
  --emerald: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-card: 0 12px 30px rgba(2, 6, 23, 0.42);
  --shadow-glow: 0 0 24px rgba(34, 211, 238, 0.2);

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html.player-open,
body.player-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* Ambient Background */
.bg-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at top center, rgba(0, 0, 0, 0.85), transparent 78%);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.22;
}

.bg-orb-cyan {
  width: 460px;
  height: 460px;
  top: -160px;
  left: -100px;
  background: var(--cyan);
}

.bg-orb-purple {
  width: 520px;
  height: 520px;
  top: -120px;
  right: -140px;
  background: var(--purple);
}

.bg-orb-emerald {
  width: 420px;
  height: 420px;
  bottom: -180px;
  left: 38%;
  background: var(--emerald);
  opacity: 0.14;
}

/* Header */
.hub-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 15, 26, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.hub-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(168, 85, 247, 0.22));
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--text);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.18);
  flex-shrink: 0;
}

.brand-title {
  margin: 0;
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff 0%, #a5f3fc 52%, #d8b4fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-glass);
  border: 1px solid var(--border);
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat-label {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cyan);
}

.stat-divider {
  width: 1px;
  height: 16px;
  background: var(--border-strong);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.14s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-accent {
  background: linear-gradient(135deg, #0ea5e9, #a855f7);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

.btn-accent:hover {
  filter: brightness(1.09);
  box-shadow: 0 6px 22px rgba(34, 211, 238, 0.32);
}

.btn-ghost {
  background: rgba(19, 26, 44, 0.85);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.btn-ghost[aria-pressed="true"] {
  border-color: rgba(251, 113, 133, 0.55);
  color: var(--rose);
  background: rgba(251, 113, 133, 0.1);
}

.btn-danger {
  background: rgba(251, 113, 133, 0.16);
  border-color: rgba(251, 113, 133, 0.5);
  color: #fecdd3;
}

.btn-danger:hover {
  background: rgba(251, 113, 133, 0.28);
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 4px 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-link:hover {
  color: var(--rose);
}

.mute-icon-wrap {
  display: inline-flex;
  align-items: center;
}

/* Main Content */
.hub-main {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 24px 40px;
}

/* Controls Toolbar */
.controls-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(11, 15, 26, 0.55);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.08);
}

.pill-btn.active {
  color: #06121e;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  border-color: transparent;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
}

.pill-btn.active .pill-count {
  background: rgba(6, 18, 30, 0.18);
  color: #06121e;
}

.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: rgba(148, 163, 184, 0.14);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.search-sort-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1 1 280px;
  max-width: 480px;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(11, 15, 26, 0.75);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.search-input:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
  outline: none;
}

.search-input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(148, 163, 184, 0.18);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  display: grid;
  place-items: center;
}

.search-clear:hover {
  background: rgba(148, 163, 184, 0.32);
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.sort-select {
  height: 40px;
  padding: 0 32px 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: rgba(11, 15, 26, 0.85);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}

.sort-select:focus {
  border-color: rgba(34, 211, 238, 0.55);
  outline: none;
}

.results-meta {
  margin: 16px 2px 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Game Cards Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 20px;
}

.game-card {
  --card-accent: var(--cyan);
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--card-accent) 60%, transparent);
  box-shadow:
    0 18px 36px rgba(2, 6, 23, 0.55),
    0 0 24px color-mix(in srgb, var(--card-accent) 20%, transparent);
}

.card-thumb-btn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: none;
  background: #090d1a;
  overflow: hidden;
  text-align: left;
}

.card-thumb-btn svg {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.28s ease;
}

.game-card:hover .card-thumb-btn svg {
  transform: scale(1.04);
}

.card-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 15, 26, 0.72) 0%, transparent 45%);
  pointer-events: none;
}

.card-badges-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(11, 15, 26, 0.8);
  border: 1px solid color-mix(in srgb, var(--card-accent, var(--cyan)) 55%, transparent);
  color: var(--card-accent, var(--cyan));
  backdrop-filter: blur(6px);
}

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(11, 15, 26, 0.78);
  backdrop-filter: blur(6px);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.fav-btn:hover {
  transform: scale(1.08);
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.55);
}

.fav-btn.is-fav {
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(251, 191, 36, 0.14);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.25);
}

.card-body {
  padding: 15px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.card-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.card-plays {
  font-size: 0.74rem;
  color: var(--text-subtle);
  white-space: nowrap;
}

.card-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.card-highscore {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.card-highscore-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
}

.card-highscore-value {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--amber);
}

.card-highscore-value.empty {
  color: var(--text-subtle);
  font-weight: 600;
}

.btn-play {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--card-accent) 55%, transparent);
  background: color-mix(in srgb, var(--card-accent) 16%, rgba(11, 15, 26, 0.9));
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease;
}

.btn-play:hover {
  background: var(--card-accent);
  color: #06121e;
  box-shadow: 0 0 18px color-mix(in srgb, var(--card-accent) 45%, transparent);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  border: 1px dashed var(--border-strong);
}

.empty-state-icon {
  font-size: 2rem;
  color: var(--cyan);
  margin-bottom: 10px;
}

.empty-state h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Footer */
.hub-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.hub-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 24px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.hub-footer-inner p {
  margin: 0;
}

/* Confirm Modal */
.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(5, 8, 16, 0.76);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.confirm-backdrop[hidden] {
  display: none;
}

.confirm-card {
  width: 100%;
  max-width: 400px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
}

.confirm-card h2 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.confirm-card p {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Game Player Overlay */
.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #070b14;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

.player-overlay[hidden] {
  display: none;
}

.player-topbar {
  flex: 0 0 auto;
  min-height: 58px;
  padding: 8px 16px;
  background: var(--surface-glass-strong);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 5;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.btn-back {
  padding: 0 12px;
  height: 36px;
}

.player-game-info {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.player-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-scores {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(19, 26, 44, 0.9);
  border: 1px solid var(--border);
}

.score-pill-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.score-pill-value {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--cyan);
}

.score-pill-best .score-pill-value {
  color: var(--amber);
}

.record-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(52, 211, 153, 0.22));
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  animation: recordPop 0.45s ease, recordPulse 2.2s ease-in-out infinite;
}

.record-badge[hidden] {
  display: none;
}

@keyframes recordPop {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  70% {
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes recordPulse {
  0%, 100% {
    box-shadow: 0 0 0 rgba(251, 191, 36, 0);
  }
  50% {
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.35);
  }
}

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

.player-actions .btn {
  height: 36px;
  padding: 0 11px;
  font-size: 0.84rem;
}

/* Controls Popover */
.controls-popover {
  position: absolute;
  top: 66px;
  right: 16px;
  z-index: 20;
  width: min(370px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(15, 22, 39, 0.96);
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.65), 0 0 24px rgba(34, 211, 238, 0.14);
  backdrop-filter: blur(14px);
}

.controls-popover[hidden] {
  display: none;
}

.controls-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.controls-popover-header h3 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--cyan);
}

.popover-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.1);
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  display: grid;
  place-items: center;
}

.popover-close:hover {
  background: rgba(148, 163, 184, 0.24);
}

.controls-summary {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.controls-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.controls-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: rgba(11, 15, 26, 0.72);
  border: 1px solid var(--border);
  font-size: 0.84rem;
}

.key-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

kbd {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 2px 0 rgba(2, 6, 23, 0.8);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text);
}

.controls-action-text {
  color: var(--text-muted);
  text-align: right;
}

.controls-hint {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-subtle);
}

/* Player Stage & Iframe */
.player-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.08), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.08), transparent 45%),
    #070b14;
}

.iframe-shell {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1220px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: #0b0f1a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 28px rgba(34, 211, 238, 0.08);
  overflow: hidden;
}

.game-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  background: #0b0f1a;
}

.iframe-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #0b0f1a;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: opacity 0.2s ease;
}

.iframe-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(34, 211, 238, 0.2);
  border-top-color: var(--cyan);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 1020px) {
  .player-topbar {
    flex-wrap: wrap;
    padding: 8px 12px;
  }

  .player-scores {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .btn-text-desktop {
    display: none;
  }
}

@media (max-width: 680px) {
  .hub-header-inner {
    padding: 12px 16px;
  }

  .hub-main {
    padding: 16px 16px 32px;
  }

  .stats-badge {
    width: 100%;
    justify-content: space-between;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

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

  .btn-back span {
    display: none;
  }

  .player-stage {
    padding: 6px;
  }

  .iframe-shell {
    border-radius: 10px;
  }
}
