* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0f0f12;
  --surface: #1a1a20;
  --border: #2a2a35;
  --text: #e8e8ed;
  --text-muted: #8888a0;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #3b3b48;
  --success: #22c55e;
  --error: #ef4444;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.logo { font-size: 1.25rem; font-weight: 700; }

.nav { display: flex; align-items: center; gap: 0.75rem; }

.user-info { color: var(--text-muted); font-size: 0.9rem; }

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}
a.btn {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}
a.btn-primary { color: white; }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--secondary); color: var(--text); }
.btn-secondary:hover { background: #454555; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-block { width: 100%; padding: 0.75rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }

.main {
  flex: 1;
  padding: 3rem 2rem;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

/* 主页 */
.home-page { text-align: center; }
.hero { padding: 3rem 0; }
.hero h2 { font-size: 2rem; margin-bottom: 1rem; }
.hero-desc { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2rem; line-height: 1.6; }
.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.hero-hint { color: var(--text-muted); font-size: 0.9rem; }
.hero-welcome { font-size: 1.1rem; margin-bottom: 0.5rem; }

/* 登录/注册弹层 */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.auth-modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
}
.auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}
.auth-close:hover { color: var(--text); }

.form-card h3 { margin-bottom: 1.5rem; font-size: 1.25rem; }

.form-card input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
}

.form-card input::placeholder { color: var(--text-muted); }
.form-card input:focus { outline: none; border-color: var(--primary); }

.form-switch { margin-top: 1rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.form-switch a { color: var(--primary); text-decoration: none; }
.form-switch a:hover { text-decoration: underline; }

.message {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 200;
  max-width: 90%;
}
.message.success { background: rgba(34, 197, 94, 0.2); color: var(--success); border: 1px solid var(--success); }
.message.error { background: rgba(239, 68, 68, 0.2); color: var(--error); border: 1px solid var(--error); }

.hidden { display: none !important; }

.footer {
  padding: 1rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.footer-link { color: var(--text-muted); text-decoration: none; }
.footer-link:hover { color: var(--primary); }
