* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  color: var(--text);
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Microsoft YaHei',
    sans-serif;
  background-color: var(--bg);
  background-image: var(--page-pattern);
  background-size: 30px 30px;
  background-position: -4px -3px;
}
html {
  --bg: #fff;
  --panel: #fff;
  --text: #151724;
  --muted: #7b8190;
  --line: #e8e9ef;
  --page-pattern: none;
  --accent: #574ff0;
  --shadow: 0 10px 30px #1e294410;
}
html[data-theme='dark'] {
  --bg: #000;
  --panel: #172031;
  --text: #eef1f7;
  --muted: #96a2b8;
  --line: #2b3547;
  --page-pattern: radial-gradient(circle, #353535 1px, #242424 2px, transparent 3px);
  --shadow: 0 10px 30px #0003;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  color: inherit;
  background: transparent;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #9b92ff;
  outline-offset: 3px;
}
input,
textarea,
select {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 12px;
  outline: none;
  width: 100%;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #574ff014;
}
textarea {
  resize: vertical;
  min-height: 110px;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h1 {
  line-height: 1.3;
}
h2 {
  font-size: 23px;
}
h3 {
  font-size: 19px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.primary {
  background: linear-gradient(135deg, #5265ee, #623fe8);
  color: #fff;
  border-radius: 10px;
  padding: 11px 22px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.secondary {
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.container {
  max-width: 1380px;
  margin: auto;
  padding: 0 36px;
}
.loading,
.empty {
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
}
.error {
  color: #e05062;
  padding: 12px;
  background: #ed536513;
  border-radius: 8px;
}
.pill {
  font-size: 11px;
  color: var(--accent);
  background: #5b51ef0c;
  border: 1px solid #5b51ef1e;
  padding: 3px 10px;
  border-radius: 30px;
}
.topbar {
  height: 64px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}
.topbar .logo {
  width: 104px;
  display: flex;
  flex-shrink: 0;
}
.logo img {
  max-width: 100%;
  max-height: 38px;
  object-fit: contain;
}
.logo-text {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent);
}
.topbar nav {
  display: flex;
  gap: 30px;
  align-items: center;
  flex: 1;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}
.topbar nav a:hover {
  color: var(--accent);
}
.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.nav-actions .primary {
  padding: 9px 18px;
  border-radius: 30px;
  font-size: 12px;
}
.nav-search {
  display: flex;
  width: 160px;
  height: 32px;
  border-radius: 30px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.nav-search input {
  background: transparent;
  border: 0;
  padding: 5px 12px;
  font-size: 12px;
  min-width: 0;
}
.nav-search button {
  padding: 4px 12px 4px 0;
}
.theme-toggle {
  font-size: 23px;
  padding: 4px 12px;
}
.menu-toggle {
  display: none;
  font-size: 24px;
}
.home .topbar {
  background: #070709;
  color: #fff;
  border-color: #ffffff0a;
}
.hero {
  position: relative;
  min-height: 0;
  color: white;
  text-align: center;
  background: #080809;
  background-position: center;
  background-size: cover;
  padding: 25px 20px 70px;
  isolation: isolate;
}
.hero:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(#0001, #0003);
  z-index: -1;
}
.hero:after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 30px;
  background: var(--bg);
  clip-path: polygon(
    0 40%,
    8% 10%,
    22% 55%,
    36% 25%,
    50% 70%,
    65% 24%,
    80% 50%,
    92% 15%,
    100% 42%,
    100% 100%,
    0 100%
  );
}
.announcement {
  max-width: 980px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto 14px;
  padding: 6px 8px;
  border: 1px solid #ffffff36;
  background: #11151dd9;
  box-shadow: 0 5px 14px #0003;
  border-radius: 30px;
  font-size: 12px;
  text-align: left;
}
.announcement .badge {
  border-radius: 20px;
  background: var(--accent);
  padding: 2px 10px;
  font-weight: bold;
}
.announcement .announcement-text {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.announcement button {
  background: #ffffff16;
  border-radius: 50%;
  width: 24px;
  height: 24px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 950;
  text-shadow: 3px 4px 0 #0008;
  margin: 14px 0 5px;
  letter-spacing: -1px;
}
.hero .subtitle {
  font-size: 19px;
  font-weight: 650;
  text-shadow: 0 2px 5px #000;
  margin-bottom: 26px;
}
.hero-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  width: min(600px, 100%);
  height: 54px;
  background: #15151d92;
  backdrop-filter: blur(16px);
  border: 1px solid #ffffff45;
  border-radius: 40px;
  padding: 6px 8px 6px 20px;
}
.hero-search input {
  flex: 1;
  width: 0;
  color: #fff;
  border: 0;
  background: none;
  padding: 0;
  box-shadow: none;
}
.hero-search input::placeholder {
  color: #e5e5ed;
}
.hero-search .primary {
  border-radius: 30px;
  padding: 9px 20px;
}
.search-glyph {
  font-size: 23px;
}
.stats {
  display: flex;
  justify-content: center;
  max-width: 405px;
  margin: 40px auto 0;
  background: #1c1c1cc9;
  border: 1px solid #ffffff20;
  border-radius: 24px;
  padding: 14px 10px;
  backdrop-filter: blur(8px);
}
.stats div {
  width: 33.33%;
  border-right: 1px solid #ffffff20;
}
.stats div:last-child {
  border: 0;
}
.stats strong {
  display: block;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.4;
}
.stats div:nth-child(2) strong {
  color: #ffbd4d;
}
.stats span {
  font-size: 11px;
  color: #ddd;
}
.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
  margin-top: -18px;
  margin-bottom: 48px;
  z-index: 2;
}
.quick-link {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  padding: 17px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 22px #1c28441b;
}
.quick-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: white;
  background: linear-gradient(135deg, #405de7, #6137ef);
  box-shadow: 0 7px 15px #564be83d;
}
.quick-link:nth-child(2) .quick-icon {
  background: linear-gradient(135deg, #18bae0, #0bb19d);
}
.quick-link:nth-child(3) .quick-icon {
  background: linear-gradient(135deg, #7e25e5, #e13ad1);
}
.quick-link:nth-child(4) .quick-icon {
  background: linear-gradient(135deg, #faad15, #ed7d17);
}
.quick-link strong {
  font-size: 16px;
  display: block;
  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick-link small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.go {
  font-size: 10px;
  position: absolute;
  right: 14px;
  top: 20px;
  background: #594eee;
  color: white;
  border-radius: 30px;
  padding: 2px 9px;
}
.home-layout,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
}
.section-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
}
.section-bar h2 {
  margin: 0;
}
.tabs {
  display: inline-flex;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 4px;
  border-radius: 12px;
}
.tabs button {
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.tabs .active {
  background: var(--accent);
  color: white;
  box-shadow: 0 3px 8px #554fec30;
}
.more {
  color: var(--muted);
  font-size: 12px;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.game-card {
  display: block;
  overflow: hidden;
  position: relative;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px #1c284422;
}
.cover-wrap {
  position: relative;
  aspect-ratio: 460/215;
  overflow: hidden;
  background: #171a25;
}
.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.game-card:hover img {
  transform: scale(1.035);
}
.pin {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 6px;
  background: #6348ed;
  color: #fff;
  padding: 2px 7px;
  font-size: 11px;
}
.heat {
  position: absolute;
  bottom: 9px;
  right: 9px;
  color: #fff;
  background: #0008;
  border-radius: 7px;
  padding: 2px 6px;
  font-size: 11px;
}
.card-info {
  padding: 13px;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 7px;
}
.card-info h3 {
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
  margin: 0 0 9px;
}
.card-footer {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
}
.card-footer .pill {
  font-size: 9px;
  padding: 1px 6px;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.promo {
  border-radius: 18px;
  color: #fff;
  padding: 25px;
  overflow: hidden;
  position: relative;
  min-height: 174px;
  text-align: left;
  background: linear-gradient(140deg, #4f46e5, #7c3aed 48%, #db2777);
}
.promo:after {
  content: '✦';
  position: absolute;
  right: 17px;
  top: 29px;
  opacity: 0.17;
  font-size: 100px;
  line-height: 1;
}
.promo small {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  opacity: 0.8;
}
.promo h3 {
  font-size: 24px;
  margin: 10px 0 8px;
}
.promo p {
  font-size: 12px;
  margin: 0;
  opacity: 0.85;
}
.checkin {
  background: linear-gradient(140deg, #059669, #0d9488 42%, #2563eb);
}
.checkin strong {
  font-size: 34px;
}
.checkin button {
  background: #ffffff27;
  border: 1px solid #ffffff45;
  padding: 7px 18px;
  border-radius: 9px;
  margin-top: 12px;
}
.rank {
  padding: 20px;
}
.rank h3 {
  display: flex;
  justify-content: space-between;
  margin-bottom: 13px;
  font-size: 16px;
}
.rank h3 small {
  color: var(--accent);
  font-size: 11px;
}
.rank-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
}
.rank-tabs button {
  font-size: 11px;
  padding: 6px 10px;
  color: var(--muted);
  border-radius: 8px;
}
.rank-tabs button.active {
  background: #574ff016;
  color: var(--accent);
}
.rank-item {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  align-items: center;
}
.rank-item:last-child {
  border: 0;
}
.rank-item b {
  width: 20px;
  color: var(--muted);
  font-style: italic;
  font-size: 17px;
}
.rank-item:nth-child(-n + 3) b {
  color: #fc8c2a;
}
.rank-item img {
  width: 54px;
  height: 36px;
  object-fit: cover;
  border-radius: 7px;
}
.rank-item span {
  font-size: 11px;
  line-height: 1.4;
}
.rank-item small {
  font-size: 9px;
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.disclaimer {
  text-align: center;
  padding: 50px 30px;
  color: var(--muted);
  margin-top: 35px;
}
.disclaimer h3 {
  font-size: 16px;
  letter-spacing: 5px;
}
.disclaimer p {
  font-size: 12px;
  max-width: 900px;
  margin: auto;
  line-height: 2;
}
.footer-inner {
  max-width: 1380px;
  margin: auto;
  padding: 26px 36px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.footer-inner nav {
  display: flex;
  gap: 20px;
}
.catalog {
  padding-top: 58px;
}
.catalog-hero {
  max-width: 830px;
  text-align: center;
  margin: 0 auto 18px;
  padding: 30px 25px 26px;
  border-radius: 28px;
  background: radial-gradient(ellipse at top, #6355f219, transparent 60%), var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 24px #24334b11;
}
.catalog-hero .quick-icon {
  margin: 0 auto 16px;
  width: 60px;
  height: 60px;
  outline: 8px solid #514ceb10;
}
.catalog-hero h1 {
  font-size: 34px;
  margin: 10px 0 8px;
}
.catalog-hero p {
  color: var(--muted);
  margin: 0 0 16px;
}
.count-pill {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 5px 14px;
  border-radius: 30px;
  color: var(--muted);
  font-size: 12px;
}
.center {
  text-align: center;
}
.filters {
  margin: 18px 0 10px;
  overflow: hidden;
}
.filter-heading {
  font-size: 12px;
  color: var(--muted);
  padding: 9px 15px;
  border-bottom: 1px solid var(--line);
}
.filter-row {
  padding: 10px 15px;
}
.filter-row small {
  display: block;
  color: var(--muted);
  margin-bottom: 7px;
}
.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-buttons button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 11px;
  color: var(--muted);
  font-size: 12px;
}
.filter-buttons .active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.catalog .game-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 25px;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 32px 0 55px;
  color: var(--muted);
  font-size: 12px;
}
.pagination button {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 8px 14px;
  border-radius: 8px;
}
.pagination button.active {
  background: var(--accent);
  color: #fff;
}
.detail {
  padding-top: 34px;
}
.back {
  color: var(--muted);
  font-size: 12px;
}
.detail h1 {
  font-size: 30px;
  margin: 16px 0 10px;
}
.detail-meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 24px;
}
.gallery {
  padding: 0;
  overflow: hidden;
  margin-bottom: 18px;
}
.gallery-stage {
  background: #111;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-stage img,
.gallery-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
}
.gallery-thumbs button {
  width: 90px;
  min-width: 90px;
  height: 50px;
  border-radius: 7px;
  overflow: hidden;
  padding: 0;
  opacity: 0.6;
  border: 2px solid transparent;
}
.gallery-thumbs button.active {
  opacity: 1;
  border-color: var(--accent);
}
.gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.actions {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}
.actions button {
  border: 1px solid var(--line);
  padding: 9px 17px;
  background: var(--panel);
  border-radius: 10px;
  font-size: 12px;
}
.actions button.selected {
  color: var(--accent);
  border-color: var(--accent);
}
.game-summary {
  padding: 23px;
  margin-bottom: 24px;
}
.game-summary p {
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 20px 0;
}
.facts small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.article {
  padding: 26px;
  margin-bottom: 25px;
}
.article h2 {
  font-size: 22px;
  margin-bottom: 22px;
}
.article h3 {
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  margin: 24px 0 12px;
  font-size: 18px;
}
.article p {
  line-height: 1.9;
  white-space: pre-wrap;
}
.download-card {
  padding: 25px;
  position: sticky;
  top: 20px;
}
.download-card .primary {
  width: 100%;
  font-size: 16px;
  padding: 15px;
}
.download-card > a {
  display: block;
  text-align: center;
  margin: 12px 0 25px;
  font-size: 12px;
  color: var(--muted);
}
.resource-fact {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.resource-fact span {
  color: var(--muted);
}
.resource-fact strong {
  font-weight: 500;
}
.download-card h4 {
  margin: 25px 0 10px;
}
.comments {
  padding: 25px;
  margin-bottom: 25px;
}
.comment {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.comment strong {
  font-size: 12px;
}
.comment time {
  color: var(--muted);
  font-size: 10px;
  margin-left: 10px;
}
.comment p {
  margin: 8px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comments textarea {
  margin: 15px 0 10px;
}
.document {
  max-width: 920px;
  margin: 50px auto;
  min-height: 55vh;
  padding: 35px;
}
.document h1 {
  font-size: 30px;
}
.document .prose {
  white-space: pre-wrap;
  line-height: 2;
}
.collections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 35px 0;
}
.collection {
  padding: 32px;
  min-height: 175px;
  background: linear-gradient(135deg, #5b52ee, #ae36cc);
  color: #fff;
}
.collection:nth-child(2n) {
  background: linear-gradient(135deg, #159cab, #3176ef);
}
.collection:nth-child(3n) {
  background: linear-gradient(135deg, #d87125, #d73973);
}
.collection h3 {
  font-size: 25px;
  margin: 15px 0 5px;
}
dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 24px;
  width: min(480px, calc(100% - 30px));
  padding: 35px;
  box-shadow: 0 25px 100px #0005;
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #10142399;
  backdrop-filter: blur(5px);
}
.modal-close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  color: var(--muted);
}
.auth-brand {
  text-align: center;
  margin-bottom: 22px;
}
.auth-brand img {
  width: 125px;
  height: 55px;
  object-fit: contain;
}
.auth-brand h2 {
  margin: 10px 0 5px;
  font-size: 22px;
}
.auth-brand p {
  color: var(--muted);
  font-size: 12px;
}
.auth-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  background: var(--bg);
  border-radius: 12px;
  padding: 5px;
}
.auth-tabs button {
  flex: 1;
  border-radius: 9px;
  padding: 8px;
  color: var(--muted);
}
.auth-tabs button.active {
  background: var(--panel);
  color: var(--accent);
  box-shadow: 0 3px 8px #0001;
}
.auth-form label {
  display: block;
  margin: 13px 0;
}
.auth-form .primary {
  width: 100%;
  margin-top: 15px;
}
.email-code-row {
  display: flex;
  gap: 10px;
}
.email-code-row input {
  flex: 1;
  min-width: 0;
}
.email-code-row button {
  flex-shrink: 0;
  white-space: nowrap;
}
.remember {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.remember input {
  width: auto;
}
.download-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0;
  padding: 18px;
  background: var(--bg);
  border-radius: 14px;
  gap: 12px;
}
.download-option strong {
  display: block;
}
.download-option small {
  color: var(--muted);
}
.qr {
  text-align: center;
}
.qr img {
  width: 220px;
  height: 220px;
  border-radius: 12px;
}
.qr a {
  display: block;
  margin: 12px 0;
}
.qr p {
  font-size: 12px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  background: #232633;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 28px #0003;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  max-width: 90%;
  text-align: center;
}
#toast.show {
  opacity: 1;
}
.admin-wrap {
  max-width: 1250px;
  margin: 35px auto;
  padding: 0 25px;
}
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.admin-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.admin-nav button {
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.admin-nav .active {
  background: var(--accent);
  color: white;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.admin-table th {
  color: var(--muted);
  font-weight: 600;
}
.admin-table img {
  width: 72px;
  height: 38px;
  object-fit: cover;
  border-radius: 5px;
}
.admin-table button {
  color: var(--accent);
  padding: 4px 8px;
}
.admin-editor {
  padding: 25px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-grid label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.form-grid input,
.form-grid textarea,
.form-grid select {
  margin-top: 5px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-grid .check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.form-grid .check input {
  width: auto;
  margin: 0;
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.table-scroll {
  overflow: auto;
}
.upload-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.upload-tools input {
  max-width: 260px;
}
.download-fields {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.download-fields textarea {
  grid-column: 1/-1;
  min-height: 55px;
}
.admin-auth {
  max-width: 420px;
  margin: 80px auto;
  padding: 30px;
}
.admin-auth input {
  margin: 10px 0;
}
.admin-auth button {
  width: 100%;
  margin-top: 15px;
}
.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}
.search-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}
.search-heading form {
  width: min(550px, 100%);
  display: flex;
  gap: 10px;
}
.search-heading input {
  flex: 1;
  min-width: 0;
}
.hero {
  padding-bottom: 28px;
}
.hero h1 {
  font-size: clamp(28px, 4.3vw, 54px);
}
.home .nav-search {
  background: #ffffff16;
  border-color: #ffffff30;
}
.home .nav-search input {
  color: white;
}
.home .nav-search input::placeholder {
  color: #bbb;
}
.filters details {
  border-top: 1px solid var(--line);
  margin: 10px -15px -10px;
  padding: 10px 15px;
}
.filters summary {
  cursor: pointer;
}
.filters details .filter-buttons {
  padding-top: 12px;
}
.quick-link > div {
  min-width: 0;
  flex: 1;
}
.quick-link small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#header {
  position: sticky;
  top: 0;
  z-index: 30;
}
.cover-wrap {
  aspect-ratio: 16/9;
}
.pin {
  background: #ef4757;
}
.heat {
  top: 9px;
  bottom: auto;
}
.category-badge {
  background: #5265ee12;
  color: #5265ee;
  border-radius: 5px;
  padding: 1px 6px;
}
.card-title {
  display: flex;
  gap: 5px;
  align-items: center;
  margin: 8px 0 12px;
}
.card-info .card-title h3 {
  display: block;
  min-height: 0;
  margin: 0;
  flex: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}
.card-title .pill {
  font-size: 8px;
  padding: 1px 5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.size-badge,
.version-badge {
  padding: 1px 7px;
  border-radius: 20px;
  font-size: 10px;
  border: 1px solid #548ade30;
}
.size-badge {
  color: #159a91;
  background: #159a9110;
  border-color: #159a9130;
}
.version-badge {
  color: #5672c8;
  background: #5672c810;
}
.home .game-card {
  border-color: #7569c850;
}
.home .container {
  padding-inline: 22px;
}
@media (min-width: 1500px) {
  .game-card .card-info h3 {
    font-size: 14px;
  }
}
@media (max-width: 1150px) {
  .topbar {
    gap: 20px;
    padding: 0 20px;
  }
  .topbar nav {
    gap: 18px;
    font-size: 12px;
  }
  .nav-search {
    display: none;
  }
  .container {
    padding: 0 25px;
  }
  .quick-link {
    gap: 10px;
    padding: 15px 12px;
  }
  .quick-link strong {
    font-size: 13px;
  }
  .go {
    display: none;
  }
  .home-layout,
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 20px;
  }
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .catalog .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .topbar {
    height: 60px;
    justify-content: space-between;
  }
  .topbar nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--panel);
    color: var(--text);
    padding: 20px;
    white-space: normal;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
  }
  .topbar nav.open {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .nav-actions {
    gap: 0;
  }
  .nav-actions .primary {
    padding: 7px 15px;
  }
  .theme-toggle {
    padding: 4px 10px;
  }
  .container {
    padding: 0 18px;
  }
  .hero {
    padding: 22px 18px 36px;
  }
  .announcement {
    margin-bottom: 18px;
  }
  .hero h1 {
    margin-top: 16px;
    font-size: 32px;
  }
  .hero .subtitle {
    font-size: 14px;
  }
  .stats {
    margin-top: 28px;
    max-width: 330px;
  }
  .stats strong {
    font-size: 28px;
  }
  .quick-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 30px;
  }
  .quick-link strong {
    font-size: 13px;
  }
  .quick-icon {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }
  .quick-link small {
    font-size: 10px;
  }
  .home-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .sidebar .rank {
    grid-column: 1/-1;
  }
  .promo {
    padding: 20px;
    min-height: 155px;
  }
  .promo h3 {
    font-size: 20px;
  }
  .catalog {
    padding-top: 30px;
  }
  .catalog-hero h1 {
    font-size: 28px;
  }
  .catalog .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .section-bar {
    flex-wrap: wrap;
  }
  .section-bar .tabs button {
    padding: 6px 10px;
  }
  .game-grid {
    gap: 14px;
  }
  .footer-inner {
    padding: 24px 18px;
    gap: 15px;
    flex-direction: column;
  }
  .document {
    margin: 25px 18px;
    padding: 25px;
  }
  .collections {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .collection {
    padding: 20px;
  }
  .collection h3 {
    font-size: 22px;
  }
  .detail h1 {
    font-size: 25px;
  }
  .detail .sidebar {
    display: flex;
  }
  .download-card {
    position: static;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .download-fields {
    grid-template-columns: 1fr;
  }
  .download-fields textarea {
    grid-column: auto;
  }
  .admin-wrap {
    padding: 0 15px;
  }
  .admin-top h1 {
    font-size: 24px;
  }
  .admin-nav {
    flex-wrap: wrap;
  }
  .admin-nav button {
    font-size: 12px;
  }
  .hero-search {
    height: 50px;
  }
  .search-heading {
    padding: 0 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
