:root {
  color-scheme: dark;
  --bg: #0a101c; --panel: #131d2b; --line: #28394e;
  --accent: #17c1ff; --text: #eef5ff; --muted: #a5b5cb;
  --glow: #17334a;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); font: 16px/1.5 "Roboto", Arial, sans-serif; }
.pro-clubs-home { position: relative; z-index: 1; width: min(100%, 1240px); margin: auto; padding: 26px clamp(14px, 3vw, 34px) 30px; }
.pro-clubs-home [hidden] { display: none !important; }
.hub-search-panel { position: relative; isolation: isolate; padding: clamp(16px, 3vw, 26px); border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(115deg, var(--panel), color-mix(in srgb, var(--accent) 14%, var(--panel))); }
#hub-search { position: relative; max-width: 720px; }
#hub-search label { display: block; margin-bottom: 7px; font-weight: 750; }
.hub-input-row { display: flex; gap: 8px; }
.hub-input-row input { flex: 1; min-width: 0; min-height: 46px; padding: 9px 12px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; font: inherit; }
.hub-primary { min-height: 46px; padding: 0 16px; color: #071623; background: var(--accent); border: 0; border-radius: 9px; font: inherit; font-weight: 750; white-space: nowrap; cursor: pointer; }
.hub-primary:disabled { opacity: .6; cursor: wait; }
#hub-search-status { margin: 6px 0 0; color: var(--muted); }
#hub-search-status:empty { display: none; }
#hub-search-results { list-style: none; padding: 5px; margin: 8px 0 0; max-width: 720px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
#hub-search-results a { display: flex; justify-content: space-between; gap: 9px; padding: 8px; border-radius: 5px; color: var(--text); text-decoration: none; }
#hub-search-results a:hover { background: var(--glow); }
#hub-search-results a small { color: var(--muted); white-space: nowrap; }
.hub-main-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 16px; }
.hub-main-grid:has(.hub-games:not([hidden])) { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.hub-club { display: flex; align-items: center; gap: 10px; }
.hub-club img { width: 42px; height: 42px; object-fit: contain; }
.hub-club h3 { margin: 0; font-size: 23px; line-height: 1.1; overflow-wrap: anywhere; }
.hub-club p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.hub-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin: 12px 0; }
.hub-stats > div { padding: 7px; border-radius: 7px; background: var(--bg); }
.hub-stats dt { color: var(--muted); font-size: 11px; }
.hub-stats dd { margin: 1px 0 0; font-size: 17px; font-weight: 750; }
.hub-games-note a { color: var(--accent); text-decoration: none; }
.hub-game { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 10px; margin-bottom: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--text); background: var(--bg); }
.hub-game span { font-size: 12px; }
.hub-game span[data-available="true"] { color: var(--green, #65d99b); }
.hub-game span[data-available="false"] { color: var(--red, #ff7885); }
@media (max-width: 700px) {
  .hub-main-grid:has(.hub-games:not([hidden])) { grid-template-columns: minmax(0,1fr); }
}

.hub-panel { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.hub-panel h2, .hub-panel h3 { margin: 0 0 10px; font-size: 15px; }
.hub-club h3 { font-size: 23px; margin: 0; }
.hub-theme-logo, .hub-spotlight-watermark {
  position: absolute;
  z-index: -1;
  width: min(45%, 460px);
  height: 220%;
  right: -2%;
  top: 50%;
  object-fit: contain;
  opacity: .13;
  transform: translateY(-50%) perspective(680px) rotateY(-18deg) rotate(-18deg);
  pointer-events: none;
}
.hub-spotlight { position: relative; isolation: isolate; overflow: clip; }
.hub-spotlight-watermark { width: min(57%, 500px); right: 2%; height: 220%; }

#hub-search-results { border-color: var(--suggestion-accent, var(--accent)); box-shadow: 0 8px 22px #0005; }
#hub-search-results a { border-inline-start: 2px solid var(--suggestion-accent, var(--accent)); }
#hub-search-results a:is(:hover,:focus-visible), #hub-search-results a.is-highlighted { background: color-mix(in srgb, var(--accent) 17%, var(--panel)); }

#hub-recent { display: flex; margin-top: 12px; gap: 6px; flex-wrap: wrap; }
#hub-recent a { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text); text-decoration: none; }
.hub-winners { margin-top: 18px; }
.hub-winners-grid { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; }
.hub-weekly-label {
  place-self: center;
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .12em;
  line-height: 1.2;
}
.hub-winners-grid > .hub-winner-tile { border-top: 2px solid color-mix(in srgb, var(--accent) 65%, var(--line)); }
.hub-winner-prize { display: block; margin-bottom: 4px; font-size: clamp(17px, 2vw, 24px); overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .hub-winners-grid { grid-template-columns: minmax(0,1fr); }
  .hub-weekly-label { writing-mode: horizontal-tb; }
}

:root.halloween-theme { --bg:#0b0710; --panel:#17111d; --line:#392945; --muted:#b3a4bb; --text:#f4edf8; --accent:#ff8a24; --glow:#ff8a2425; --suggestion-accent:#ff8a24; }
:root.christmas-theme { --bg:#09120e; --panel:#101a15; --line:#294033; --muted:#a8b6ac; --text:#edf4ee; --accent: #df5962; --glow: #df596229; --suggestion-accent: #df5962; }
:root.newyear-theme { --bg:#090d19; --panel:#12182a; --line:#343c5b; --muted:#b1b8ce; --text:#f4f5ff; --accent:#f5c451; --glow:#f5c45125; --suggestion-accent:#f5c451; }
:root.easter-theme { --bg:#0b100e; --panel:#141b17; --line:#34483b; --muted:#b5c4b8; --text:#f1f5ef; --accent: #eea9c5; --glow: #eea9c52c; --suggestion-accent: #c1afe5; }

.hub-theme-logo { width: min(57%, 590px); height: 280%; opacity: .075; }
.hub-games-note { margin: 11px 0 0; color: var(--muted); font-size: 14px; }
.hub-games-note a { text-decoration: underline; text-underline-offset: 2px; }

.hub-button, .hub-primary, #hub-recent a, .hub-game {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.hub-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: var(--panel);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}
.hub-primary { border: 1px solid var(--accent); color: var(--bg); }
.pro-clubs-home :is(.hub-button, .hub-primary:enabled, #hub-recent a, .hub-game):is(:hover,:focus-visible) {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--glow, color-mix(in srgb, var(--accent) 12%, var(--panel)));
  color: var(--accent);
  filter: none;
}
.pro-clubs-home :is(.hub-button,.hub-primary,#hub-recent a,.hub-game):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.hub-search-sheen {
  position: absolute;
  inset: 0 0 0 auto;
  width: 54%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, color-mix(in srgb,var(--accent) 19%,transparent) 50%, transparent 80%) 0 0 / 200% 100%;
  mask-image: linear-gradient(90deg,transparent,#000 35%);
  animation: phonics-search-sheen 11s ease-in-out infinite alternate;
}
@keyframes phonics-search-sheen { to { background-position: 100% 0; } }
:root.pp-background-animation-paused .hub-search-sheen { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .hub-search-sheen { animation: none; }
  .hub-button,.hub-primary,#hub-recent a,.hub-game { transition: none; }
}
.hub-winners .hub-winner-tile {
  --winner-avatar-size: clamp(64px, 8vw, 112px);
  --winner-pack-preview-size: clamp(36px, 5vw, 67px);
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: calc(var(--winner-avatar-size) + 26px);
  gap: 2px 16px;
  padding: 12px;
  background: linear-gradient(110deg, var(--panel) 45%, color-mix(in srgb,var(--accent) 14%,var(--panel)));
}
.hub-winner-tile:has(.hub-winner-frame:not([hidden])) { grid-template-columns: minmax(0,1fr) var(--winner-avatar-size); }
.hub-winners .hub-winner-scratch {
  background: linear-gradient(250deg, var(--panel) 45%, color-mix(in srgb,var(--accent) 14%,var(--panel)));
}
.hub-winner-scratch:has(.hub-winner-frame:not([hidden])) { grid-template-columns: var(--winner-avatar-size) minmax(0,1fr); }
.hub-winner-frame {
  position: relative;
  grid-area: 1 / 2 / 3;
  align-self: center;
  width: var(--winner-avatar-size);
  height: var(--winner-avatar-size);
  --winner-avatar-inset: 0px;
}
.hub-winner-avatar {
  position: absolute;
  top: var(--winner-avatar-inset);
  left: var(--winner-avatar-inset);
  width: calc(100% - 2 * var(--winner-avatar-inset));
  height: calc(100% - 2 * var(--winner-avatar-inset));
  object-fit: cover;
  border: 1px solid color-mix(in srgb,var(--accent) 55%,var(--line));
  border-radius: 9px;
}
.hub-winner-frame.has-gold-frame {
  --winner-avatar-inset: 4px;
  border-radius: 50%;
}
.hub-winner-frame.has-gold-frame .hub-winner-avatar { border-radius: 50%; border-color: #513615; }
.hub-winner-frame .hub-winner-frame-award:not([hidden]) {
  left: 88%;
  top: 85%;
  width: clamp(22px, 3vw, 28px);
  height: clamp(22px, 3vw, 28px);
  padding: 4px;
}
.hub-winner-scratch .hub-winner-frame { grid-column: 1; }
.hub-winner-tile h3 { margin: 2px 0 5px; }
.hub-winner-tile > [aria-live] { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 380px) { .hub-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } }


.hub-search-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.hub-search-panel:has(#hub-search-results:not([hidden])) { z-index: 3; }
#hub-search-status, #hub-search-results {
  position: absolute;
  top: calc(100% + 5px);
  inset-inline: 0;
  z-index: 3;
  margin: 0;
}
#hub-search-results { max-height: min(320px, 48vh); overflow: auto; }
#hub-search-status { padding: 6px 9px; border-radius: 7px; background: var(--panel); }
.hub-spotlight-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.hub-spotlight-header .hub-button { flex-shrink: 0; }
.hub-spotlight .hub-stats { margin-bottom: 0; }
.hub-winner-scratch { text-align: right; }
.hub-winners-grid > .hub-winner-tile:has(> .hub-pack-preview):has(> .hub-winner-frame:not([hidden])) {
  grid-template-columns: minmax(0,1fr) var(--winner-pack-preview-size) var(--winner-avatar-size);
}
.hub-winner-tile:has(.hub-pack-preview) .hub-winner-frame { grid-column: 3; }
.hub-winner-tile:has(.hub-pack-preview) > h3 { grid-area: 1 / 1; }
.hub-winner-tile:has(.hub-pack-preview) > [aria-live] { grid-area: 2 / 1; }
.hub-winner-scratch:has(.hub-scratch-preview:not([hidden])) {
  grid-template-columns: var(--winner-avatar-size) auto minmax(0,1fr);
}
.hub-winner-scratch:has(.hub-scratch-preview:not([hidden])) > h3 { grid-area: 1 / 3; }
.hub-winner-scratch:has(.hub-scratch-preview:not([hidden])) > [aria-live] { grid-area: 2 / 3; }
.hub-scratch-preview {
  --scratch-tone: #9caabc;
  grid-area: 1 / 2 / 3;
  align-self: center;
  display: grid;
  place-items: center;
  width: clamp(62px, 7vw, 94px);
  aspect-ratio: 88 / 63;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--scratch-tone) 45%, var(--line));
  border-radius: 7px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--scratch-tone) 15%, var(--panel)), var(--panel));
  color: var(--scratch-tone);
  font-size: clamp(9px, 1vw, 11px);
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}
.hub-scratch-preview[data-tone="points"] { --scratch-tone: #9ab6ca; }
.hub-scratch-preview[data-tone="bonus-points"] { --scratch-tone: #a0b8ac; }
.hub-scratch-preview[data-tone="pack"] { --scratch-tone: #b6a9cc; }
.hub-scratch-preview[data-tone="appearance"] {
  --scratch-tone: #fff0a8;
  border-color: #d4a64e;
  background: linear-gradient(130deg,#3a2916 20%,#aa7131 43%,#d3a451 49%,#69471f 57%,#352514 80%) 0 0 / 260% 100%;
  box-shadow: 0 0 9px #efbc4866, inset 0 0 0 1px #fff0a844;
  text-shadow: 0 1px 3px #281807;
  animation: hub-scratch-shimmer 5s ease-in-out infinite alternate;
}
@keyframes hub-scratch-shimmer { to { background-position: 100% 0; } }
:root.pp-background-animation-paused .hub-scratch-preview { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .hub-scratch-preview[data-tone="appearance"] { animation: none; }
}
.hub-winner-detail { margin: 0 0 4px; min-height: 1.5em; color: var(--muted); }
@media (min-width: 701px) {
  .hub-winner-prize, .hub-winner-detail {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}
.hub-winner-account {
  display: inline-block;
  max-width: 100%;
  padding: 3px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 999px;
  background: var(--panel);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}
.hub-pack-preview {
  --preview-rarity: var(--accent);
  position: relative;
  align-self: center;
  grid-area: 1 / 2 / 3;
}
.hub-pack-preview[data-rarity="Common"] { --preview-rarity: #b7c2ce; }
.hub-pack-preview[data-rarity="Uncommon"] { --preview-rarity: #65db91; }
.hub-pack-preview[data-rarity="Rare"] { --preview-rarity: #39caff; }
.hub-pack-preview[data-rarity="Epic"] { --preview-rarity: #a78bfa; }
.hub-pack-preview[data-rarity="Legendary"] { --preview-rarity: #ffd04c; }
.hub-pack-preview[data-rarity="Icon"] { --preview-rarity: #ff65d7; }
.hub-pack-preview summary {
  position: relative;
  display: grid;
  width: var(--winner-pack-preview-size);
  aspect-ratio: 63 / 88;
  overflow: hidden;
  border: 1px solid var(--preview-rarity);
  border-radius: 7px;
  background: #101a2a;
  cursor: pointer;
  list-style: none;
}
.hub-pack-preview summary::-webkit-details-marker { display: none; }
.hub-pack-preview summary img { width: 100%; height: 100%; object-fit: cover; }
.hub-pack-preview summary span { position: absolute; inset: auto 0 0; background: #101a2a; color: var(--preview-rarity); font-size: 9px; font-weight: 750; text-align: center; }
.hub-full-card {
  position: fixed;
  z-index: 10000;
  perspective: 1100px;
}
.hub-full-card .player-card {
  width: min(360px, 82vw, calc((100dvh - 24px) * 63 / 88));
}
@media (max-width: 480px) {
  .hub-winner-tile:has(.hub-pack-preview, .hub-scratch-preview:not([hidden])) { gap: 6px; }
}
