:root {
  --bg-black: #0b0b0f;
  --bg-chrome: #101016;
  --bg-tab-active: #1a1a22;
  --bg-tab-inactive: #0e0e13;
  --bg-tab-hover: #15151d;
  --bg-card: #14141b;
  --bg-card-hover: #1d1d27;
  --bg-input: #0e0e14;
  --border-light: rgba(255, 255, 255, 0.09);
  --border-medium: rgba(255, 255, 255, 0.2);
  --accent: #ff3d5e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(255, 61, 94, 0.14);
  --text-primary: #ffffff;
  --text-secondary: #d1d1d1;
  --text-muted: #757575;
  --text-dim: #404040;
  --radius-xs: 8px;
  --font-logo: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --transition-fast: all 0.15s ease;
}

body.font-mono {
  --font-logo: 'JetBrains Mono', monospace;
  --font-heading: 'JetBrains Mono', monospace;
  --font-body: 'JetBrains Mono', monospace;
}

body.font-serif {
  --font-logo: Georgia, 'Times New Roman', serif;
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: Georgia, 'Times New Roman', serif;
}

body.font-clean {
  --font-logo: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="dark"] {
  --bg-black: #0b0b0f;
  --bg-chrome: #101016;
  --bg-tab-active: #1a1a22;
  --bg-tab-inactive: #0e0e13;
  --bg-tab-hover: #15151d;
  --bg-card: #14141b;
  --bg-card-hover: #1d1d27;
  --bg-input: #0e0e14;
  --border-light: rgba(255, 255, 255, 0.09);
  --border-medium: rgba(255, 255, 255, 0.2);
  --accent: #ff3d5e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(255, 61, 94, 0.14);
  --text-primary: #ffffff;
  --text-secondary: #d1d1d1;
  --text-muted: #757575;
  --text-dim: #404040;
}

body[data-theme="light"] {
  --bg-black: #f4f4f4;
  --bg-chrome: #ffffff;
  --bg-tab-active: #ffffff;
  --bg-tab-inactive: #e4e4e4;
  --bg-tab-hover: #dcdcdc;
  --bg-card: #ffffff;
  --bg-card-hover: #efefef;
  --bg-input: #ffffff;
  --border-light: rgba(0, 0, 0, 0.1);
  --border-medium: rgba(0, 0, 0, 0.2);
  --accent: #e11d48;
  --accent-ink: #ffffff;
  --accent-soft: rgba(225, 29, 72, 0.1);
  --text-primary: #111111;
  --text-secondary: #333333;
  --text-muted: #666666;
  --text-dim: #999999;
}

body[data-theme="slate"] {
  --bg-black: #16181d;
  --bg-chrome: #1c1f26;
  --bg-tab-active: #23262e;
  --bg-tab-inactive: #14161b;
  --bg-tab-hover: #1e2128;
  --bg-card: #1e2129;
  --bg-card-hover: #262a34;
  --bg-input: #14161b;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --accent: #ff5c7a;
  --accent-ink: #101016;
  --accent-soft: rgba(255, 92, 122, 0.14);
  --text-primary: #e8eaed;
  --text-secondary: #c2c6cc;
  --text-muted: #8a8f98;
  --text-dim: #555a63;
}

body[data-theme="navy"] {
  --bg-black: #0a1020;
  --bg-chrome: #0d1428;
  --bg-tab-active: #141c34;
  --bg-tab-inactive: #080d1a;
  --bg-tab-hover: #101838;
  --bg-card: #111936;
  --bg-card-hover: #182144;
  --bg-input: #080d1a;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --accent: #ff5c7a;
  --accent-ink: #0d1428;
  --accent-soft: rgba(255, 92, 122, 0.14);
  --text-primary: #e8ecf8;
  --text-secondary: #bcc4de;
  --text-muted: #7e87a3;
  --text-dim: #4a5170;
}

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

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg-black);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

#loader-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-black);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#loader-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#loader-container {
  width: min(420px, 84vw);
  text-align: center;
}

.fyn-loader {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0 auto 36px;
  font-family: var(--font-logo);
  font-weight: 700;
  user-select: none;
}

.fyn-loader .fyn-letter {
  font-size: 34px;
  line-height: 1;
  color: var(--text-primary);
  animation: fyn-bounce 1.1s infinite ease-in-out;
  animation-delay: calc(var(--i) * 0.12s);
}

.fyn-loader .fyn-tag {
  margin-left: 8px;
  margin-bottom: 5px;
  padding: 3px 6px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  animation: fyn-blink 1.1s infinite ease-in-out;
}

@keyframes fyn-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-10px); opacity: 1; }
}

@keyframes fyn-blink {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.t {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
}

.b {
  height: 6px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-card-hover);
}

.p {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.1s linear;
}

.n {
  margin-top: 10px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 11px;
}

.side-nav {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: 208px;
  padding: 18px 12px 12px;
  border-right: 1px solid var(--border-light);
  background: var(--bg-chrome);
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 4px 20px;
  padding: 4px 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.nav-brand-name {
  color: var(--text-primary);
  font-family: var(--font-logo);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

.nav-brand-tag {
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.nav-item svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-item.active {
  border-color: var(--border-light);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.nav-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-icon-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

#app-main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-black);
}

body[data-layout="side"] #app-main {
  margin-left: 208px;
}

body[data-layout="browser"] .side-nav {
  display: none;
}

body[data-layout="side"] .browser-top {
  display: none;
}

.browser-top {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-chrome);
  border-bottom: 1px solid var(--border-light);
}

.btab-strip {
  padding: 8px 12px 0;
}

.btabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  overflow-x: auto;
}

.btabs::-webkit-scrollbar {
  display: none;
}

.browser-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: var(--bg-tab-inactive);
  border: 1px solid var(--border-light);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.browser-tab:hover {
  color: var(--text-secondary);
}

.browser-tab.active {
  background: var(--bg-tab-active);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.browser-tab.active span {
  color: var(--accent);
  font-weight: 700;
}

.bnav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-tab-active);
}

.baddress-wrap {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-muted);
}

.baddress-wrap:focus-within {
  border-color: var(--accent);
}

.baddress-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
}

.baddress-input::placeholder {
  color: var(--text-dim);
}

.chooser-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  padding: 20px;
}

.chooser-overlay.hidden {
  display: none;
}

.chooser-card {
  width: min(620px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 26px 28px 22px;
  border: 1px solid var(--border-medium);
  border-radius: 18px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-body);
}

.chooser-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.chooser-brand {
  font-family: var(--font-logo);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.chooser-step {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.chooser-progress {
  height: 3px;
  margin: 14px -28px 0;
  border-radius: 2px;
  background: var(--bg-card-hover);
}

.chooser-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
}

.chooser-card h2 {
  margin: 24px 0 6px;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.chooser-card p {
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.chooser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pick-card {
  position: relative;
  padding: 14px 14px 15px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-input);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.pick-card strong {
  display: block;
  margin-top: 12px;
  font-size: 14px;
}

.pick-card small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.pick-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px -12px var(--accent);
}

.pick-check {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 800;
}

.pick-card.selected .pick-check {
  display: flex;
}

.pick-art {
  display: block;
  height: 104px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-black);
  overflow: hidden;
}

.pa-rail {
  float: left;
  width: 30px;
  height: 100%;
  padding: 12px 0 0 9px;
  border-right: 1px solid var(--border-light);
  box-sizing: border-box;
}

.pa-rail i {
  display: block;
  width: 12px;
  height: 4px;
  margin-bottom: 7px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.7;
}

.pa-main {
  display: block;
  margin-left: 30px;
  padding: 12px;
}

.pa-pill {
  display: block;
  height: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  background: var(--border-medium);
}

.pa-tiles {
  display: flex;
  gap: 8px;
}

.pa-tiles i {
  flex: 1;
  height: 42px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--border-light);
}

.pa-browser {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
}

.pa-dots {
  display: flex;
  gap: 4px;
}

.pa-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.pa-addr {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-light);
}

.pa-tiles3 {
  display: flex;
  gap: 8px;
  padding: 12px;
}

.pa-tiles3 i {
  flex: 1;
  height: 44px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--border-light);
}

.chooser-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
}

.chooser-foot .btn-ghost:disabled {
  opacity: 0.45;
  cursor: default;
}

@media (max-width: 560px) {
  .chooser-grid {
    grid-template-columns: 1fr;
  }
  .chooser-card h2 {
    font-size: 23px;
  }
}

.grid-mesh-bg {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.hero-home-view {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 60px 20px 100px;
  text-align: center;
}

.hero-home-view.hidden {
  display: none;
}

.brand-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.brand-logo-text {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: var(--text-primary);
  font-family: var(--font-logo);
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  cursor: pointer;
}

.fyn-word {
  position: relative;
  display: inline-block;
  color: var(--text-primary);
}

.brand-logo-text:hover .fyn-word {
  opacity: 0.8;
}

.ubg-tag-word {
  position: relative;
  top: -8px;
  padding: 5px 10px;
  border: none;
  border-radius: var(--radius-xs);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.center-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  background: var(--bg-input);
}

.center-search-wrap:focus-within {
  border-color: var(--accent);
}

.center-search-input {
  flex: 1;
  padding: 14px 12px 14px 18px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
}

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

.center-go-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 22px;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.center-go-btn:hover {
  opacity: 0.85;
}


.catalog-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px 60px;
}

.catalog-view.hidden {
  display: none;
}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.catalog-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.catalog-title-wrap h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
}

.catalog-count-badge {
  padding: 3px 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  background: var(--bg-card-hover);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 11.5px;
}

.catalog-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  padding: 7px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text-muted);
}

.catalog-search-wrap:focus-within {
  border-color: var(--accent);
}

.catalog-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
}

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

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 18px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--bg-card);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.game-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.card-thumbnail {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-input);
}

.card-vector-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-primary);
}

.card-vector-icon svg {
  width: 100%;
  height: 100%;
}

.card-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-input);
}

.card-overlay-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.game-card:hover .card-overlay-play {
  opacity: 1;
}

.card-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}

.card-play-btn svg {
  width: 16px;
  height: 16px;
  margin-left: 2px;
}

.card-fav-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  background: rgba(0, 0, 0, 0.85);
  color: #666;
  cursor: pointer;
  transition: var(--transition-fast);
}

.card-fav-btn svg {
  width: 13px;
  height: 13px;
}

.card-fav-btn:hover {
  border-color: #ffffff;
  color: #ffffff;
}

.card-fav-btn.active {
  border-color: #ffffff;
  background: #262626;
  color: #ffffff;
}

.card-title {
  overflow: hidden;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.settings-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.settings-view.hidden {
  display: none;
}

.settings-header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.settings-header h2 {
  margin-bottom: 4px;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
}

.settings-header p {
  color: var(--text-muted);
  font-size: 12px;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-label {
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
}


.font-selector-grid,
.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.font-card,
.theme-card {
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
}

.font-card:hover,
.theme-card:hover {
  border-color: var(--text-primary);
}

.font-card.active,
.theme-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-primary);
  font-weight: 600;
}

.font-card strong,
.theme-card strong {
  display: block;
  font-size: 13px;
}

.font-card small,
.theme-card small {
  font-size: 11px;
  opacity: 0.75;
}

.theme-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  vertical-align: -2px;
}

.cloak-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cloak-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-card);
  text-align: left;
  cursor: pointer;
}

.cloak-card img {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 3px;
}

.cloak-card:hover {
  border-color: var(--text-primary);
}

.cloak-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.cloak-card strong {
  display: block;
  color: var(--text-primary);
  font-size: 12px;
}

.cloak-card small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.setting-group input, .setting-group select {
  padding: 9px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  outline: none;
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
}

.setting-group input:focus, .setting-group select:focus {
  border-color: var(--accent);
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.credits-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.credit-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-card);
}

.credit-card:hover {
  border-color: var(--accent);
}

.credit-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-logo);
  font-size: 18px;
  font-weight: 800;
}

.credit-meta strong {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
}

.credit-meta strong a {
  color: inherit;
  text-decoration: none;
}

.credit-meta strong a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.credit-tags {
  display: flex;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.credit-tag {
  padding: 2px 9px;
  border: 1px solid var(--border-medium);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.credit-tag.tag-founder {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

@media (max-width: 560px) {
  .credits-list {
    grid-template-columns: 1fr;
  }
}

.btn-action {
  padding: 9px 20px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-action:hover {
  opacity: 0.85;
}

.btn-ghost {
  padding: 9px 16px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
}

.btn-ghost:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  background: var(--bg-black);
}

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

.player-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-chrome);
}

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

.player-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-card-hover);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
}

.player-back-btn:hover {
  border-color: var(--text-primary);
}

.player-title {
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-card-hover);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
}

.player-btn:hover {
  border-color: var(--text-primary);
}

.player-stage-wrap {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  background: var(--bg-black);
}

.player-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.player-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000000;
}

.player-loading {
  position: absolute;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
}

.player-loading.hidden,
.player-blocked.hidden {
  display: none;
}

.player-blocked {
  position: absolute;
  z-index: 5;
  max-width: 420px;
  margin: 0 16px;
  padding: 20px 22px;
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  background: var(--bg-card-hover);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  text-align: center;
}

.player-blocked p {
  margin-bottom: 8px;
}

.player-blocked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}


.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  background: var(--bg-card-hover);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12px;
}

.toast svg {
  width: 14px;
  height: 14px;
}

body[data-density="compact"] .games-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

body[data-density="compact"] .card-title {
  font-size: 12px;
}

body[data-motion="off"] *,
body[data-motion="off"] *::before,
body[data-motion="off"] *::after {
  animation: none !important;
  transition: none !important;
}

body[data-theme="light"] .card-fav-btn {
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  border-color: rgba(0, 0, 0, 0.15);
}

body[data-theme="light"] .card-overlay-play {
  background: rgba(255, 255, 255, 0.6);
}

body[data-theme="light"] .player-container iframe {
  background: #ffffff;
}

@media (max-width: 760px) {
  .side-nav { width: 60px; padding: 14px 8px 8px; }
  .nav-item { justify-content: center; padding: 10px 0; }
  .nav-item span { display: none; }
  .nav-brand { justify-content: center; margin-bottom: 14px; }
  .nav-brand-tag { display: none; }
  .nav-footer { justify-content: center; }
  body[data-layout="side"] #app-main { margin-left: 60px; }
}

@media (max-width: 680px) {
  .brand-logo-text { font-size: 44px; }
  .ubg-tag-word { font-size: 12px; top: -4px; }
  .cloak-grid { grid-template-columns: 1fr; }
  .catalog-header { flex-wrap: wrap; gap: 10px; }
  .catalog-search-wrap { flex: 1; min-width: 160px; }
}
