/* 🎨 游戏大厅样式 v2.0 - 精美卡片设计 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0a;
  color: #fff;
  overflow-x: hidden;
  padding-bottom: 80px;
}

.app {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  background: #0a0a0a;
}

/* ========== 顶部用户栏 ========== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
  border-bottom: 1px solid #222;
}

.user-info {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  position: relative;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.username {
  font-size: 13px;
  color: #888;
}

.balance-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.coin-icon {
  font-size: 18px;
  filter: drop-shadow(0 0 8px rgba(0, 191, 255, 0.6));
}

.balance {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.btn-recharge {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
  transition: all 0.3s ease;
}

.btn-recharge:active {
  transform: scale(0.95);
}

/* ========== Live 游戏横向滚动 ========== */
.live-section {
  padding: 16px;
  padding-left: 8px;
  display: flex;
  gap: 4px;
  align-items: center;
  overflow-x: auto;
  background: #0a0a0a;
  scrollbar-width: none;
}

.live-section::-webkit-scrollbar {
  display: none;
}

.live-label {
  font-size: 12px;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: #4ade80;
  letter-spacing: 2px;
  padding: 8px 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.live-games {
  display: flex;
  gap: 10px;
  padding: 0 8px;
}

.live-game-icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.live-game-icon:nth-child(1) { background: linear-gradient(135deg, #c084fc, #9333ea); }
.live-game-icon:nth-child(2) { background: linear-gradient(135deg, #34d399, #059669); }
.live-game-icon:nth-child(3) { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.live-game-icon:nth-child(4) { background: linear-gradient(135deg, #34d399, #10b981); }
.live-game-icon:nth-child(5) { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
.live-game-icon:nth-child(6) { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.live-game-icon:nth-child(7) { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.live-game-icon:nth-child(8) { background: #1a1a1a; border: 2px solid #fbbf24; }

.live-game-icon:active {
  transform: scale(0.9);
}

/* ========== 主内容区域 ========== */
.main-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ========== 大型游戏卡片 ========== */
.game-card-large {
  height: 180px;
  border-radius: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.game-card-large:active {
  transform: scale(0.98);
}

/* Rocket 卡片样式 */
.rocket-card {
  background: 
    linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #43e97b 100%);
  position: relative;
}

.rocket-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,0.1) 0%, transparent 40%);
}

.hot-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: #ff4757;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-icon-large {
  font-size: 64px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.card-title-large {
  font-size: 38px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
}

.card-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.multiplier-display {
  background: rgba(255, 255, 255, 0.95);
  color: #4facfe;
  padding: 10px 20px;
  border-radius: 16px;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.multiplier-small {
  background: rgba(255, 255, 255, 0.85);
  color: #4facfe;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ========== 游戏网格 ========== */
.games-section {
  margin-top: 8px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #fff;
  letter-spacing: 0.5px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.game-item {
  height: 120px;
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.game-item:active {
  transform: scale(0.95);
}

/* 为每个游戏分配独特的渐变色 */
.game-item:nth-child(1) { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.game-item:nth-child(2) { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.game-item:nth-child(3) { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.game-item:nth-child(4) { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.game-item:nth-child(5) { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }
.game-item:nth-child(6) { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
.game-item:nth-child(7) { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
.game-item:nth-child(8) { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.game-item:nth-child(9) { background: linear-gradient(135deg, #ff6e7f 0%, #bfe9ff 100%); }
.game-item:nth-child(10) { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); }
.game-item:nth-child(11) { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.game-item:nth-child(12) { background: linear-gradient(135deg, #fad0c4 0%, #ffd1ff 100%); }

.game-icon-bg {
  font-size: 42px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.game-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.game-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.game-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* ========== 底部导航 ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
  border-top: 1px solid #222;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 8px 16px;
  transition: all 0.3s ease;
  border-radius: 12px;
}

.nav-item.active {
  color: #7c3aed;
}

.nav-item.active .nav-icon {
  transform: scale(1.2);
}

.nav-icon {
  font-size: 24px;
  transition: all 0.3s ease;
}

.nav-label {
  font-size: 11px;
  font-weight: 600;
}

/* ========== 弹窗和其他组件 ========== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: #1a1a1a;
  border-radius: 24px;
  padding: 32px;
  max-width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ========== 工具类 ========== */
.hidden {
  display: none !important;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 14px;
}


/* SVG 图标样式调整 */
.game-icon-bg {
  width: 56px !important;
  height: 56px !important;
  margin-bottom: auto;
}

.game-item img.game-icon-bg {
  object-fit: contain;
}

.card-icon-large {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
