/* style.css - 移动优先 H5 落地页 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #0f1115;
  --card: #1b1f27;
  --accent: #ff7a00;
  --accent2: #ffb347;
  --gold: #ffc93c;
  --text: #f2f4f7;
  --muted: #9aa4b2;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "WenQuanYi Micro Hei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  padding-bottom: 90px; /* 给底部下载条留位 */
}

/* ===== 头部 ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(15, 17, 21, 0.95);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.logo { font-size: 18px; font-weight: 800; color: var(--accent); }
.lang-switch {
  background: var(--card);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 40px 24px 32px;
  background: linear-gradient(135deg, #4a00e0 0%, #8e2de2 55%, #ff7a00 150%);
}
.hero h1 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.hero p { font-size: 14px; opacity: .92; }
.search-box {
  margin: 22px auto 0;
  max-width: 340px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  padding: 10px 16px;
  border-radius: 30px;
  display: flex;
  align-items: center;
}
.search-box input {
  background: none;
  border: none;
  color: #fff;
  width: 100%;
  outline: none;
  margin-left: 8px;
  font-size: 15px;
}
.search-box input::placeholder { color: rgba(255,255,255,.7); }

/* ===== 金币模块 ===== */
.coin-module {
  margin: 20px 16px;
  background: linear-gradient(135deg, #23293a, #1b1f27);
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(255,201,60,.25);
}
.coin-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.coin-icon { font-size: 44px; transition: transform .3s; }
.coin-icon.pop { transform: scale(1.4) rotate(15deg); }
.coin-text h3 { font-size: 18px; color: var(--gold); }
.coin-text p { font-size: 12px; color: var(--muted); }
.coin-stats { display: flex; gap: 10px; margin-bottom: 16px; }
.stat-box {
  flex: 1;
  background: var(--card);
  padding: 12px 6px;
  border-radius: 12px;
  text-align: center;
}
.stat-label { font-size: 11px; color: var(--muted); }
.stat-value { font-size: 24px; font-weight: 800; color: var(--gold); margin-top: 4px; }
.btn-claim {
  width: 100%;
  padding: 15px;
  background: linear-gradient(90deg, var(--accent), #ff5722);
  border: none;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255,122,0,.4);
  transition: transform .1s, opacity .2s;
}
.btn-claim:active { transform: scale(.97); }
.btn-claim:disabled { opacity: .45; cursor: not-allowed; }
.recent-claims { margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }

/* ===== 分类 ===== */
.categories-section { padding: 8px 16px 0; }
.section-head h2 { font-size: 18px; margin-bottom: 12px; }
.category-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.category-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  background: var(--card);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
}
.chip.active { background: var(--accent); color: #fff; font-weight: 700; }

/* ===== 游戏列表 ===== */
.games-section { padding: 16px; }
.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.game-card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s;
}
.game-card:active { transform: scale(.97); }
.game-thumb { aspect-ratio: 1 / 1; background: #000; }
.game-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-info { padding: 10px; }
.game-name { font-size: 14px; font-weight: 700; line-height: 1.2; }
.game-cat { font-size: 11px; color: var(--accent2); margin-top: 4px; }
.no-result { text-align: center; color: var(--muted); padding: 30px 0; }

/* ===== 底部悬浮下载条 ===== */
.bottom-download {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(27,31,39,.98);
  border-top: 1px solid rgba(255,122,0,.4);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(8px);
  animation: slideUp .4s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.bottom-download-info { display: flex; align-items: center; gap: 10px; }
.app-logo { font-size: 30px; }
.app-name { font-size: 14px; font-weight: 700; }
.app-tip { font-size: 11px; color: var(--muted); }
.btn-download {
  background: linear-gradient(90deg, var(--accent), #ff5722);
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 24px;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(255,122,0,.4);
}
.btn-download-lg { display: inline-block; padding: 14px 32px; font-size: 16px; }

/* ===== 页脚 ===== */
.footer { padding: 30px 20px 20px; text-align: center; }
.footer-download { margin-bottom: 24px; }
.footer-download h3 { font-size: 20px; margin-bottom: 6px; }
.footer-download p { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.footer-lang { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.lang-quick {
  display: inline-block;
  margin: 0 6px;
  padding: 4px 8px;
  background: var(--card);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.lang-quick:hover { background: var(--accent); color: #fff; }
.footer-copy { font-size: 11px; color: #5a6472; }

/* ===== RTL（阿拉伯语）===== */
body.rtl .header, body.rtl .coin-header, body.rtl .bottom-download, body.rtl .bottom-download-info { direction: rtl; }
body.rtl .search-box input { margin-left: 0; margin-right: 8px; }

/* ===== 大屏适配 ===== */
@media (min-width: 600px) {
  .app-container { box-shadow: 0 0 40px rgba(0,0,0,.5); }
  .games-grid { grid-template-columns: 1fr 1fr 1fr; }
}
