:root {
  --bg: #080b14;
  --card: #111827;
  --card-2: #151f32;
  --text: #f4f7ff;
  --muted: #95a3bd;
  --line: #263246;
  --blue: #39a7ff;
  --red: #ff4f65;
  --yellow: #ffbd3d;
  --green: #35df9b;
  --shadow: 0 20px 46px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(57, 167, 255, 0.14), transparent 32%),
    radial-gradient(circle at 92% 20%, rgba(124, 92, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #070a12 0%, #0b1020 42%, #080b14 100%);
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app {
  max-width: 1180px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 18px 38px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  background: rgba(8, 11, 20, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(95, 119, 160, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #39a7ff, #7c5cff);
  color: #fff;
  font-size: 13px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.icon-btn:hover {
  color: var(--blue);
}

.top-links {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.top-links a,
.top-links button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(95, 119, 160, 0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.top-links a:hover,
.top-links a.active,
.top-links button:hover {
  border-color: rgba(57, 167, 255, 0.6);
  background: rgba(57, 167, 255, 0.14);
  color: var(--blue);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 310px;
  border-radius: 26px;
  border: 1px solid rgba(90, 127, 190, 0.28);
  background:
    radial-gradient(circle at 75% 20%, rgba(57, 167, 255, 0.32), transparent 34%),
    linear-gradient(135deg, #0f172a, #111827 54%, #1a2340);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-content {
  position: relative;
  z-index: 2;
  align-self: end;
  max-width: 560px;
  padding: 34px;
}

.hero-content p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  font-weight: 800;
}

.hero h1 {
  max-width: 520px;
  margin: 0;
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
}

.primary-btn {
  background: #fff;
  color: var(--blue);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-gamepiece {
  position: absolute;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.piece-a {
  top: 42px;
  right: 90px;
  width: 142px;
  height: 142px;
  background: linear-gradient(135deg, #ffbd3d, #ff4f65);
  transform: rotate(10deg);
}

.piece-b {
  right: 250px;
  bottom: 54px;
  width: 94px;
  height: 94px;
  background: linear-gradient(135deg, #19b77a, #50e3c2);
  transform: rotate(-14deg);
}

.piece-c {
  right: 34px;
  bottom: 30px;
  width: 118px;
  height: 118px;
  background: linear-gradient(135deg, #fff, #96c5ff);
  transform: rotate(22deg);
}

.section-block {
  margin-top: 24px;
}

.section-block[hidden] {
  display: none;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 23px;
}

.section-head button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--blue);
  padding: 0 14px;
  font-weight: 800;
}

.section-head button svg {
  width: 16px;
  height: 16px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

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

.company-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent),
    var(--card);
  padding: 16px 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.company-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--company-a), var(--company-b));
}

.company-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--company-a), var(--company-b));
  color: #fff;
}

.company-icon svg {
  width: 30px;
  height: 30px;
}

.company-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.company-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.company-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  border-radius: 999px;
  background: rgba(57, 167, 255, 0.13);
  color: var(--blue);
  padding: 0 14px;
  font-weight: 900;
}

.company-card button svg {
  width: 16px;
  height: 16px;
}

.company-card:hover {
  border-color: rgba(22, 119, 255, 0.24);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(24, 34, 58, 0.12);
}

.game-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.game-card:hover {
  border-color: rgba(22, 119, 255, 0.24);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(24, 34, 58, 0.12);
}

.cover {
  position: relative;
  aspect-ratio: 1 / 0.78;
  background: linear-gradient(135deg, var(--cover-a), var(--cover-b));
}

.cover::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 28%;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(18deg);
}

.cover-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  transform: translate(-50%, -50%) rotate(-8deg);
  backdrop-filter: blur(8px);
}

.cover-icon svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.8;
}

.cover::after {
  content: attr(data-label);
  position: absolute;
  left: 16px;
  bottom: 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 28px;
  font-weight: 900;
}

.game-info {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.game-info h3 {
  margin: 0;
  font-size: 17px;
}

.game-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.game-info button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.game-info button:hover,
.rank-item button:hover,
.section-head button:hover {
  filter: brightness(0.96);
}

.game-info button svg,
.rank-item button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  background: var(--card);
  padding: 12px;
  box-shadow: 0 8px 22px rgba(24, 34, 58, 0.06);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 189, 61, 0.16);
  color: #c87a00;
  font-weight: 900;
}

.rank-item h3,
.rank-item p {
  margin: 0;
}

.rank-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.rank-item button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border-radius: 999px;
  background: rgba(57, 167, 255, 0.13);
  color: var(--blue);
  padding: 0 14px;
  font-weight: 900;
}

.empty-state {
  border: 1px dashed #33435d;
  border-radius: 18px;
  background: var(--card);
  color: var(--muted);
  padding: 20px;
  text-align: center;
  font-weight: 800;
}

.search-panel,
.menu-drawer,
.policy-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(15, 23, 42, 0.44);
  backdrop-filter: blur(10px);
}

.search-panel[hidden],
.menu-drawer[hidden],
.policy-panel[hidden] {
  display: none;
}

.search-box {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  width: min(620px, calc(100% - 28px));
  margin: 78px auto 0;
  border-radius: 20px;
  background: var(--card);
  padding: 14px;
  box-shadow: var(--shadow);
}

.search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.search-box button,
.drawer-close {
  min-height: 38px;
  border-radius: 12px;
  background: rgba(57, 167, 255, 0.13);
  color: var(--blue);
  padding: 0 14px;
  font-weight: 900;
}

.drawer-card,
.policy-card {
  display: grid;
  gap: 12px;
  width: min(360px, calc(100% - 28px));
  margin: 76px auto 0;
  border-radius: 24px;
  background: var(--card);
  padding: 20px;
  box-shadow: var(--shadow);
}

.policy-card {
  width: min(680px, calc(100% - 28px));
}

.drawer-card h2 {
  margin: 0 0 4px;
}

.policy-card h2 {
  margin: 0;
}

.policy-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.drawer-card > button:not(.drawer-close) {
  min-height: 48px;
  border-radius: 14px;
  background: var(--card-2);
  color: var(--text);
  text-align: left;
  padding: 0 14px;
  font-weight: 900;
}

.drawer-close {
  justify-self: end;
}

.legal-footer {
  display: grid;
  gap: 14px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding: 22px 0 0;
  color: var(--muted);
}

.legal-footer p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legal-actions button {
  min-height: 38px;
  border-radius: 999px;
  background: rgba(57, 167, 255, 0.13);
  color: var(--blue);
  padding: 0 16px;
  font-weight: 900;
}

.legal-page {
  max-width: 980px;
}

.policy-doc {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    var(--card);
  padding: 34px;
  box-shadow: var(--shadow);
}

.doc-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.policy-doc h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.15;
}

.doc-updated {
  margin: 10px 0 24px;
  color: var(--muted);
  font-weight: 800;
}

.policy-doc section {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
}

.policy-doc h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.policy-doc p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

@media (max-width: 920px) {
  .app {
    max-width: 760px;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero h1 {
    font-size: 38px;
  }
}

@media (max-width: 640px) {
  .app {
    padding: 0 12px 30px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: auto;
    padding: 10px 0 12px;
  }

  .brand {
    font-size: 15px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 12px;
  }

  .top-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 8px;
    overflow: visible;
  }

  .top-links a,
  .top-links button {
    justify-content: center;
    min-height: 40px;
    padding: 0 10px;
    font-size: 12px;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

  .hero {
    min-height: 250px;
    border-radius: 20px;
  }

  .policy-doc {
    padding: 22px 18px;
  }

  .policy-doc h1 {
    font-size: 28px;
  }

  .hero-content {
    max-width: none;
    padding: 22px;
  }

  .hero-content p {
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .hero h1 {
    font-size: 30px;
  }

  .piece-a {
    top: 26px;
    right: 20px;
    width: 92px;
    height: 92px;
    border-radius: 18px;
  }

  .piece-b {
    right: 126px;
    bottom: 98px;
    width: 62px;
    height: 62px;
    border-radius: 16px;
  }

  .piece-c {
    right: 26px;
    bottom: 70px;
    width: 70px;
    height: 70px;
    border-radius: 16px;
  }

  .section-block {
    margin-top: 20px;
  }

  .section-head {
    align-items: flex-start;
  }

  .section-head h2 {
    font-size: 20px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

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

  .company-card {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    border-radius: 16px;
    padding: 14px;
  }

  .company-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .company-icon svg {
    width: 25px;
    height: 25px;
  }

  .company-card h3 {
    font-size: 15px;
    overflow-wrap: anywhere;
  }

  .company-card p {
    font-size: 12px;
  }

  .company-card button {
    grid-column: 1 / -1;
    min-height: 42px;
    width: 100%;
  }

  .game-info {
    padding: 12px;
  }

  .game-card {
    border-radius: 16px;
  }

  .cover {
    aspect-ratio: 1 / 0.64;
  }

  .cover::after {
    font-size: 24px;
  }

  .game-info h3 {
    font-size: 16px;
  }

  .game-info p {
    overflow-wrap: anywhere;
  }

  .rank-item {
    grid-template-columns: 38px 1fr auto;
  }

  .legal-footer {
    margin-top: 26px;
    padding-top: 18px;
  }
}

@media (max-width: 420px) {
  .app {
    padding-inline: 10px;
  }

  .hero {
    min-height: 230px;
  }

  .hero-content {
    padding: 18px;
  }

  .hero h1 {
    font-size: 27px;
  }

  .top-links a,
  .top-links button {
    font-size: 11px;
  }

  .company-card {
    padding: 12px;
  }

  .policy-doc {
    border-radius: 18px;
  }
}
