/* ============ 2399小游戏 - 全局设计系统 ============ */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

:root {
  /* 色彩系统 */
  --bg-primary: #0a0a1a;
  --bg-secondary: #141428;
  --bg-card: #1a1a35;
  --bg-card-hover: #222250;
  --bg-input: #0d0d24;
  --bg-modal: #12122e;

  --neon-cyan: #00f0ff;
  --neon-cyan-dim: rgba(0, 240, 255, 0.15);
  --neon-pink: #ff6b9d;
  --neon-pink-dim: rgba(255, 107, 157, 0.15);
  --neon-green: #00ff88;
  --neon-yellow: #ffd700;
  --neon-purple: #b44dff;

  --text-primary: #e0e0ff;
  --text-secondary: #8888aa;
  --text-muted: #555577;

  --border-color: #2a2a4a;
  --border-glow: rgba(0, 240, 255, 0.3);

  /* 阴影 */
  --shadow-neon: 0 0 20px rgba(0, 240, 255, 0.2), 0 0 40px rgba(0, 240, 255, 0.05);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* 字体 */
  --font-display: 'Orbitron', monospace;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* 间距 */
  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap-md: 16px;
  --gap-lg: 24px;
  --gap-xl: 32px;

  /* 动画 */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ============ 基础重置 ============ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* 背景粒子/网格效果 */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--neon-pink); }

img { max-width: 100%; display: block; }

/* ============ 通用按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-xs);
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), #00c4ff);
  color: var(--bg-primary);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--neon-cyan);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--neon-cyan);
  background: var(--bg-card-hover);
}

.btn-pink {
  background: linear-gradient(135deg, var(--neon-pink), #ff4088);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
}

.btn-pink:hover {
  box-shadow: 0 0 30px rgba(255, 107, 157, 0.5);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1.1rem;
}

/* ============ 输入框 ============ */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.input-field {
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
}

.input-field:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

.input-field::placeholder {
  color: var(--text-muted);
}

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 26, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 var(--gap-xl);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--neon-cyan);
  text-decoration: none;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.logo-icon {
  font-size: 1.8rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--gap-lg);
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
}

.user-section {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.user-name {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ============ Footer ============ */
.footer {
  text-align: center;
  padding: var(--gap-xl);
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  margin-top: var(--gap-xl);
}

/* ============ 页面容器 ============ */
.page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--gap-xl);
  position: relative;
  z-index: 1;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: var(--gap-xs);
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: var(--gap-xl);
}

/* ============ Modal ============ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--gap-xl);
  min-width: 360px;
  max-width: 90vw;
  box-shadow: var(--shadow-neon), var(--shadow-card);
  animation: slideUp 0.3s ease;
}

/* ============ 动画 ============ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(0, 240, 255, 0.3); }
  50% { box-shadow: 0 0 20px rgba(0, 240, 255, 0.6); }
}

/* ============ 页面切换动画 ============ */
.page-view {
  animation: slideUp 0.3s ease;
}

/* ============ Toast 提示 ============ */
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 300;
  animation: slideInRight 0.3s ease;
}

.toast-success {
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
}

.toast-error {
  background: rgba(255, 107, 157, 0.15);
  border: 1px solid var(--neon-pink);
  color: var(--neon-pink);
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============ 滚动条美化 ============ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }
