:root {
  color-scheme: dark;
  --bg: #141619;
  --panel: #1d2024;
  --panel-raised: #272b30;
  --panel-glass: rgba(32, 36, 42, 0.78);
  --line: rgba(236, 232, 222, 0.09);
  --line-strong: rgba(236, 232, 222, 0.18);
  --muted: #9fa29e;
  --text: #f0eee8;
  --accent: #c5d1b4;
  --accent-bright: #d9e8c5;
  --accent-dark: #97a882;
  --gold: #e2be7e;
  --coral: #e5857b;
  --cyan: #84c5cb;
  --violet: #b69fd8;
  --blue: #9cb4d8;
  --radius: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 80% 0%, rgba(183, 195, 167, 0.05), transparent 45%), var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .52; transform: none !important; }
button, .button-link {
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
button:hover:not(:disabled), .button-link:hover { transform: translateY(-1.5px); }
button:active:not(:disabled), .button-link:active { transform: translateY(0) scale(.98); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 16px 18px;
  background: #17191d;
  border-right: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 34px 9px;
  color: var(--text);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.6px;
  text-decoration: none;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(236,232,222,.14);
  background: linear-gradient(145deg, #2d3136, #212327);
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
}
.ram-mark { display: block; width: 34px; height: 32px; overflow: visible; }
.ram-horn {
  fill: none;
  stroke: #aaa9a1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 10;
}
.ram-horn-highlight {
  fill: none;
  stroke: #d2d0c8;
  stroke-linecap: round;
  stroke-width: 1.4;
  opacity: .8;
}
.ram-horn-groove {
  fill: none;
  stroke: #777772;
  stroke-linecap: round;
  stroke-width: 1.1;
  opacity: .9;
}
.ram-face { fill: #9c9b91; stroke: #d0cec6; stroke-width: 1.2; stroke-linejoin: round; }
.ram-bridge { fill: #c1c0b9; opacity: .66; }
.ram-brow { fill: none; stroke: #343332; stroke-linecap: round; stroke-width: 3.4; }
.ram-eye { fill: #ec5654; stroke: #8d3435; stroke-width: .8; }
.ram-pupil { fill: #292a28; }
.ram-snout { fill: #77766f; stroke: #d0c6b5; stroke-width: 1; }
.ram-nostril { fill: #323230; }
.ram-mouth { fill: none; stroke: #44433f; stroke-linecap: round; stroke-width: 1.4; }
.nav-label, .section-kicker {
  margin: 0 0 9px 10px;
  color: #777a89;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.nav-list { display: grid; gap: 5px; }
.nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #a4a6b2;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background .18s, color .18s;
}
.nav-button:hover, .nav-button.active { background: #262a30; color: var(--text); }
.nav-button.active { box-shadow: inset 2px 0 var(--accent); }
.nav-icon { width: 20px; font-size: 16px; text-align: center; }
.nav-count { margin-left: auto; padding: 1px 7px; border-radius: 99px; background: rgba(197,209,180,.12); color: var(--accent); font-size: 11px; font-weight: 700; }
.sidebar-divider { height: 1px; margin: 22px 5px 18px; background: var(--line); }
.friends-heading { display: flex; justify-content: space-between; align-items: center; padding-right: 9px; }
.friends-heading button {
  border: 0;
  background: transparent;
  color: #858896;
  cursor: pointer;
  font-size: 19px;
}
.friend-list { display: grid; gap: 3px; overflow-y: auto; max-height: 36vh; }
.friend {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 7px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease;
}
.friend:hover, .friend.selected { background: #25282c; }
.avatar-wrap { position: relative; flex: 0 0 auto; }
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #626868, #3d4144);
  font-size: 15px;
  font-weight: 700;
}
.avatar.gold { background: linear-gradient(145deg, #77736c, #4b4945); }
.avatar.blue { background: linear-gradient(145deg, #777a79, #484a49); }
.avatar.pink { background: linear-gradient(145deg, #777475, #4c494b); }
.online-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border: 2px solid #14151b;
  border-radius: 50%;
  background: var(--accent);
}
.online-dot.away { background: #a5a49e; }
.friend-info { min-width: 0; flex: 1; }
.friend-name { display: block; overflow: hidden; color: #e6e5ec; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.friend-status { display: block; overflow: hidden; color: #7e8190; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-bottom { margin-top: auto; }
.profile-card { display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; border-top: 1px solid var(--line); }
.profile-card .avatar { width: 37px; height: 37px; }
.profile-copy { min-width: 0; flex: 1; }
.profile-name { display: block; font-size: 12px; font-weight: 700; }
.profile-level { display: block; color: var(--muted); font-size: 10px; }
.profile-menu { border: 0; background: transparent; color: #999ba8; cursor: pointer; font-size: 18px; }
.profile-page-card { display: flex; align-items: center; gap: 18px; margin: 24px 0; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.profile-page-avatar { width: 72px; height: 72px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 20px; background: #303134; color: var(--text); font-size: 27px; font-weight: 750; }
.avatar img, .profile-page-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.avatar-upload-controls { margin-top: 10px; }
.avatar-upload-controls p { min-height: 12px; }
.profile-page-copy { min-width: 0; flex: 1; }
.profile-page-copy h2 { overflow-wrap: anywhere; margin: 0; font-size: 23px; letter-spacing: -.7px; }
.profile-page-copy p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.profile-stat { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.profile-stat strong { display: block; font-size: 22px; }
.profile-stat span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.profile-note { margin-top: 24px; padding: 15px 17px; border-left: 2px solid var(--accent); background: rgba(255,255,255,.025); color: var(--muted); font-size: 10px; }
.profile-game-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.profile-game-time { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--muted); font-size: 11px; }
.profile-game-time strong { color: var(--text); white-space: nowrap; }
.button-link { display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-raised); color: var(--text); cursor: pointer; font-size: 11px; font-weight: 700; text-decoration: none; }

.main { min-width: 0; }
.topbar {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
  padding: 0 38px;
  border-bottom: 1px solid var(--line);
  background: rgba(20, 22, 25, .92);
  backdrop-filter: blur(18px);
}
.top-links { display: flex; align-items: center; gap: 27px; }
.top-link { padding: 25px 0 23px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #9395a2; cursor: pointer; font-size: 12px; font-weight: 650; text-decoration: none; }
.top-link:hover, .top-link.active { border-bottom-color: var(--accent); color: var(--text); }
.top-actions { display: flex; align-items: center; gap: 11px; }
.language-switcher { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.language-switcher select { max-width: 92px; padding: 8px 7px; border: 1px solid var(--line); border-radius: 8px; background: #202227; color: var(--text); font: inherit; cursor: pointer; }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 195px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #202227;
  color: #888b98;
}
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.search-box input::placeholder { color: #777a87; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #202227; color: #c0c0ba; cursor: pointer; }
.login-button, .primary-button {
  padding: 9px 14px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #1c2218;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transition: background .16s, transform .16s, box-shadow .16s;
}
.login-button:hover, .primary-button:hover { transform: translateY(-1px); background: var(--accent-bright); box-shadow: 0 6px 18px rgba(197, 209, 180, .2); }

.content { width: min(100%, 1440px); margin: 0 auto; padding: 30px 38px 60px; }
.page-view { display: none; }
.page-view.active { display: block; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.live-pip { width: 7px; height: 7px; border-radius: 50%; background: #8fd99f; box-shadow: 0 0 10px rgba(143,217,159,.75); }

.hero {
  position: relative;
  min-height: 325px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 40px 46px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background:
    linear-gradient(95deg, rgba(22,25,29,.98) 0%, rgba(24,28,33,.89) 46%, rgba(28,33,38,.35) 100%),
    linear-gradient(135deg, #2d3839, #292f3b 50%, #4b433b);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .35);
}
.hero::after {
  position: absolute;
  top: -50%;
  right: 2%;
  width: 48%;
  height: 200%;
  content: "";
  background: radial-gradient(ellipse at center, rgba(197,209,180,.26), rgba(132,197,203,.14) 43%, transparent 70%);
  transform: rotate(-15deg);
  pointer-events: none;
}
.hero-snake-art {
  position: absolute;
  right: 4%;
  bottom: 4%;
  z-index: 1;
  width: min(39%, 340px);
  height: auto;
  color: rgba(183,195,167,.65);
  filter: drop-shadow(0 15px 32px rgba(0,0,0,.32));
  user-select: none;
}
.hero-snake-art .snake-body { fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 24; }
.hero-snake-art .snake-head { fill: #c5d1b4; }
.hero-snake-art .snake-eye { fill: #232722; }
.hero-snake-art .snake-fruit { fill: #e29b7e; }
.hero-snake-art .snake-stem { fill: none; stroke: #c5d1b4; stroke-linecap: round; stroke-width: 5; }
.hero-content { position: relative; z-index: 2; max-width: 500px; }
.hero h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); font-weight: 800; letter-spacing: -1.8px; line-height: 1.05; }
.hero-description { max-width: 430px; margin: 14px 0 20px; color: #c7c6c1; font-size: 12.5px; line-height: 1.68; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; color: #d0cec7; font-size: 10px; }
.tag { padding: 4px 9px; border: 1px solid rgba(236,232,222,.18); border-radius: 6px; background: rgba(255,255,255,.03); color: #dedbd2; font-size: 9px; font-weight: 700; letter-spacing: .4px; }
.tag.tag-mp { border-color: rgba(132,197,203,.4); background: rgba(132,197,203,.12); color: #a9e3e8; }
.hero-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; }
.hero-price { color: #f0eee7; font-size: 12px; font-weight: 700; }
.secondary-button { padding: 9px 14px; border: 1px solid rgba(236,232,222,.22); border-radius: 9px; background: rgba(236,232,222,.07); color: #eeece5; cursor: pointer; font-size: 11px; font-weight: 700; }
.secondary-button:hover { background: rgba(236,232,222,.14); }

/* Quick Join Multiplayer Banner */
.mp-quick-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding: 15px 20px;
  border: 1px solid rgba(132, 197, 203, .24);
  border-radius: 14px;
  background: linear-gradient(110deg, rgba(29, 39, 44, .92), rgba(28, 32, 38, .92));
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}
.mp-quick-info { display: flex; align-items: center; gap: 12px; }
.mp-quick-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(132, 197, 203, .16);
  border: 1px solid rgba(132, 197, 203, .32);
  font-size: 20px;
}
.mp-quick-info strong { display: block; font-size: 13px; color: #e9f5f6; }
.mp-quick-info span { color: var(--muted); font-size: 11px; }
.mp-quick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mp-code-input {
  width: 145px;
  padding: 8px 11px;
  border: 1px solid rgba(132, 197, 203, .35);
  border-radius: 9px;
  background: #15191d;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
}
.mp-code-input::placeholder { font-weight: 500; letter-spacing: normal; text-transform: none; color: #7b848b; }

.section-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin: 28px 0 14px; }
.section-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.5px; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.text-button { padding: 5px 0; border: 0; background: transparent; color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 700; text-decoration: none; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.filter-chip {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--panel);
  color: #a8aba6;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.filter-chip.active, .filter-chip:hover {
  border-color: rgba(197, 209, 180, .45);
  background: rgba(197, 209, 180, .13);
  color: var(--accent-bright);
}

.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.game-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(236,232,222,.22);
  box-shadow: 0 16px 36px rgba(0,0,0,.34);
}
.game-card.is-multiplayer {
  border-color: rgba(132, 197, 203, .22);
}
.game-card.is-multiplayer:hover {
  border-color: rgba(132, 197, 203, .48);
  box-shadow: 0 16px 38px rgba(34, 88, 96, .26);
}
.game-cover {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 62px;
  isolation: isolate;
}
.game-cover::before, .game-cover::after { position: absolute; z-index: -1; content: ""; border-radius: 50%; filter: blur(2px); transition: transform .3s ease; }
.game-card:hover .game-cover::before { transform: scale(1.12); }

.cover-snake { background: linear-gradient(145deg, #2b3d30, #1f2822 70%, #19201b); }
.cover-snake::before { width: 150px; height: 150px; top: -80px; left: 20px; background: #7aa37e; opacity: .38; }
.cover-snake::after { width: 115px; height: 115px; right: -25px; bottom: -60px; background: #c49b78; opacity: .34; }

.cover-sky { background: linear-gradient(145deg, #2d3e49, #212c34 70%, #1b2329); }
.cover-sky::before { width: 150px; height: 150px; right: -20px; top: -80px; background: #89b2c4; opacity: .38; }
.cover-sky::after { width: 120px; height: 120px; left: 10px; bottom: -75px; background: #d4b483; opacity: .34; }

.cover-pong { background: linear-gradient(145deg, #383546, #262530 70%, #1e1d26); }
.cover-pong::before { width: 145px; height: 145px; left: -40px; top: -65px; background: #9d94bd; opacity: .38; }
.cover-pong::after { width: 120px; height: 120px; right: -30px; bottom: -70px; background: #c5b28f; opacity: .36; }

.cover-memory { background: linear-gradient(145deg, #433a32, #2d2824 70%, #23201d); }
.cover-memory::before { width: 145px; height: 145px; right: 8px; top: -88px; background: #c4a378; opacity: .38; }
.cover-memory::after { width: 120px; height: 120px; left: -30px; bottom: -70px; background: #849b82; opacity: .38; }

.cover-ttt { background: linear-gradient(145deg, #273944, #1e2731 70%, #181f27); }
.cover-ttt::before { width: 155px; height: 155px; left: -25px; top: -75px; background: #64b5c6; opacity: .42; }
.cover-ttt::after { width: 125px; height: 125px; right: -20px; bottom: -65px; background: #e5857b; opacity: .38; }

.cover-hockey { background: linear-gradient(145deg, #2c314a, #1f2336 70%, #181b29); }
.cover-hockey::before { width: 155px; height: 155px; right: -18px; top: -78px; background: #779be7; opacity: .42; }
.cover-hockey::after { width: 125px; height: 125px; left: -22px; bottom: -68px; background: #67d5b5; opacity: .36; }

.cover-c4 { background: linear-gradient(145deg, #3f3244, #282230 70%, #1f1b26); }
.cover-c4::before { width: 150px; height: 150px; left: 20px; top: -82px; background: #e2be7e; opacity: .4; }
.cover-c4::after { width: 125px; height: 125px; right: -25px; bottom: -65px; background: #78c6a3; opacity: .38; }

.cover-tanks { background: linear-gradient(145deg, #3c362b, #28251f 70%, #1f1d18); }
.cover-tanks::before { width: 155px; height: 155px; right: -15px; top: -75px; background: #d98a6c; opacity: .42; }
.cover-tanks::after { width: 125px; height: 125px; left: -20px; bottom: -65px; background: #95b87d; opacity: .38; }

.cover-symbol { filter: drop-shadow(0 10px 14px rgba(0,0,0,.42)); transform: rotate(-6deg); transition: transform .22s ease; }
.game-card:hover .cover-symbol { transform: rotate(0deg) scale(1.08); }
.cover-label {
  position: absolute;
  right: 9px;
  bottom: 8px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(15, 17, 20, .78);
  border: 1px solid rgba(255,255,255,.1);
  color: #e8e6df;
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: .5px;
}
.cover-mode-pill {
  position: absolute;
  left: 9px;
  top: 9px;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(18, 21, 25, .78);
  border: 1px solid rgba(255,255,255,.12);
  color: #d6d4ce;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .4px;
}
.cover-mode-pill.mp {
  background: rgba(21, 46, 52, .88);
  border-color: rgba(132, 197, 203, .48);
  color: #9fe7ed;
}
.game-info { display: flex; flex: 1; flex-direction: column; padding: 13px 14px 14px; }
.game-title-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.game-title { overflow: hidden; margin: 0; font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.game-rating { color: var(--accent); font-size: 9px; font-weight: 800; white-space: nowrap; }
.game-rating.mp-tag { color: var(--cyan); }
.game-desc-short { margin: 5px 0 0; color: #999c98; font-size: 10.5px; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.game-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; color: #a0a19f; font-size: 10px; }
.game-playtime { margin-top: 5px; color: var(--muted); font-size: 9.5px; }
.price { color: #e7e6ed; font-size: 10px; font-weight: 750; }
.game-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
.game-actions .primary-button { padding: 7px 12px; font-size: 10px; }
.library-status { color: #b7c3a7; font-size: 9.5px; font-weight: 700; }
.empty-state { grid-column: 1 / -1; padding: 30px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
.library-summary { display: flex; align-items: center; gap: 18px; margin: 7px 0 22px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.library-summary strong { font-size: 22px; }
.library-summary span { color: var(--muted); font-size: 10px; }
.library-summary .summary-copy { display: grid; }
.library-summary .text-button { margin-left: auto; }
.store-view-title { margin: 3px 0 5px; font-size: 27px; letter-spacing: -1px; }
.store-view-subtitle { margin: 0; color: var(--muted); font-size: 11px; }

/* Game Modal & Stage */
.game-backdrop { position: fixed; z-index: 25; inset: 0; display: none; place-items: center; padding: 16px; background: rgba(8,9,11,.85); backdrop-filter: blur(10px); }
.game-backdrop.open { display: grid; }
.game-modal {
  width: min(100%, 900px);
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #1b1e23;
  box-shadow: 0 28px 95px rgba(0,0,0,.75);
}
.game-modal-header { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line); background: #171a1f; }
.game-modal-header > div { min-width: 0; flex: 1; }
.game-modal-header .eyebrow { margin-bottom: 3px; font-size: 8.5px; }
.game-modal-header h2 { margin: 0; font-size: 20px; letter-spacing: -.5px; }
.game-modal-header #game-description { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.game-modal-header .icon-button { flex: 0 0 auto; font-size: 17px; }
.game-stage { position: relative; min-height: 300px; overflow-y: auto; padding: 16px 20px 20px; }

/* Toolbar inside games (solo options & multiplayer lobby) */
.game-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #15181c;
}
.game-toolbar-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.toolbar-label { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; margin-right: 4px; }
.mode-pill-btn {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #20242a;
  color: #b7bab5;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 700;
}
.mode-pill-btn.active {
  border-color: rgba(197, 209, 180, .55);
  background: rgba(197, 209, 180, .16);
  color: var(--accent-bright);
}
.mode-pill-btn.mp-active {
  border-color: rgba(132, 197, 203, .55);
  background: rgba(132, 197, 203, .18);
  color: #a9eef4;
}

/* Multiplayer Room & Lobby Panel */
.mp-lobby-bar {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(132, 197, 203, .28);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(23, 33, 38, .95), rgba(24, 27, 32, .95));
}
.mp-lobby-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mp-room-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.mp-room-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px dashed rgba(132, 197, 203, .55);
  border-radius: 8px;
  background: rgba(15, 22, 26, .9);
  color: #a6edf3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
}
.mp-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(255,255,255,.05);
  color: #d0d4dc;
  font-size: 10.5px;
  font-weight: 650;
}
.mp-status-pill.connected {
  background: rgba(120, 198, 163, .16);
  color: #98ebc2;
  border: 1px solid rgba(120, 198, 163, .35);
}
.mp-status-pill.waiting {
  background: rgba(226, 190, 126, .14);
  color: #f0d199;
  border: 1px solid rgba(226, 190, 126, .35);
}
.mp-small-btn {
  padding: 6px 10px;
  border: 1px solid rgba(236,232,222,.16);
  border-radius: 7px;
  background: #232830;
  color: var(--text);
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 700;
}
.mp-small-btn:hover { background: #2d343e; border-color: rgba(132, 197, 203, .45); }
.mp-small-btn.primary {
  background: var(--cyan);
  border-color: transparent;
  color: #102124;
}
.mp-small-btn.primary:hover { background: #9ed9df; }
.mp-open-rooms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
}
.mp-vs-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  background: rgba(16, 19, 23, .75);
  border: 1px solid var(--line);
}
.mp-player-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 750;
}
.mp-player-tag.active-turn {
  color: var(--accent-bright);
  text-shadow: 0 0 12px rgba(197,209,180,.4);
}
.mp-score-pill {
  padding: 3px 10px;
  border-radius: 99px;
  background: #252a32;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
}
.mp-emoji-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mp-emoji-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #1e2228;
  cursor: pointer;
  font-size: 14px;
}
.mp-emoji-btn:hover { background: #2b313a; transform: scale(1.12); }

/* Floating Emoji Reaction */
.floating-reaction {
  position: absolute;
  z-index: 30;
  bottom: 45px;
  font-size: 32px;
  pointer-events: none;
  animation: floatUpReaction 1.8s cubic-bezier(.2,.8,.3,1) forwards;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.5));
}
@keyframes floatUpReaction {
  0% { opacity: 0; transform: translateY(15px) scale(.6); }
  20% { opacity: 1; transform: translateY(0) scale(1.15); }
  80% { opacity: 1; transform: translateY(-75px) scale(1); }
  100% { opacity: 0; transform: translateY(-110px) scale(.85); }
}

.game-instructions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 10px; color: #b7b8b2; font-size: 11px; }
.game-score { display: flex; align-items: center; gap: 12px; color: var(--accent); font-weight: 750; white-space: nowrap; font-size: 12px; }
.arcade-canvas {
  display: block;
  width: min(100%, 720px);
  height: auto;
  margin: 0 auto;
  border: 1px solid rgba(236,232,222,.12);
  border-radius: 13px;
  background: #14171a;
  box-shadow: inset 0 0 30px rgba(0,0,0,.5), 0 10px 28px rgba(0,0,0,.35);
  touch-action: none;
}
.game-stage-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 12px; }
.game-control { min-width: 44px; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: #262a30; color: var(--text); cursor: pointer; font-weight: 750; }
.game-control:hover { background: #31363e; }

/* Memory Garden Upgraded */
.memory-grid {
  width: min(100%, 460px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 auto;
}
.memory-grid.cols-5 {
  width: min(100%, 540px);
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.memory-card {
  aspect-ratio: 1.08;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(236,232,222,.13);
  border-radius: 12px;
  background: linear-gradient(145deg, #2d3238, #212529);
  color: rgba(197,209,180,.35);
  cursor: pointer;
  font-size: clamp(22px, 4.5vw, 34px);
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
  transition: transform .22s cubic-bezier(.2,.8,.3,1), background .22s, border-color .22s, box-shadow .22s;
}
.memory-card:hover:not(.revealed):not(.matched) {
  transform: translateY(-3px);
  border-color: rgba(197,209,180,.4);
  color: rgba(197,209,180,.65);
}
.memory-card.revealed {
  background: linear-gradient(145deg, #39443d, #2b342e);
  border-color: rgba(197,209,180,.55);
  color: var(--text);
  transform: scale(1.03);
}
.memory-card.matched {
  background: linear-gradient(145deg, #324639, #243329);
  border-color: rgba(143, 217, 159, .6);
  color: var(--text);
  box-shadow: 0 0 18px rgba(143, 217, 159, .2);
}
.memory-card.hint-glow {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(226, 190, 126, .55);
}

/* Tic-Tac-Toe Arena */
.ttt-board-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ttt-grid {
  display: grid;
  gap: 10px;
  width: min(100%, 360px);
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #14181d;
  box-shadow: inset 0 0 24px rgba(0,0,0,.45), 0 12px 30px rgba(0,0,0,.35);
}
.ttt-grid.size-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ttt-grid.size-6 {
  width: min(100%, 440px);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  padding: 11px;
}
.ttt-cell {
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(236,232,222,.1);
  border-radius: 12px;
  background: linear-gradient(145deg, #22272f, #1a1e24);
  cursor: pointer;
  font-size: 40px;
  font-weight: 900;
  transition: transform .15s, border-color .15s, background .15s, box-shadow .15s;
}
.ttt-grid.size-6 .ttt-cell {
  font-size: 22px;
  border-radius: 9px;
}
.ttt-cell:hover:not(:disabled) {
  border-color: rgba(132, 197, 203, .48);
  background: #262c35;
}
.ttt-cell.mark-x {
  color: #84c5cb;
  text-shadow: 0 0 16px rgba(132, 197, 203, .55);
  border-color: rgba(132, 197, 203, .3);
}
.ttt-cell.mark-o {
  color: #e5857b;
  text-shadow: 0 0 16px rgba(229, 133, 123, .55);
  border-color: rgba(229, 133, 123, .3);
}
.ttt-cell.fading-soon {
  opacity: .58;
  border-style: dashed;
  animation: pulseVanish 1.1s infinite alternate;
}
.ttt-cell.fading-soon::after {
  content: "⏳";
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 10px;
  opacity: .85;
}
@keyframes pulseVanish {
  from { transform: scale(.96); opacity: .45; }
  to { transform: scale(1); opacity: .75; }
}
.ttt-cell.win-cell {
  background: rgba(197, 209, 180, .2);
  border-color: var(--accent-bright);
  box-shadow: 0 0 22px rgba(197, 209, 180, .4);
  transform: scale(1.04);
}

/* Connect Four Arena */
.c4-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.c4-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 490px);
  padding: 14px;
  border: 1px solid rgba(236,232,222,.16);
  border-radius: 16px;
  background: linear-gradient(180deg, #1b222c, #141920);
  box-shadow: inset 0 0 28px rgba(0,0,0,.6), 0 14px 34px rgba(0,0,0,.4);
}
.c4-cell {
  aspect-ratio: 1;
  position: relative;
  border: 2px solid rgba(255,255,255,.08);
  border-radius: 50%;
  background: #101318;
  cursor: pointer;
  box-shadow: inset 0 4px 10px rgba(0,0,0,.75);
  transition: border-color .15s, transform .15s, background .2s, box-shadow .2s;
}
.c4-cell.col-hover:not(.p1):not(.p2) {
  border-color: rgba(197, 209, 180, .4);
  background: rgba(197, 209, 180, .08);
}
.c4-cell.p1 {
  background: radial-gradient(circle at 32% 30%, #ffe39f, #e2be7e 55%, #9e7836);
  border-color: #f7dca4;
  box-shadow: 0 0 14px rgba(226, 190, 126, .45), inset 0 -3px 6px rgba(0,0,0,.35);
  animation: dropDisc .26s cubic-bezier(.22,.9,.32,1.15);
}
.c4-cell.p2 {
  background: radial-gradient(circle at 32% 30%, #a8f0f6, #6ec3cb 55%, #347a82);
  border-color: #aeeef4;
  box-shadow: 0 0 14px rgba(132, 197, 203, .45), inset 0 -3px 6px rgba(0,0,0,.35);
  animation: dropDisc .26s cubic-bezier(.22,.9,.32,1.15);
}
.c4-cell.win-disc {
  transform: scale(1.09);
  box-shadow: 0 0 24px #fff, 0 0 36px var(--accent-bright);
}
@keyframes dropDisc {
  0% { transform: translateY(-80px) scale(.85); opacity: .4; }
  80% { transform: translateY(4px) scale(1.03); opacity: 1; }
  100% { transform: translateY(0) scale(1); }
}

.game-end-message { min-height: 22px; margin: 10px 0 0; color: #e2e0d8; font-size: 12px; font-weight: 650; text-align: center; }

.community-layout { display: block; }
.player-search-form { display: flex; gap: 9px; max-width: 520px; margin-top: 20px; }
.player-search-form input { min-width: 0; flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); font-size: 11px; }
.player-results { display: flex; flex-wrap: wrap; gap: 8px; min-height: 20px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.player-results .friend { width: auto; min-width: 160px; border: 1px solid var(--line); background: var(--panel); }
.stats-table-wrap { overflow-x: auto; margin-top: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.stats-table { width: 100%; border-collapse: collapse; text-align: left; }
.stats-table th, .stats-table td { padding: 14px 17px; border-bottom: 1px solid var(--line); font-size: 11px; }
.stats-table th { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.stats-table td:nth-child(2), .stats-table td:nth-child(3) { color: var(--muted); }
.stats-table tr:last-child td { border-bottom: 0; }
.feed-card, .chat-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.feed-card { margin-bottom: 12px; padding: 17px; }
.feed-user { display: flex; align-items: center; gap: 10px; }
.feed-user .avatar { width: 35px; height: 35px; }
.feed-user strong { display: block; font-size: 11px; }
.feed-user small { color: var(--muted); font-size: 9px; }
.feed-card p { margin: 13px 0; color: #d0cfd7; font-size: 11px; }
.feed-game { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 9px; background: var(--panel-raised); }
.feed-game-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(135deg,#55515b,#39464d); font-size: 20px; }
.feed-game strong { display: block; font-size: 10px; }
.feed-game small { color: var(--muted); font-size: 9px; }
.chat-panel { display: flex; flex-direction: column; min-height: 410px; }
.public-chat-panel { min-height: 430px; margin: 18px 0 28px; }
.public-chat-messages { min-height: 250px; max-height: 430px; }
.chat-header { display: flex; align-items: center; gap: 9px; padding: 13px; border-bottom: 1px solid var(--line); }
.chat-header .avatar { width: 31px; height: 31px; }
.chat-header strong { display: block; font-size: 11px; }
.chat-header small { color: #b7c3a7; font-size: 9.5px; }
.chat-messages { display: flex; flex: 1; flex-direction: column; gap: 11px; padding: 13px; overflow-y: auto; }
.message { max-width: 85%; align-self: flex-start; padding: 9px 12px; border-radius: 4px 11px 11px 11px; background: #2b2e33; color: #e6e4de; font-size: 11px; }
.message.mine { align-self: flex-end; border-radius: 11px 4px 11px 11px; background: #364239; }
.message-invite-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(132, 197, 203, .45);
  border-radius: 7px;
  background: rgba(132, 197, 203, .16);
  color: #a9eef4;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}
.message-time { display: block; margin-top: 3px; color: #a0a19f; font-size: 8.5px; text-align: right; }
.public-message { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-self: stretch; gap: 8px; max-width: 100%; padding: 3px 0; background: transparent; }
.public-message .avatar { width: 30px; height: 30px; border-radius: 10px; }
.public-message-copy { min-width: 0; }
.public-message-copy strong { margin-right: 7px; color: var(--text); font-size: 10px; }
.public-message-copy .message-time { display: inline; }
.public-message-text { overflow-wrap: anywhere; margin: 3px 0 0; color: #d0cfd7; font-size: 10px; white-space: pre-wrap; }
.chat-form { display: flex; gap: 7px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { min-width: 0; flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #1a1c20; color: var(--text); font-size: 11px; }
.chat-form button { width: 36px; border: 0; border-radius: 8px; background: var(--accent); color: #171a11; cursor: pointer; font-weight: 850; }
.chat-form button:disabled { cursor: not-allowed; opacity: .45; }
.chat-notice { margin: 0; padding: 0 12px 10px; color: #7e8190; font-size: 9px; }

.toast { position: fixed; z-index: 40; right: 24px; bottom: 24px; max-width: calc(100vw - 48px); padding: 11px 16px; border: 1px solid rgba(183,195,167,.35); border-radius: 10px; background: #262c28; color: #e4e6dc; box-shadow: 0 12px 35px #0007; font-size: 11.5px; font-weight: 600; opacity: 0; pointer-events: none; transform: translateY(9px); transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }

.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: none; place-items: center; padding: 20px; background: rgba(4,5,8,.78); backdrop-filter: blur(8px); }
.modal-backdrop.open { display: grid; }
.modal { position: relative; width: min(100%, 380px); padding: 27px; border: 1px solid var(--line); border-radius: 16px; background: #202328; box-shadow: 0 25px 90px #0007; }
.modal-close { position: absolute; top: 12px; right: 13px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #a8a9b3; cursor: pointer; font-size: 18px; }
.modal-mark { width: 43px; height: 43px; display: grid; place-items: center; margin-bottom: 16px; border: 1px solid rgba(236,232,222,.12); border-radius: 12px; background: #282a2d; }
.modal h2 { margin: 0; font-size: 21px; letter-spacing: -.7px; }
.modal > p { margin: 5px 0 12px; color: var(--muted); font-size: 10px; }
.modal > .demo-note { margin: 0 0 18px; color: #777a89; font-size: 9px; }
.form-field { display: grid; gap: 6px; margin: 12px 0; color: #b8bac5; font-size: 10px; font-weight: 650; }
.form-field input { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: #191b1f; color: var(--text); font-size: 11px; }
.modal-submit { width: 100%; margin-top: 8px; padding: 11px; }
.modal-switch { display: block; margin: 13px auto 0; border: 0; background: transparent; color: var(--accent); cursor: pointer; font-size: 10px; }
.form-error { min-height: 16px; margin: 7px 0 0; color: #d99a91; font-size: 10px; }
.account-recovery-view h3 { margin: 0 0 5px; font-size: 15px; }
.account-recovery-view > p { margin: 5px 0 13px; color: var(--muted); font-size: 10px; }
.account-recovery-view .recovery-username-line { margin-top: 16px; }
.recovery-username-line strong { color: var(--text); }
.recovery-code-value { display: block; overflow-wrap: anywhere; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #191b1f; color: var(--text); font-size: 11px; user-select: all; }
.account-recovery-view .profile-note { margin: 12px 0; }
.mobile-menu { display: none; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .content { padding-right: 25px; padding-left: 25px; }
  .topbar { padding-right: 25px; padding-left: 25px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-cover { height: 155px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 15; top: 0; bottom: 0; left: 0; width: 260px; height: 100dvh; transform: translateX(-105%); transition: transform .2s; box-shadow: 15px 0 40px #0008; }
  .sidebar.open { transform: translateX(0); }
  .topbar { height: 61px; padding: 0 15px; }
  .mobile-menu { display: grid; }
  .top-links { display: none; }
  .top-actions { margin-left: auto; }
  .search-box { width: 35px; padding: 8px; border: 0; background: transparent; }
  .search-box input { position: fixed; top: 66px; right: 15px; display: none; width: min(240px, calc(100vw - 30px)); padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #202227; }
  .search-box:focus-within input, .search-box input:not(:placeholder-shown) { display: block; }
  .search-box input:focus-visible { outline: 2px solid var(--accent); }
  .content { padding: 20px 15px 45px; }
  .hero { min-height: 290px; padding: 28px 24px; }
  .hero-snake-art { right: -5%; bottom: 5%; width: 41%; opacity: .78; }
  .hero-content { max-width: 82%; }
  .hero h1 { font-size: 35px; }
  .hero-description { font-size: 11.5px; }
  .game-cover { height: 125px; }
  .chat-panel { min-height: 330px; }
  .profile-stats { grid-template-columns: 1fr; }
  .profile-page-card { padding: 17px; }
}
@media (max-width: 460px) {
  .top-actions { gap: 5px; }
  .language-switcher { gap: 3px; font-size: 8px; }
  .language-switcher > span { display: none; }
  .language-switcher select { max-width: 76px; padding: 7px 4px; font-size: 9px; }
  .login-button { padding: 8px 10px; font-size: 10px; }
  .hero { min-height: 300px; }
  .hero-content { max-width: 94%; }
  .hero-snake-art { right: -12%; bottom: 1%; width: 42%; opacity: .35; }
  .hero h1 { font-size: 31px; }
  .game-grid { grid-template-columns: 1fr; gap: 12px; }
  .game-cover { height: 120px; font-size: 50px; }
  .library-summary { gap: 10px; padding: 13px; }
}
