/* style.css */
:root {
  --bg-0: #0a0d14;
  --bg-1: #0f1320;
  --neon-1: #00e0ff;
  --neon-2: #ff00aa;
  --neon-3: #87ff65;
  --text: #e8f0ff;
  --muted: #8aa0c6;
  --nav-h: 66px; /* 底部导航栏高度 */
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% 10%, #101629 0%, var(--bg-0) 40%, var(--bg-1) 100%);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); /* 为底部导航栏与安全区预留空间 */
}
/* 免费游戏币按钮样式 */
.free-coins-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 140, 0, 0.3));
    color: #ffd700;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    box-shadow: 
        0 0 15px rgba(255, 215, 0, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.free-coins-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite linear;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.free-coins-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.5), rgba(255, 140, 0, 0.5));
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 0 25px rgba(255, 215, 0, 0.6),
        0 8px 20px rgba(255, 215, 0, 0.3),
        inset 0 0 15px rgba(255, 255, 255, 0.3);
    border-color: #ffed4a;
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    0% {
        box-shadow: 
            0 0 20px rgba(255, 215, 0, 0.4),
            0 6px 15px rgba(255, 215, 0, 0.3),
            inset 0 0 10px rgba(255, 255, 255, 0.2);
    }
    100% {
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 0.6),
            0 10px 25px rgba(255, 215, 0, 0.4),
            inset 0 0 15px rgba(255, 255, 255, 0.3);
    }
}

.free-coins-btn:active {
    transform: translateY(0) scale(1);
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.3),
        0 2px 5px rgba(255, 215, 0, 0.2),
        inset 0 0 5px rgba(255, 255, 255, 0.2);
}

/* 按钮图标 */
.free-coins-btn .btn-icon {
    font-size: 16px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .free-coins-btn {
        padding: 6px 12px;
        font-size: 12px;
        gap: 4px;
    }
    
    .free-coins-btn .btn-icon {
        font-size: 14px;
    }
    
    .user-action-buttons {
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }
    
    .free-coins-btn, .topup-btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }
    
    .user-actions {
        flex-direction: column;
        gap: 8px;
    }
}

/* 窄屏进一步优化 */
@media (max-width: 480px) {
    .free-coins-btn {
        font-size: 11px;
        padding: 5px 10px;
    }
}
/* 动态星空背景 */
.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.25) 0, transparent 50%),
    radial-gradient(1.5px 1.5px at 70% 80%, rgba(255,255,255,.12) 0, transparent 50%),
    radial-gradient(1.8px 1.8px at 40% 60%, rgba(255,255,255,.18) 0, transparent 50%),
    radial-gradient(2px 2px at 85% 25%, rgba(255,255,255,.2) 0, transparent 50);
  animation: twinkle 8s linear infinite;
}
@keyframes twinkle {
  0% { transform: translateY(0); opacity: .9; }
  50% { transform: translateY(-10px); opacity: .7; }
  100% { transform: translateY(0); opacity: .9; }
}

header {
  position: relative; z-index: 2;
  padding: 32px 20px 12px;
  text-align: center;
}
.title {
  margin: 0;
  font-size: clamp(24px, 5vw, 48px);
  letter-spacing: .03em;
  text-shadow: 0 0 10px rgba(0,224,255,.25), 0 0 25px rgba(255,0,170,.2);
}
.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: clamp(12px, 2.2vw, 16px);
}

.grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; padding: 20px; max-width: 1200px; margin: 0 auto 32px;
}
.title {
  margin: 0;
  font-size: clamp(28px, 6vw, 60px);
  letter-spacing: .03em;
  text-shadow: 
    0 0 10px rgba(0, 224, 255, 0.8),
    0 0 20px rgba(0, 224, 255, 0.6),
    0 0 30px rgba(0, 224, 255, 0.4),
    0 0 40px rgba(255, 0, 170, 0.3),
    0 0 70px rgba(255, 0, 170, 0.2),
    0 0 80px rgba(255, 0, 170, 0.1);
  position: relative;
  display: inline-block;
  padding: 0 20px;
  background: linear-gradient(90deg, 
    rgba(0, 224, 255, 0.1) 0%, 
    rgba(255, 0, 170, 0.1) 100%);
  border-radius: 20px;
  animation: neonPulse 2.5s infinite alternate;
}

@keyframes neonPulse {
  0% {
    text-shadow: 
      0 0 10px rgba(0, 224, 255, 0.8),
      0 0 20px rgba(0, 224, 255, 0.6),
      0 0 30px rgba(0, 224, 255, 0.4);
    box-shadow: 
      0 0 20px rgba(0, 224, 255, 0.3),
      inset 0 0 10px rgba(0, 224, 255, 0.1);
  }
  100% {
    text-shadow: 
      0 0 15px rgba(255, 0, 170, 0.9),
      0 0 25px rgba(255, 0, 170, 0.7),
      0 0 35px rgba(255, 0, 170, 0.5);
    box-shadow: 
      0 0 30px rgba(255, 0, 170, 0.4),
      inset 0 0 15px rgba(255, 0, 170, 0.2);
  }
}

/* 添加标题背景装饰 */
.title::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--neon-1), 
    var(--neon-2), 
    transparent);
  transform: translateY(-50%);
  z-index: -1;
  opacity: 0.5;
}
.card {
  --glow: rgba(0,224,255,.55);
  --glow-2: rgba(255,0,170,.45);
  position: relative;
  display: flex; flex-direction: column;
  border-radius: 16px; color: var(--text);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 60%),
    radial-gradient(120% 100% at 0% 0%, rgba(0,224,255,.08), transparent 60%),
    radial-gradient(120% 100% at 100% 100%, rgba(255,0,170,.08), transparent 60%),
    linear-gradient(180deg, #0f1526, #0a0f1d);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 24px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.04);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  min-height: 200px; /* 设置最小高度 */
}
.card::before {
  content: "";
  position: absolute; inset: -1px; border-radius: 16px;
  padding: 1px; /* neon 边框 */
  background: linear-gradient(135deg, var(--neon-1), transparent 30%),
              linear-gradient(315deg, var(--neon-2), transparent 30%),
              linear-gradient(90deg, transparent, rgba(255,255,255,.06));
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
  opacity: .35; transition: opacity .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.15);
  box-shadow: 0 16px 36px rgba(0,0,0,.5), 0 0 24px var(--glow-2);
}
.card:hover::before { opacity: .65; }

/* 上半部分：预览截图区域 */
.card-preview {
  position: relative;
  height: 50%; min-height: 140px;
  /* 默认显示渐变占位，具体卡片用 moren01~moren05 覆盖 */
  background-image: linear-gradient(135deg, rgba(0,224,255,.12), rgba(255,0,170,.12));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hot-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #ff4d4f, #ff7a45);
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 10;
  transform: rotate(-5deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.new-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #2ed573, #1e90ff);
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 10;
  transform: rotate(-5deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-preview::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.3) 60%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.badge {
  width: 44px; height: 44px; flex: none;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; letter-spacing: .02em; color: #051018;
  font-size: clamp(14px, 2.6vw, 18px);
  background: linear-gradient(135deg, #6bdcff, #f8a6ff); /* 默认背景，在具体卡片中会被覆盖 */
  filter: saturate(120%) brightness(110%);
  box-shadow: inset 0 0 24px rgba(255,255,255,.25), 0 4px 12px rgba(0,0,0,.35);
}
.badge-01 { background: linear-gradient(135deg, #00e0ff, #7a00ff); }
.badge-02 { background: linear-gradient(135deg, #ff8a00, #ff0040); }
.badge-03 { background: linear-gradient(135deg, #8dff1a, #00c897); }
.badge-04 { background: linear-gradient(135deg, #ffd400, #ff2aa1); }
.badge-05 { background: linear-gradient(135deg, #2a7cff, #ff4fb3); }
.name {
  font-size: 18px; font-weight: 700; letter-spacing: .02em;
  text-shadow: 0 0 8px rgba(0,224,255,.2);
}
.hint { color: var(--muted); font-size: 12px; }

/* 下半部分：信息与按钮区域 */
.card-info {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 18px;
}

/* 按钮基础样式 */
.play-btn {
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  gap: 8px;
  padding: 10px 14px; 
  border-radius: 12px;
  color: #ffffff; 
  font-weight: 700; 
  letter-spacing: .02em;
  background: linear-gradient(135deg, var(--neon-1), var(--neon-2));
  box-shadow: 0 8px 20px rgba(0,224,255,.3), 0 6px 18px rgba(255,0,170,.25);
  transition: transform .15s ease, box-shadow .2s ease;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 电脑端 */
@media (min-width: 768px) {
  .play-btn {
      min-width: 110px;
      font-size: 15px;
  }
}

/* 移动端 */
@media (max-width: 767px) {
  .play-btn {
      min-width: 90px;
      font-size: 14px;
      padding: 8px 12px;
  }
}

/* 卡片信息区域优化 */
.card-info {
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 12px;
  padding: 14px 18px;
}

.card-info > div:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.card-info .name {
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-info .hint {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 响应式调整 */
@media (max-width: 480px) {
  .card-info {
      padding: 12px 14px;
      gap: 8px;
  }
  
  .card-info .name {
      font-size: 14px;
  }
  
  .card-info .hint {
      font-size: 10px;
  }
  
  .play-btn {
      font-size: 12px;
      padding: 6px 8px;
      min-width: 75px;
  }
}

.play-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,224,255,.35), 0 10px 24px rgba(255,0,170,.3); text-decoration: none; }

/* 已移除入口路径展示，不再需要 .device 样式 */

footer {
  position: relative; z-index: 2; text-align: center; color: var(--muted); padding: 10px 20px 24px;
}

/* 响应式微调 */
@media (max-width: 480px) {
  .badge { width: 38px; height: 38px; }
  .name { font-size: 16px; }
  .card-info { padding: 12px 14px; }
}

/* 视图切换：首页与聊天室 */
.view { display: none; }
.view.active { display: block; }

/* 进入游戏时，隐藏顶部 header，最大化游戏区域 */
body.game-active header { display: none; }

/* 底部常驻导航栏 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-around; gap: 10px; flex-wrap: nowrap;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 35%), #0a0f1d;
  border-top: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 -8px 24px rgba(0,0,0,.4);
  z-index: 10;
  backdrop-filter: blur(10px);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 8px 12px;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1; max-width: 240px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 14px; cursor: pointer; user-select: none;
  color: var(--text); font-weight: 700;
  background: linear-gradient(135deg, rgba(0,224,255,.08), rgba(255,0,170,.08));
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}
.nav-item:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.35); }
.nav-item:active { transform: translateY(0); box-shadow: 0 6px 16px rgba(0,0,0,.3); }
.nav-item.active { background: linear-gradient(135deg, var(--neon-1), var(--neon-2)); color: #fff; box-shadow: 0 12px 26px rgba(0,224,255,.3), 0 10px 24px rgba(255,0,170,.25); border-color: transparent; }

/* 聊天室样式（移动端适配：使用 flex 填满视口高度） */
.chat-wrap { position: relative; z-index: 2; padding: 16px; max-width: 1000px; margin: 0 auto; min-height: calc(var(--vvh, 100dvh) - var(--nav-h) - 24px); display: flex; }
.chat-card {
  border-radius: 16px; background: linear-gradient(180deg, #0f1526, #0a0f1d);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 24px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.04);
  overflow: hidden;
  display: flex; flex-direction: column; flex: 1 1 auto; min-height: inherit;
}
.chat-header { padding: 14px 16px; font-weight: 700; letter-spacing: .02em; background: linear-gradient(135deg, rgba(0,224,255,.12), rgba(255,0,170,.12)); border-bottom: 1px solid rgba(255,255,255,.08); }
.messages { flex: 1 1 auto; min-height: 220px; overflow: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.msg .meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.msg .content { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.chat-input { display: grid; grid-template-columns: 160px 1fr auto; gap: 10px; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); flex: none; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.chat-input input { height: 44px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: var(--text); padding: 8px 10px; font-size: 16px; }
.chat-input button { height: 44px; border-radius: 10px; border: 0; padding: 0 16px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--neon-1), var(--neon-2)); box-shadow: 0 8px 20px rgba(0,224,255,.3), 0 6px 18px rgba(255,0,170,.25); cursor: pointer; touch-action: manipulation; }
.chat-hint { padding: 8px 16px 16px; color: var(--muted); font-size: 12px; }
#game-view #game-container { display:flex; justify-content:center; }
#game-view #game-frame { max-width: 420px; }

@media (max-width: 600px) {
  .chat-input { grid-template-columns: 120px 1fr auto; }
}
/* 窄屏进一步优化：昵称单独一行，减少横向占用 */
@media (max-width: 440px) {
  .chat-input { grid-template-columns: 1fr auto; grid-template-rows: auto auto; }
  #chat-username { grid-column: 1 / span 2; }
}
/* 修改用户区域样式 */
.user-area {
  position: relative; /* 改为相对定位 */
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center; /* 居中显示 */
  gap: 12px;
  margin-top: 20px; /* 添加上边距，与副标题分开 */
  margin-bottom: 20px; /* 添加下边距 */
}

/* 调整header的内边距，为user-area腾出空间 */
header {
  position: relative;
  z-index: 2;
  padding: 32px 20px 20px; /* 调整底部的padding，从12px改为20px */
  text-align: center;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--neon-1);
  object-fit: cover;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-nickname {
  font-weight: bold;
  font-size: 14px;
  color: var(--text);
}

.user-coins {
  font-size: 12px;
  color: #ffd700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.coin-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 30% 30%, #ffd700, #ff9900);
  border-radius: 50%;
  box-shadow: 0 0 4px #ffd700;
}

.user-actions {
  display: flex;
  gap: 8px;
}

.login-btn, .register-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 224, 255, 0.1);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.login-btn:hover, .register-btn:hover {
  background: rgba(0, 224, 255, 0.2);
  transform: translateY(-2px);
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, #0f1526, #0a0f1d);
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--text);
}

.close-modal {
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  opacity: 0.7;
}

.close-modal:hover {
  opacity: 1;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 14px;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 16px;
}

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--neon-1);
}

.avatar-selection {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 15px 0;
}

.avatar-option {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.avatar-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-option.selected {
  border-color: var(--neon-1);
  transform: scale(1.1);
}

.submit-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--neon-1), var(--neon-2));
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 20px;
  transition: transform 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
}

.form-switch {
  text-align: center;
  margin-top: 15px;
  color: var(--muted);
}

.form-switch a {
  color: var(--neon-1);
  text-decoration: none;
  cursor: pointer;
}

.form-switch a:hover {
  text-decoration: underline;
}

.error-message {
  color: #ff4757;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.error-message.show {
  display: block;
}

/* 响应式调整 */
/* 修改响应式调整，因为user-area现在在header内 */
@media (max-width: 768px) {
  .user-area {
      margin-top: 15px;
      margin-bottom: 15px;
      flex-direction: column; /* 在窄屏上改为垂直排列 */
      gap: 8px;
  }
  
  .user-actions {
      flex-direction: column; /* 按钮在窄屏上垂直排列 */
      gap: 8px;
  }
  
  .user-info {
      flex-direction: column; /* 登录信息在窄屏上垂直排列 */
      text-align: center;
      gap: 8px;
  }
  
  .user-details {
      align-items: center;
  }
  
  header {
      padding: 20px 15px 15px; /* 调整窄屏下的header内边距 */
  }
  
  .user-nickname {
      font-size: 12px;
  }
  
  .user-coins {
      font-size: 11px;
  }
}

/* 密码找回表单样式 */
#resetPasswordFormContainer {
  animation: fadeIn 0.3s ease;
}

#verifyInfoStep, #setPasswordStep {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(-10px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* 密码找回链接样式 */
#forgotPasswordLink {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
}

#forgotPasswordLink:hover {
  text-decoration: underline;
}

/* 步骤指示器样式 */
.reset-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  gap: 20px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 100px;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

.step-item.active .step-number {
  background: linear-gradient(135deg, var(--neon-1), var(--neon-2));
  border-color: transparent;
  box-shadow: 0 0 10px rgba(0, 224, 255, 0.5);
}

.step-title {
  font-size: 12px;
  color: var(--muted);
  transition: all 0.3s ease;
}

.step-item.active .step-title {
  color: var(--neon-1);
  font-weight: bold;
}

/* 用户操作按钮容器 */
.user-action-buttons {
  display: flex;
  gap: 8px;
  margin-left: 10px;
}

/* 充值按钮样式 */
.topup-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 15px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 140, 0, 0.2));
  color: #ffd700;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.topup-btn:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 140, 0, 0.3));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.5);
}

.topup-btn:active {
  transform: translateY(0);
}

/* 按钮图标 */
.btn-icon {
  font-size: 14px;
}



/* style.css - 追加内容 */
.save-sync-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 224, 255, 0.1);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 
        0 0 10px rgba(0, 224, 255, 0.2),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.save-sync-btn:hover {
    background: rgba(0, 224, 255, 0.2);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 0 15px rgba(0, 224, 255, 0.3),
        0 8px 20px rgba(0, 224, 255, 0.2),
        inset 0 0 15px rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 224, 255, 0.4);
}

.save-sync-btn:active {
    transform: translateY(0) scale(1);
    box-shadow: 
        0 0 5px rgba(0, 224, 255, 0.1),
        0 2px 5px rgba(0, 224, 255, 0.1),
        inset 0 0 5px rgba(255, 255, 255, 0.1);
}

.save-sync-btn .btn-icon {
    font-size: 16px;
    animation: bounce 2s infinite;
}

/* 为APP下载按钮也应用相同的样式优化 */
.topup-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 140, 0, 0.2));
    color: #ffd700;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.topup-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 140, 0, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
}

.topup-btn:active {
    transform: translateY(0);
}

/* 退出按钮样式 */
.logout-btn {
  padding: 6px 12px;
  border-radius: 15px;
  border: 1px solid rgba(255, 0, 170, 0.2);
  background: rgba(255, 0, 170, 0.1);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.logout-btn:hover {
  background: rgba(255, 0, 170, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .user-action-buttons {
      margin-left: 0;
      justify-content: center;
      width: 100%;
  }
  
  .free-coins-btn, .topup-btn, .logout-btn {
      width: 100%;
      max-width: 100%;
      justify-content: center;
  }
}

/* 窄屏进一步优化 */
@media (max-width: 480px) {
  .user-action-buttons {
      flex-direction: column;
      gap: 6px;
      width: 100%;
  }
  
  .topup-btn, .logout-btn {
      max-width: 100%;
      width: 100%;
  }
}