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

:root {
  --bg-start: #0a0a1a;
  --bg-end:   #12102a;
  --surface:  rgba(255,255,255,.04);
  --surface-border: rgba(255,255,255,.07);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius: 20px;
}

html, body {
  min-height: 100%;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(170deg, var(--bg-start), var(--bg-end));
  background-attachment: fixed;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* ========== 极光背景 ========== */
.aurora {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.aurora-blob {
  position: absolute; border-radius: 50%;
  filter: blur(120px); opacity: .25;
  animation: aurora 28s ease-in-out infinite;
}
.ab-1 { width: 500px; height: 500px; background: #6366f1; top: -15%; right: -10%; }
.ab-2 { width: 400px; height: 400px; background: #8b5cf6; bottom: 5%; left: -12%; animation-delay: -10s; }
.ab-3 { width: 300px; height: 300px; background: #ec4899; top: 40%; right: 20%; animation-delay: -18s; opacity: .15; }
.ab-4 { width: 250px; height: 250px; background: #06b6d4; bottom: -8%; right: -5%; animation-delay: -6s; opacity: .18; }
@keyframes aurora {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.1); }
  50% { transform: translate(-20px, 30px) scale(.92); }
  75% { transform: translate(15px, 20px) scale(1.05); }
}

/* 网格线背景 */
.grid-lines {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 70%);
}

/* ========== 大厅容器 ========== */
.lobby {
  position: relative; z-index: 1;
  max-width: 880px; margin: 0 auto;
  padding: 48px 20px 40px;
  min-height: 100vh;
}

/* ========== 英雄头部 ========== */
.hero {
  text-align: center;
  margin-bottom: 48px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 18px; border-radius: 100px;
  background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.2);
  font-size: 12px; font-weight: 600;
  color: #a5b4fc; letter-spacing: 1px;
  margin-bottom: 20px;
}
.hero-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52,211,153,.6);
  animation: dot-blink 2s ease-in-out infinite;
}
@keyframes dot-blink { 0%,100%{opacity:1} 50%{opacity:.4} }
.hero-title {
  font-size: clamp(36px, 8vw, 56px);
  font-weight: 900;
  letter-spacing: 6px;
  line-height: 1.1;
  background: linear-gradient(135deg, #e2e8f0 0%, #a5b4fc 40%, #c4b5fd 60%, #fbcfe8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 30px rgba(139,92,246,.2));
}
.hero-sub {
  font-size: 15px;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 3px;
}

/* ========== 游戏网格 ========== */
.games {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* ========== 游戏卡片 ========== */
.gcard {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  transition: all .4s cubic-bezier(.25,.46,.45,.94);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(24px);
}
.gcard.card-in {
  animation: card-enter .55s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes card-enter {
  to { opacity: 1; transform: translateY(0); }
}
.gcard:not(.gcard-coming):hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 12px 40px var(--glow), 0 0 0 1px var(--accent), inset 0 1px 0 rgba(255,255,255,.06);
}
.gcard:not(.gcard-coming):active {
  transform: translateY(-2px) scale(.98);
}
.gcard-coming {
  opacity: .4 !important;
  cursor: default;
}
.gcard-coming.card-in {
  animation: card-enter-dim .55s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes card-enter-dim { to { opacity: .4; transform: translateY(0); } }

/* 视觉区（上半部分） */
.gcard-visual {
  position: relative;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gcard-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.35) 100%);
  pointer-events: none;
}

.gcard-icon {
  position: relative; z-index: 1;
}

/* 信息区（下半部分） */
.gcard-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gcard-body h2 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1;
}
.gcard-body p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 标签 */
.tags {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.tag {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(99,102,241,.15);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,.15);
}
.tag-dim {
  background: rgba(100,116,139,.12);
  color: var(--text-dim);
  border-color: rgba(100,116,139,.15);
}

/* ========== 各游戏图标 ========== */

/* 五子棋 */
.ico-gomoku {
  width: 68px; height: 68px; position: relative;
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 17px 17px;
  border-radius: 6px;
}
.gs {
  position: absolute; width: 14px; height: 14px;
  border-radius: 50%; transform: translate(-50%,-50%);
}
.gb {
  background: radial-gradient(circle at 35% 35%, #666, #111);
  box-shadow: 1px 2px 4px rgba(0,0,0,.5);
}
.gw {
  background: radial-gradient(circle at 35% 35%, #fff, #bbb);
  box-shadow: 1px 2px 4px rgba(0,0,0,.2);
}

/* 象棋 */
.ico-chess {
  font-size: 52px; line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.4));
}

/* 围棋 */
.ico-go { display: flex; gap: 8px; }
.go-s { width: 30px; height: 30px; border-radius: 50%; }
.go-b {
  background: radial-gradient(circle at 35% 32%, #666, #111);
  box-shadow: 2px 3px 6px rgba(0,0,0,.5);
}
.go-w {
  background: radial-gradient(circle at 35% 32%, #fff, #bbb);
  box-shadow: 2px 3px 6px rgba(0,0,0,.2);
}

/* 斗兽棋 */
.ico-jungle {
  display: flex; gap: 6px;
  font-size: 36px; line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.3));
}

/* 井字棋 */
.ico-ttt {
  display: flex; gap: 8px; align-items: center;
}
.ttt-x {
  width: 24px; height: 24px; position: relative;
}
.ttt-x::before, .ttt-x::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 4px; height: 20px; border-radius: 2px;
  background: rgba(255,255,255,.9);
}
.ttt-x::before { transform: translate(-50%,-50%) rotate(45deg); }
.ttt-x::after  { transform: translate(-50%,-50%) rotate(-45deg); }
.ttt-o {
  width: 20px; height: 20px;
  border: 4px solid rgba(255,255,255,.7);
  border-radius: 50%;
}

/* 黑白棋 */
.ico-reversi { display: flex; gap: 6px; }
.rv-b, .rv-w { width: 28px; height: 28px; border-radius: 50%; }
.rv-b {
  background: radial-gradient(circle at 35% 30%, #666, #111);
  box-shadow: 2px 3px 6px rgba(0,0,0,.5);
}
.rv-w {
  background: radial-gradient(circle at 35% 30%, #fff, #bbb);
  box-shadow: 2px 3px 6px rgba(0,0,0,.2);
}

/* 飞行棋 */
.ico-ludo {
  font-size: 48px; line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.3));
}

/* 即将上线 */
.ico-coming {
  display: flex; gap: 8px;
}
.cm-d {
  width: 18px; height: 18px; border-radius: 50%;
  box-shadow: 1px 2px 4px rgba(0,0,0,.3);
  opacity: .7;
}

/* ========== 下载区 ========== */
.download-section {
  margin-top: 32px;
  text-align: center;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 32px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(139,92,246,.15));
  border: 1.5px solid rgba(99,102,241,.3);
  color: var(--text);
  text-decoration: none;
  transition: all .3s;
  backdrop-filter: blur(12px);
}
.download-btn:hover {
  background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(139,92,246,.25));
  border-color: rgba(99,102,241,.5);
  box-shadow: 0 8px 30px rgba(99,102,241,.2);
  transform: translateY(-2px);
}
.download-btn:active { transform: translateY(0) scale(.97); }
.dl-icon {
  width: 26px; height: 26px;
  color: #a5b4fc;
  flex-shrink: 0;
}
.dl-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 2px;
}
.dl-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
}
.dl-size {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}

/* ========== 底栏 ========== */
.lobby-footer {
  text-align: center;
  margin-top: 44px;
  padding: 20px 0;
}
.lobby-footer p {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 3px;
}

/* ========== 响应式 ========== */
@media (max-width: 480px) {
  .lobby { padding: 36px 14px 30px; }
  .hero { margin-bottom: 36px; }
  .hero-sub { font-size: 13px; letter-spacing: 2px; }
  .games { gap: 12px; }
  .gcard-visual { padding: 22px 0; }
  .gcard-body { padding: 12px 14px 14px; }
  .gcard-body h2 { font-size: 15px; }
  .ico-gomoku { width: 54px; height: 54px; background-size: 13.5px 13.5px; }
  .gs { width: 11px; height: 11px; }
  .ico-chess { font-size: 40px; }
  .go-s { width: 24px; height: 24px; }
  .ico-jungle { font-size: 28px; }
  .ttt-x { width: 20px; height: 20px; }
  .ttt-x::before, .ttt-x::after { height: 16px; width: 3px; }
  .ttt-o { width: 16px; height: 16px; border-width: 3px; }
  .rv-b, .rv-w { width: 22px; height: 22px; }
  .ico-ludo { font-size: 36px; }
  .cm-d { width: 14px; height: 14px; }
}

@media (min-width: 640px) {
  .games { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .gcard-visual { padding: 32px 0; }
}

@media (min-width: 768px) {
  .lobby { padding: 60px 30px 50px; }
  .games { gap: 22px; }
  .gcard-visual { padding: 36px 0; }
  .gcard-body { padding: 18px 20px 20px; }
  .gcard-body h2 { font-size: 19px; }
  .ico-gomoku { width: 76px; height: 76px; background-size: 19px 19px; }
  .gs { width: 16px; height: 16px; }
  .ico-chess { font-size: 56px; }
  .go-s { width: 34px; height: 34px; }
  .ico-jungle { font-size: 42px; }
  .rv-b, .rv-w { width: 32px; height: 32px; }
  .ico-ludo { font-size: 54px; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }
