:root {
  --page-bg: #0f0f1a;
  --panel-bg: #202536;
  --yellow: #f8d44d;
  --muted: #999;
  --line: rgba(255, 255, 255, .6);
  --orange-start: #ff7b35;
  --orange-end: #ff5f4e;
  --green: #00cc7d;
  --main-color: #26051f;
  --sub-color: #2b2228;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--page-bg);
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  border: 0;
  outline: 0;
  background: none;
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
}

ul {
  list-style: none;
}

[hidden] {
  display: none !important;
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 750px;
  height: 100%;
  margin: 0 auto;
}

.header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 70px;
  background: var(--page-bg);
  box-shadow: 0 0 5px rgba(0, 0, 0, .2);
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: 10px;
}

.app-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: #e7e7e7;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand .app-icon {
  margin-right: 10px;
}

.brand p {
  color: var(--yellow);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.search-trigger {
  position: relative;
  width: 170px;
  height: 30px;
  margin-right: 10px;
  padding: 0 38px 0 10px;
  overflow: hidden;
  border-radius: 100px;
  background: #f3f3f3;
  color: #999;
  text-align: left;
}

.search-trigger span {
  display: block;
  overflow: hidden;
  line-height: 30px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-icon {
  position: absolute;
  top: 5px;
  right: 4px;
  width: 22px;
  height: 22px;
}

.search-icon::before {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 9px;
  height: 9px;
  border: 2px solid #adadad;
  border-radius: 50%;
  content: "";
}

.search-icon::after {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 6px;
  height: 2px;
  border-radius: 2px;
  background: #adadad;
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.close-search {
  margin-right: 10px;
  padding: 10px 0;
  font-size: 14px;
  text-decoration: underline;
  white-space: nowrap;
}

.player-notice {
  display: flex;
  height: 50px;
  align-items: center;
  gap: 10px;
  margin: 0 10px 7px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid rgba(248, 212, 77, .28);
  border-radius: 9px;
  background: linear-gradient(110deg, rgba(248, 212, 77, .1), rgba(32, 37, 54, .9));
}

.box-intro {
  max-width: 38%;
  flex: 0 1 auto;
  overflow: hidden;
  color: var(--yellow);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-trigger {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.announcement-title {
  max-width: 110px;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-preview {
  overflow: hidden;
  color: #b9bdc9;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-more {
  flex: 0 0 auto;
  color: var(--yellow);
  font-size: 11px;
  white-space: nowrap;
}

.quick-links {
  width: auto;
  height: 90px;
  margin: 0 10px 10px;
}

.quick-links ul {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  overflow-x: auto;
  padding-top: 10px;
  scrollbar-width: none;
}

.quick-links ul::-webkit-scrollbar {
  display: none;
}

.quick-links li {
  width: 70px;
  overflow: hidden;
  border-radius: 10px;
}

.quick-link {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
  text-align: left;
}

.quick-link img {
  width: 100%;
  height: auto;
}

.quick-links li.nav-quick-item {
  width: 78px;
  flex: 0 0 78px;
  overflow: visible;
}

.nav-quick-link {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  text-align: center;
}

.nav-quick-icon {
  display: grid;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 12px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  place-items: center;
}

.nav-quick-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-quick-title {
  display: block;
  width: 100%;
  overflow: hidden;
  color: #e8e8ee;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content {
  display: flex;
  height: calc(100vh - 170px);
  height: calc(100dvh - 170px);
}

.has-player-notice .content {
  height: calc(100vh - 227px);
  height: calc(100dvh - 227px);
}

.category-panel {
  width: 80px;
  height: 100%;
  flex: 0 0 80px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.category-panel::-webkit-scrollbar,
.game-panel::-webkit-scrollbar,
.search-list-wrap::-webkit-scrollbar {
  display: none;
}

.category-panel li {
  position: relative;
  height: 40px;
  padding-left: 15px;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  line-height: 40px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.category-panel li .active-line {
  display: none;
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 3px;
  border-radius: 3px;
  background: var(--main-color);
}

.category-panel li.is-active {
  background: var(--panel-bg);
  font-weight: 700;
}

.category-panel li.is-active .active-line {
  display: block;
}

.category-panel li .rebate-badge {
  display: none;
  position: absolute;
  top: 5px;
  left: 5px;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #575bf6;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
}

.category-panel li.has-rebate .rebate-badge {
  display: block;
}

.category-panel li.is-active .rebate-badge {
  display: none;
}

.game-panel {
  height: 100%;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--panel-bg);
  scrollbar-width: none;
}

.category-title {
  height: 41px;
  margin-left: 10px;
  padding-left: 10px;
  border-bottom: 1px solid #fff;
  color: var(--yellow);
  font-size: 16px;
  font-weight: 700;
  line-height: 40px;
}

.game-list {
  margin-left: 10px;
}

.game-list li {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 10px;
  padding-bottom: 10px;
  cursor: pointer;
}

.game-list li::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 60px;
  height: .01rem;
  background: var(--line);
  content: "";
}

.game-list li .app-icon {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
}

.game-list li .info {
  min-width: 0;
  margin-left: 6px;
}

.info .name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info .tags {
  margin: 3px 0;
  overflow: hidden;
  white-space: nowrap;
}

.info .tags span {
  display: inline-block;
  margin: 0 3px 3px 0;
  padding: 1px 3px;
  border-radius: 20px;
  background: var(--sub-color);
  color: #fff;
  font-size: 10px;
  line-height: 1.15;
}

.info .tags span:first-child {
  background: var(--main-color);
}

.info .tags span.company-tag {
  border: 0;
  background: #26051f;
  color: #fff;
}

.info .tags span.meta-tag {
  background: #2b2228;
  color: #fff;
}

.info .tags span.invite-code-label,
.info .tags span.invite-code-value {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.info .tags span.invite-code-label {
  margin-right: 4px;
  color: #fff;
  font-weight: 500;
}

.info .tags span.invite-code-value {
  margin-right: 7px;
  color: #fff;
  font-weight: 500;
}

.info .time {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
}

.game-list li .game-download {
  width: 50px;
  height: 25px;
  flex: 0 0 50px;
  margin: 0 10px 0 auto;
  border-radius: 3px;
  background: linear-gradient(92deg, var(--orange-start), var(--orange-end));
  color: #fff;
  font-size: 13px;
  line-height: 25px;
  text-align: center;
}

.note {
  padding: 20px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.15;
  text-align: center;
}

.tool-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 50%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 750px;
  padding: 10px;
  background: rgba(0, 0, 0, .8);
  transform: translateX(-50%);
}

.close-app-bar {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  padding: 0;
  color: #c8c8c8;
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 18px;
}

.tool-bar .app-info {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-left: 10px;
}

.tool-bar .app-info .app-icon {
  margin-right: 10px;
}

.tool-bar .app-info .info {
  min-width: 0;
}

.tool-bar .app-info p {
  margin-bottom: 5px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.tool-bar .app-info span {
  display: block;
  overflow: hidden;
  color: #ccc;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-app {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 35px;
  flex: 0 0 96px;
  margin-left: auto;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  white-space: nowrap;
}

.download-icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 4px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.download-icon::before {
  position: absolute;
  top: 2px;
  left: 5px;
  width: 2px;
  height: 7px;
  border-radius: 2px;
  background: #fff;
  content: "";
}

.download-icon::after {
  position: absolute;
  top: 6px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  content: "";
  transform: rotate(45deg);
}

.search-view {
  position: fixed;
  top: 70px;
  bottom: 0;
  left: 50%;
  z-index: 60;
  width: 100%;
  max-width: 750px;
  padding-top: 10px;
  background: var(--page-bg);
  transform: translateX(-50%);
}

.search-box {
  position: relative;
  height: 30px;
  margin: 0 10px;
  overflow: hidden;
  border-radius: 100px;
  background: #f3f3f3;
}

.search-box input {
  width: 100%;
  height: 30px;
  padding: 0 70px 0 10px;
  border-radius: 100px;
  background: transparent;
  color: #222;
  font-size: 13px;
}

.search-box input::-webkit-search-cancel-button {
  display: none;
}

.search-submit {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 60px;
  height: 26px;
  border-radius: 100px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 26px;
}

.search-list-wrap {
  position: absolute;
  top: 50px;
  right: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.hot-searches {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 10px 2px;
}

.hot-search-label {
  flex: 0 0 auto;
  padding-top: 4px;
  color: #aeb2bf;
  font-size: 11px;
}

.hot-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hot-search-tag {
  min-height: 24px;
  padding: 3px 10px;
  border: 1px solid rgba(248, 212, 77, .32);
  border-radius: 100px;
  background: rgba(248, 212, 77, .08);
  color: var(--yellow);
  font-size: 11px;
  line-height: 16px;
}

.hot-searches:not([hidden]) + .search-list-wrap {
  top: 94px;
}

.search-game-list {
  margin-right: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .6);
}

.game-modal-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 330px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  color: #000;
  transform: translate(-50%, -50%);
}

.game-modal-title {
  position: relative;
  height: 45px;
  background: var(--main-color);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 45px;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 30px;
  height: 30px;
  padding: 0;
  background: url("assets/close.png") no-repeat center / 30px 30px;
  color: transparent;
  font-size: 0;
}

.game-modal-body {
  padding-bottom: 20px;
}

.game-detail {
  display: flex;
  align-items: center;
  margin: 10px 10px 20px;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 10px;
}

.game-detail .app-icon {
  width: 80px;
  height: 80px;
  flex-basis: 80px;
}

.game-detail .info {
  min-width: 0;
  margin-left: 10px;
}

.game-detail .info .name {
  color: #000;
  font-size: 16px;
  line-height: 1.15;
}

.game-detail .info .tags span {
  padding: 2px 5px;
}

.game-detail .info .time {
  line-height: 1.15;
}

.company-info {
  margin: 0 10px 20px;
  padding: 0 10px 20px;
  border-bottom: 1px solid #eee;
  color: #333;
  font-size: 13px;
  line-height: 1.5;
}

.company-info:empty {
  display: none;
}

.game-download {
  display: block;
  width: calc(100% - 60px);
  height: 45px;
  margin: 0 30px;
  border-radius: 100px;
  background: var(--main-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 45px;
  text-align: center;
}

.zoom-in {
  animation: zoomIn .5s infinite alternate ease-in-out;
}

@keyframes zoomIn {
  from {
    transform: scale(.9);
  }
  to {
    transform: scale(1);
  }
}

.info-modal {
  z-index: 210;
}

.info-modal-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 330px;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(#e1edfe, #fff, #fff, #fff);
  color: #000;
  transform: translate(-50%, -50%);
}

.info-modal-title {
  position: relative;
  margin: 0 20px;
  padding: 20px 0 15px;
  font-size: 20px;
  font-weight: 700;
}

.info-modal-title::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 4px;
  background: #000;
  content: "";
}

.info-modal-body {
  margin: 20px;
  padding-bottom: 20px;
}

.info-modal-body p {
  margin-bottom: 20px;
  color: #333;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.info-modal-image {
  display: block;
  width: min(100%, 220px);
  max-height: 260px;
  margin: 0 auto 16px;
  border-radius: 8px;
  object-fit: contain;
}

.info-modal-confirm {
  display: block;
  width: calc(100% - 40px);
  height: 45px;
  margin: 0 20px;
  border-radius: 100px;
  background: var(--main-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.info-modal-close {
  display: block;
  margin: 15px auto 0;
  color: #999;
  font-size: 13px;
}

.toast {
  position: fixed;
  bottom: 92px;
  left: 50%;
  z-index: 400;
  max-width: calc(100vw - 40px);
  padding: 9px 14px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .86);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .2s ease, transform .2s ease;
}

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

@media (max-width: 360px) {
  .brand p {
    font-size: 15px;
  }

  .search-trigger {
    width: 140px;
  }

  .search-trigger span {
    font-size: 12px;
  }

  .player-notice {
    gap: 7px;
    padding: 0 9px;
  }

  .box-intro {
    max-width: 30%;
  }

  .announcement-title {
    max-width: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zoom-in {
    animation: none;
  }

  .toast {
    transition: none;
  }
}
