/* ===== 基础重置与变量 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[v-cloak] {
  display: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  cursor: pointer;
  display: block;
}

/* ===== Header 头部 ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  padding: 0.12rem 0.15rem;
  background: #08979c;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  width: 100%;
  z-index: 10;
  max-width: 768px;
  box-shadow: 0 2px 12px rgba(8, 151, 156, 0.3);
}

header div {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

header div:active {
  opacity: 0.7;
}

header span {
  font-weight: 700;
  font-size: 0.17rem;
  letter-spacing: 0.02em;
}

header img {
  width: 0.24rem;
  transition: transform 0.2s ease;
}

header img:active {
  transform: scale(0.85);
}

/* ===== 主内容区 ===== */
.main {
  padding: 0.15rem 0.08rem;
  margin-top: 0.48rem;
}

/* ===== 标题样式 ===== */
.title {
  font-weight: 700;
  font-size: 0.19rem;
  text-align: center;
  color: #1a1a2e;
  position: relative;
  padding-bottom: 0.12rem;
  letter-spacing: 0.04em;
}

.title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0.4rem;
  height: 3px;
  background: #08979c;
  border-radius: 2px;
}

/* ===== 侧边菜单 ===== */
.menubox {
  position: fixed;
  width: 2.6rem;
  height: 100vh;
  background: #fff;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
  top: 0;
  left: -2.7rem;
  z-index: 10;
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
}

.menubox-open {
  left: 0;
}

@media screen and (min-width: 769px) {
  .menubox-open {
    left: 50%;
    transform: translateX(-50%);
  }
}

.menubox .type_list {
  padding-top: 0.55rem;
}

.menubox .type_list .list_item {
  display: flex;
  align-items: center;
  padding: 0.14rem 0.22rem;
  line-height: 0.24rem;
  font-size: 0.15rem;
  color: #333;
  transition: all 0.25s ease;
  border-left: 3px solid transparent;
}

.menubox .type_list .list_item:hover,
.menubox .type_list .list_item:active {
  background: #f0f9fa;
  border-left-color: #08979c;
  color: #08979c;
}

.menubox .type_list img {
  margin-right: 0.14rem;
  width: 0.3rem;
  flex-shrink: 0;
}

.menubox .menu_footer {
  padding: 0.5rem 0.2rem 0.3rem;
}

.menubox .menu_footer .line {
  width: 0.8rem;
  margin: 0 auto;
  border-top: 3px solid #e8e8e8;
  border-radius: 2px;
}

.menubox .menu_footer .title {
  font-weight: 600;
  font-size: 0.13rem;
  text-align: center;
  margin-top: 0.1rem;
  color: #666;
}

.menubox .menu_footer .about {
  font-size: 0.11rem;
  color: #aaa;
  margin-top: 0.06rem;
  text-align: center;
}

/* ===== 菜单背景遮罩 ===== */
.menu_bg {
  position: fixed;
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;
  z-index: 9;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  backdrop-filter: blur(2px);
}

/* ===== 搜索面板 ===== */
.search {
  position: fixed;
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;
  z-index: 100;
  background: #f5f7fa;
}

.search .header {
  display: flex;
  align-items: center;
  padding: 0.12rem 0.1rem;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.search .header input {
  flex: 1;
  margin: 0 0.1rem;
  border: none;
  outline: none;
  padding: 0.08rem 0.12rem;
  box-sizing: border-box;
  font-size: 0.15rem;
  background: #f5f7fa;
  border-radius: 0.2rem;
  color: #333;
}

.search .header input::placeholder {
  color: #bbb;
}

.search .header img {
  width: 0.22rem;
  margin: 0 0.08rem;
  transition: transform 0.2s ease;
}

.search .header img:active {
  transform: scale(0.85);
}

.search .popular {
  font-weight: 700;
  font-size: 0.13rem;
  border-top: 1px solid #eee;
  padding: 0.1rem 0.15rem;
  border-bottom: 1px solid #eee;
  background: #fff;
  color: #666;
  margin-top: 0.08rem;
}

.search .search_games {
  overflow: auto;
  height: calc(100% - 1rem);
  padding: 0.05rem 0;
}

.search .search_games .search_game_item {
  padding: 0.1rem 0.15rem;
  display: flex;
  align-items: center;
  background: #fff;
  margin-bottom: 1px;
  transition: background 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.search .search_games .search_game_item:active {
  background: #f0f9fa;
}

.search .search_games .search_game_item img {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 0.08rem;
  margin-right: 0.12rem;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.search .search_games .search_game_item div {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  font-weight: 600;
  font-size: 0.14rem;
  color: #333;
}

.search .search_games .search_game_item span {
  font-size: 0.11rem;
  color: #08979c;
  width: auto;
  text-align: right;
  background: #e6f7f8;
  padding: 0.03rem 0.08rem;
  border-radius: 0.1rem;
  white-space: nowrap;
}

/* ===== 底部 ===== */
#app {
  position: relative;
  padding-bottom: 1.2rem;
}

.bottom {
  background: #1a1a2e;
  color: #fff;
  padding: 0.15rem 0.1rem;
  text-align: center;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.bottom a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 0.13rem;
}

.bottom a:hover,
.bottom a:active {
  color: #fff;
}

.bottom .company-name {
  line-height: 1.8;
}

.bottom_nogame {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: auto;
}

/* ===== MORE GAMES 按钮 ===== */
.more-games {
  width: calc(100% - 0.3rem);
  max-width: 3.2rem;
  height: 0.52rem;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.16rem;
  font-weight: 700;
  color: #08979c;
  background: #fff;
  border: 2px solid #08979c;
  border-radius: 0.26rem;
  margin: 0.2rem auto 0.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

.more-games:active {
  background: #08979c;
  color: #fff;
  transform: scale(0.97);
}
