:root {
  --page: #f2f6fc;
  --bg: #34495e;
  --bar: #2c3e50;
  --ink: #ffffff;
  --muted: #ecf0f1;
  --max: 750px;
  --bar-h: 54px;
  --font: "Segoe UI", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--page); }
body {
  width: min(var(--max), 100%);
  margin: 0 auto;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  position: relative;
}
body.locked { overflow: hidden; }
button, input { font-family: inherit; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--bar-h);
  background: var(--bar);
}
.icon-btn {
  display: grid;
  flex: 0 0 45px;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 0;
}
.search-box input {
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 0 32px 0 12px;
  color: #1f2a33;
  background: #fff;
  font-size: 14px;
  outline: none;
}
.search-clear {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #d5dde4;
  color: #2c3e50;
  font-size: 14px;
  line-height: 22px;
  padding: 0;
}
.bar-title {
  flex: 1;
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.status {
  padding: 48px 20px;
  text-align: center;
  font-size: 14px;
}
.home-root,
.list-root { padding: 10px 0 0; }

.category-row { margin-bottom: 20px; }
.category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.title-div {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-left: 10px;
}
.title-div img { width: 22px; height: 22px; }
.title-div span {
  padding-left: 5px;
  font-weight: 600;
}
.text-btn {
  display: flex;
  align-items: center;
  gap: 2px;
  width: auto;
  margin-right: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}
.chevron { display: inline-flex; }
.chevron.is-back { transform: scaleX(-1); }

.game-grid { display: flex; flex-wrap: wrap; }
.game-tile { color: #fff; }
.row4 { width: 25%; padding: 10px; }
.row3 { width: 33.33%; padding: 10px; }
.thumb {
  position: relative;
  display: block;
  width: 100%;
  padding-bottom: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #2c3e50;
}
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-name {
  display: block;
  width: 100%;
  padding-top: 5px;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.row1 {
  display: flex;
  width: 100%;
  padding: 10px;
}
.row1 > img {
  width: 150px;
  height: 150px;
  border-radius: 10px;
  object-fit: cover;
  background: #2c3e50;
}
.row1-copy {
  display: flex;
  flex-direction: column;
  width: calc(100% - 150px);
  padding-left: 10px;
}
.row1-copy .game-name {
  padding-top: 0;
  font-size: 14px;
  font-weight: 600;
}
.game-desc {
  display: -webkit-box;
  padding-top: 10px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.row1-play {
  display: flex;
  flex-grow: 1;
  align-items: flex-end;
  justify-content: flex-end;
  width: 100%;
}
.play-pill {
  display: inline-block;
  width: 80px;
  height: 30px;
  border: 1px solid #fff;
  border-radius: 25px;
  background: linear-gradient(90deg, #c7df2e, #ff6a00);
  color: #fff;
  font-size: 14px;
  line-height: 28px;
  text-align: center;
}
.empty-note {
  width: 100%;
  padding: 24px 16px;
  text-align: center;
  font-size: 14px;
}

.advertisement {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 8px 0 16px;
}
.advertisement-title { margin: 0; font-size: 12px; }

.drawer-mask {
  position: fixed;
  top: var(--bar-h);
  left: max(0px, calc((100vw - min(var(--max), 100vw)) / 2));
  z-index: 40;
  width: min(var(--max), 100vw);
  height: calc(100vh - var(--bar-h));
  background: rgba(0, 0, 0, 0.45);
}
.drawer {
  position: fixed;
  top: var(--bar-h);
  left: max(0px, calc((100vw - min(var(--max), 100vw)) / 2));
  z-index: 41;
  width: min(450px, 60vw);
  height: calc(100vh - var(--bar-h));
  overflow: auto;
  background: var(--bar);
}
.drawer-item {
  display: flex;
  align-items: center;
  width: calc(100% - 20px);
  margin: 10px;
  padding: 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: 0 0.1875rem 0.5rem #1f1f1f66;
  color: #fff;
  font-size: 14px;
  text-align: left;
}
.drawer-item img { width: 32px; height: 32px; }
.drawer-item span { margin-left: 10px; }

.copy-right {
  padding: 24px 16px 32px;
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.copy-right p { margin: 0; }
.copy-right a { color: #fff; }
.agree-with-policy {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
}
.copy-right-line { margin: 0 10px; }

.detail-content { flex-grow: 1; }
.image-div {
  display: flex;
  align-items: center;
  padding: 20px;
}
.cover-img {
  flex: none;
  width: 150px;
  height: 150px;
  border-radius: 10px;
  object-fit: cover;
  background: #2c3e50;
}
.image-div .title-div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
  min-width: 0;
  margin-left: 12px;
  padding-left: 0;
  text-align: left;
}
.image-div .title-div p {
  width: 100%;
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.4;
}
.image-div .stars {
  justify-content: flex-start;
}
.stars { display: flex; }
.stars svg { margin-right: 10px; }
.stars svg:last-child { margin-right: 0; }
.play-btn-div {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 16px;
}
.play-now {
  width: 50%;
  height: 50px;
  border: 1px solid #fff;
  border-radius: 10px;
  background: linear-gradient(90deg, #c7df2e, #ff6a00);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  animation: play-shake 4.5s ease 0s infinite;
}
.play-now:disabled {
  animation: none;
  opacity: 0.7;
  cursor: default;
}
@keyframes play-shake {
  28%, 46% { transform: translateZ(0) rotate(0); }
  28.4%, 45.3% { transform: translate3d(-1px, -1px, 0) rotate(5deg); }
  30.5%, 43.2% { transform: translate3d(2px, -4px, 0) rotate(-2deg); }
  32.6%, 36.8%, 41.1% { transform: translate3d(-4px, -1px, 0) rotate(3deg); }
  34.7%, 38.9% { transform: translate3d(4px, 2px, 0) rotate(-4deg); }
}
.preview { padding: 10px 20px 0; }
.preview h2,
.recommend h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 400;
}
.preview-img {
  width: 100%;
  border-radius: 10px;
  background: #2c3e50;
}
.description-div {
  margin: 15px 20px;
  padding: 10px;
  border-radius: 10px;
  background: #3333;
  box-shadow: 0 0.1875rem 0.5rem #1f1f1f66;
  text-align: left;
}
.description-div .title-p {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
}
.description-div .content-p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.45;
}
.recommend { padding: 20px 20px 0; }
.recommend .game-grid { gap: 20px 20px; }
.recommend .row3 {
  width: calc((100% - 40px) / 3);
  padding: 0;
}

.legal { padding: 8px 20px 12px; text-align: left; }
.legal h1 { margin: 12px 0 16px; font-size: 22px; }
.legal h2 { margin: 18px 0 8px; font-size: 16px; }
.legal p { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.6; }

body[data-page="play"] {
  width: 100%;
  max-width: none;
  background: #111;
}
.player {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  flex-direction: column;
  background: #111;
}
.player.is-open { display: flex; }
.player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 8px;
  background: var(--bar);
}
.player-title {
  flex: 1;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.player-action {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
}
.player-frame { flex: 1; width: 100%; border: 0; background: #000; }
