:root {
  --bg-color: #08091b;
  --text-color: #fff;
  --text-secondary: #aaa;
  --card-bg: #1c1c2a;
  --brand-color: #4cafef;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-touch-callout: none;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
}

.container {
  max-width: 800px;
  min-width: 320px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
}
.topbar .logo {
  font-weight: bold;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar .balance {
  display: flex;
  gap: 3px;
  font-size: 14px;
  font-weight: bold;
}

.banner {
    position: relative;
}

.banner img {
    pointer-events: none;
}

.banner-click-area {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 85%;
    cursor: pointer;
    z-index: 10;
}
.slides-wrapper {
    position: relative;
    width: 100%;
    padding-top: 55%; /* 110/200 = 0.55 表示高度是宽度的55% */
    overflow: hidden; /* 防止内容溢出 */
}

.slides-wrapper > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slides {
    display: flex;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.slides img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 图片自适应填满容器，裁剪超出部分 */
    user-select: none;
    -webkit-user-drag: none;
}

.dots {
  position: absolute;
  bottom: 30px;
  width: 22%;
  text-align: center;
}
.dots .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 3px;
  background: #fff;
  opacity: 0.9;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.3s;
}
.dots .dot.active {
  background: #f0dc05;
  opacity: 1;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 12px;
}
.section-title {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}
.section-header .balance {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 14px;
}
.section-header .balance img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.game-grid,
.slot-game-grid,
.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.library-grid {
  gap: 14px;
  padding: 16px;
}
.game-card {
  overflow: hidden;
  text-align: center;
}
.game-card img {
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.game-card p {
  font-size: 14px;
  margin: 8px 0;
}

.slot-game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 12px;
}
.nav-buttons img {
  width: 24px;
  height: 24px;
  margin-left: 8px;
  cursor: pointer;
}

.full-library {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #0b0b15;
  z-index: 1000;
  overflow-y: auto;
  display: none;
}
.full-library.active {
  display: block;
}
.library-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--card-bg);
  justify-content: space-between;
}
.library-header h3 {
  margin: 0;
  font-size: 16px;
}
.library-header button {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 16px;
  cursor: pointer;
}

.list {
  margin-top: 16px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.list-header {
  display: flex;
  justify-content: space-around;
  font-size: 14px;
  border-bottom: 1px solid #333;
}
.list-header div {
  flex: 1;
  text-align: center;
  padding: 12px 0;
}
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #333;
  font-size: 14px;
}
.list-item:last-child {
  border-bottom: none;
}
.player {
  display: flex;
  align-items: center;
  gap: 8px;
}
.player img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.player .name {
  font-weight: 500;
}
.player .level {
  font-size: 12px;
  color: var(--text-secondary);
}
.bet, .win {
  font-size: 14px;
}
.win {
  color: #00e676;
}

.safe-bottom {
  height: calc(56px + env(safe-area-inset-bottom));
