/* ===== 全局 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1a 100%);
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #fff;
  overflow-x: hidden;
}

/* ===== 通用按钮 ===== */
.btn {
  border: none; border-radius: 12px; padding: 14px 28px;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: all 0.15s; text-transform: uppercase;
  letter-spacing: 1px; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary {
  background: linear-gradient(180deg, #ff4444, #cc0000);
  color: #fff;
  box-shadow: 0 4px 0 #990000, 0 6px 20px rgba(255,0,0,0.4);
}
.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #990000, 0 2px 10px rgba(255,0,0,0.4);
}
.btn-primary:disabled {
  background: linear-gradient(180deg, #444, #222);
  box-shadow: 0 4px 0 #111; cursor: not-allowed; transform: none;
}
.btn-secondary {
  background: linear-gradient(180deg, #444, #222);
  color: #ccc;
  box-shadow: 0 3px 0 #111;
  padding: 10px 18px; font-size: 0.9rem;
}
.btn-secondary:active { transform: translateY(3px); box-shadow: 0 0 0 #111; }
.btn-gold {
  background: linear-gradient(180deg, #ffd700, #cc9900);
  color: #1a1a1a;
  box-shadow: 0 4px 0 #996600;
}
.btn-gold:active { transform: translateY(4px); box-shadow: 0 0 0 #996600; }

/* ===== 面板/卡片 ===== */
.panel {
  background: linear-gradient(180deg, #2a2a3a, #1a1a2a);
  border-radius: 24px;
  padding: 24px;
  box-shadow:
    0 0 0 4px #333,
    0 0 0 8px #ffd700,
    0 0 30px rgba(255, 215, 0, 0.3),
    inset 0 0 60px rgba(0,0,0,0.5);
}

.stat-box {
  background: linear-gradient(180deg, #1a1a2e, #0a0a1a);
  border: 2px solid #333;
  border-radius: 10px;
  padding: 10px 16px;
  text-align: center;
  min-width: 100px;
}
.stat-box .label {
  font-size: 0.7rem; color: #888;
  text-transform: uppercase; letter-spacing: 1px;
}
.stat-box .value {
  font-size: 1.3rem; font-weight: 800; color: #ffd700;
  text-shadow: 0 0 10px rgba(255,215,0,0.5);
  font-variant-numeric: tabular-nums;
}

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; margin-bottom: 6px;
  font-size: 0.85rem; color: #aaa; text-transform: uppercase; letter-spacing: 1px;
}
.form-group input {
  width: 100%; padding: 12px 16px;
  background: #0a0a0a; border: 2px solid #333;
  border-radius: 10px; color: #fff; font-size: 1rem;
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus { border-color: #ffd700; }
.form-group .error {
  color: #ff4444; font-size: 0.8rem; margin-top: 4px;
}

/* ===== 消息 ===== */
.message {
  min-height: 28px; text-align: center;
  font-size: 1.1rem; font-weight: 700;
  text-shadow: 0 0 10px currentColor;
  transition: all 0.3s;
}
.msg-win { color: #ffd700; }
.msg-lose { color: #ff6666; }
.msg-info { color: #66ccff; }

/* ===== 导航 ===== */
.nav-bar {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(15,15,26,0.9);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 1000; border-bottom: 1px solid #333;
}
.nav-brand {
  font-size: 1.2rem; font-weight: 900;
  background: linear-gradient(180deg, #ffd700, #ff8c00);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-user {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.9rem;
}
.nav-user .credits {
  color: #ffd700; font-weight: 700;
}

/* ===== 滚轮容器 ===== */
.reels-container {
  background: linear-gradient(180deg, #0a0a0a, #1a1a1a);
  border-radius: 12px; padding: 8px;
  border: 3px solid #444;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
  position: relative;
}
.reels-container::before {
  content: '';
  position: absolute; left: 0; right: 0;
  top: 50%; transform: translateY(-50%);
  height: 3px;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
  z-index: 10; pointer-events: none;
  box-shadow: 0 0 10px #ffd700;
}
.reels-container::after {
  content: '';
  position: absolute; left: 0; right: 0;
  top: 50%; transform: translateY(-50%);
  height: 80px;
  background: linear-gradient(180deg, transparent, rgba(255,215,0,0.08), transparent);
  z-index: 9; pointer-events: none;
}

/* ===== 登录/注册页 ===== */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-box {
  width: 100%; max-width: 400px;
}
.auth-title {
  text-align: center; margin-bottom: 24px;
  font-size: 2rem; font-weight: 900;
  background: linear-gradient(180deg, #ffd700, #ff8c00);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-links {
  text-align: center; margin-top: 16px;
  font-size: 0.9rem; color: #888;
}
.auth-links a {
  color: #ffd700; text-decoration: none;
}
.auth-links a:hover { text-decoration: underline; }

/* ===== 管理后台 ===== */
.admin-page { padding: 80px 20px 20px; max-width: 1200px; margin: 0 auto; }
.admin-title {
  font-size: 1.8rem; font-weight: 900;
  background: linear-gradient(180deg, #ffd700, #ff8c00);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.admin-stat-card {
  background: linear-gradient(180deg, #1a1a2e, #0a0a1a);
  border: 2px solid #333; border-radius: 12px;
  padding: 20px; text-align: center;
}
.admin-stat-card .number {
  font-size: 2rem; font-weight: 900; color: #ffd700;
}
.admin-stat-card .label {
  font-size: 0.8rem; color: #888; text-transform: uppercase;
  margin-top: 4px;
}
.table-wrapper {
  background: #0a0a0a; border-radius: 12px;
  border: 2px solid #333; overflow: hidden;
}
.admin-table {
  width: 100%; border-collapse: collapse;
}
.admin-table th {
  background: #1a1a2e; color: #ffd700;
  padding: 12px; text-align: left;
  font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 1px; border-bottom: 2px solid #333;
}
.admin-table td {
  padding: 12px; border-bottom: 1px solid #222;
  font-size: 0.9rem;
}
.admin-table tr:hover td { background: rgba(255,215,0,0.03); }
.action-input {
  width: 80px; padding: 6px;
  background: #0a0a0a; border: 1px solid #333;
  border-radius: 6px; color: #fff; font-size: 0.85rem;
}
.badge {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; font-size: 0.75rem; font-weight: 700;
}
.badge-admin { background: #ffd700; color: #1a1a1a; }
.badge-user { background: #333; color: #ccc; }

/* ===== 响应式 ===== */
@media (max-width: 480px) {
  .panel { padding: 16px; border-radius: 16px; }
  .btn { padding: 12px 20px; font-size: 0.9rem; }
  .stat-box { min-width: 70px; padding: 8px 10px; }
  .nav-user { font-size: 0.8rem; }
}
