:root {
  --page: #090914;
  --page-2: #101023;
  --panel: #24243f;
  --panel-2: #2a2a48;
  --panel-3: #1e1f36;
  --gold: #ffe100;
  --gold-2: #ffd200;
  --text: #eaf0ff;
  --muted: #bec6dd;
  --quiet: #7c849c;
  --red: #ff6259;
  --orange: #ff642d;
  --teal: #53c8c0;
  --teal-2: #42ac9d;
  --shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--page);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top-hero {
  min-height: 306px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 82px;
  background: #090914;
}

.banner {
  width: min(803px, calc(100vw - 42px));
  height: auto;
}

.notice-bar {
  min-height: 66px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px 16px;
  color: var(--gold);
  background: linear-gradient(180deg, #23243d 0%, #272841 100%);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.notice-bar p {
  margin: 0;
}

.wechat-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.copy-btn {
  min-width: 74px;
  height: 27px;
  padding: 0 12px;
  color: #4a3200;
  background: var(--gold-2);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 900;
}

main {
  padding-bottom: 44px;
}

.search-wrap {
  width: 100%;
  padding: 15px 8px 29px;
}

#gameSearch {
  width: 100%;
  height: 42px;
  padding: 0 18px;
  color: var(--text);
  background: #292a43;
  border: 1px solid rgba(255, 225, 0, 0.32);
  border-radius: 24px;
  box-shadow:
    0 0 16px rgba(255, 225, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  outline: none;
}

#gameSearch::placeholder {
  color: #788095;
}

#gameSearch:focus {
  border-color: rgba(255, 225, 0, 0.78);
  box-shadow:
    0 0 22px rgba(255, 225, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.recommend-panel,
.game-list,
.empty-state,
.footer-note {
  width: min(800px, calc(100vw - 32px));
  margin-inline: auto;
}

.recommend-panel {
  margin-bottom: 14px;
  padding: 17px 15px 16px;
  background: linear-gradient(180deg, #24243e 0%, #24233d 100%);
  border-radius: 0 0 10px 10px;
  box-shadow: var(--shadow);
}

.recommend-panel h2 {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 17px;
}

.app-item {
  display: grid;
  grid-template-columns: 55px 1fr 154px;
  align-items: center;
  min-height: 70px;
  padding: 9px 11px;
  background: #292944;
  border-radius: 8px;
}

.app-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 10px;
}

.app-item h3,
.app-item p,
.game-card h2,
.game-card p {
  margin: 0;
}

.app-item h3 {
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
}

.app-item p {
  margin-top: 2px;
  color: #d7dff4;
  font-size: 12px;
  line-height: 1.25;
}

.app-item button {
  height: 24px;
  color: #111;
  background: linear-gradient(180deg, #ffea35, #ffda28);
  border-radius: 15px;
  font-size: 12px;
  font-weight: 800;
}

.game-list {
  display: grid;
  gap: 15px;
}

.game-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 13px;
  min-height: 165px;
  padding: 16px;
  background: linear-gradient(180deg, #262640 0%, #24243e 100%);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.game-card[hidden] {
  display: none;
}

.game-card > img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
}

.game-info {
  min-width: 0;
}

.game-card h2 {
  color: var(--gold);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 900;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 11px;
}

.tags span {
  min-height: 18px;
  padding: 2px 8px;
  color: #191919;
  background: var(--gold);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.game-card p {
  min-height: 41px;
  color: #d8dff4;
  font-size: 14px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 11px;
}

.actions button {
  height: 34px;
  color: #fff;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.download {
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.benefit {
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
}

.actions button:hover,
.app-item button:hover,
.copy-btn:hover {
  filter: brightness(1.06);
}

.empty-state {
  margin-top: 20px;
  padding: 20px;
  color: #8f96ad;
  text-align: center;
}

.footer-note {
  margin-top: 31px;
  color: #585e72;
  font-size: 13px;
  text-align: center;
}

.back-top {
  position: fixed;
  right: 26px;
  bottom: 70px;
  z-index: 10;
  width: 51px;
  height: 51px;
  color: #fff;
  background: #43bfb5;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  min-width: 180px;
  max-width: calc(100vw - 40px);
  padding: 10px 16px;
  color: #171717;
  background: var(--gold);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
  font-weight: 900;
  text-align: center;
  transform: translate(-50%, 120px);
  opacity: 0;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 860px) {
  .top-hero {
    min-height: 230px;
    padding-top: 54px;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-item {
    grid-template-columns: 55px 1fr 110px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 13px;
  }

  .top-hero {
    min-height: 150px;
    padding-top: 34px;
  }

  .notice-bar {
    min-height: 74px;
  }

  .wechat-line {
    flex-wrap: wrap;
    gap: 6px;
  }

  .recommend-panel,
  .game-list,
  .empty-state,
  .footer-note {
    width: min(100% - 16px, 800px);
  }

  .app-item {
    grid-template-columns: 48px 1fr 80px;
    gap: 8px;
    padding: 8px;
  }

  .app-item img {
    width: 44px;
    height: 44px;
  }

  .app-item p {
    display: none;
  }

  .game-card {
    grid-template-columns: 70px 1fr;
    gap: 10px;
    min-height: 0;
    padding: 12px;
  }

  .game-card > img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
  }

  .game-card h2 {
    font-size: 16px;
  }

  .tags {
    gap: 5px;
    margin-bottom: 8px;
  }

  .tags span {
    font-size: 11px;
  }

  .game-card p {
    min-height: 0;
    font-size: 12px;
  }

  .actions {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .actions button {
    height: 31px;
    font-size: 13px;
  }

  .back-top {
    right: 16px;
    bottom: 58px;
    width: 45px;
    height: 45px;
    font-size: 12px;
  }
}
