*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #000000;
  --card: #12121a;
  --border: #1e1e2e;
  --text: #e8e8f0;
  --muted: #6b6b80;
  --accent: #39ff14;
  --accent-dim: #2ecc12;
  --accent-glow: rgba(57, 255, 20, 0.25);
  --danger: #ff4458;
  --radius: 16px;
}

html, body {
  height: 100%;
  font-family: -apple-system, 'PingFang SC', 'Noto Sans SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* 星空背景 - 纯黑 + 星点 */
.stars {
  position: fixed;
  inset: 0;
  background-color: #000;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 30% 65%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 70% 45%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 85% 75%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 45% 90%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 92% 10%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 50% 50%, rgba(255,255,255,0.2), transparent);
  z-index: 0;
  pointer-events: none;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 侧边栏 */
.sidebar {
  position: fixed;
  top: 0; left: -280px;
  width: 260px;
  height: 100vh;
  background: rgba(12,12,20,0.97);
  backdrop-filter: blur(20px);
  z-index: 300;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}
.sidebar.open { left: 0; }

.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 250;
  display: none;
}
.sidebar-overlay.show { display: block; }

.sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.site-logo { width: 36px; height: 36px; border-radius: 8px; }
.logo-text { font-size: 1.3rem; font-weight: 700; color: var(--accent); }

.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-item {
  display: block;
  padding: 14px 24px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.nav-item.active, .nav-item:hover {
  color: var(--accent);
  background: rgba(57,255,20,0.06);
}

.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.sidebar-online { font-size: 0.85rem; color: var(--muted); }
.sidebar-online strong { color: var(--accent); }

/* 顶栏 */
.topbar {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: transparent;
  position: fixed;
  top: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  z-index: 100;
}
.menu-btn, .filter-btn {
  background: none; border: none;
  color: #fff; font-size: 1.3rem;
  cursor: pointer; padding: 6px;
  display: flex; align-items: center;
}
.menu-btn { margin-right: auto; }
.filter-btn { margin-left: auto; color: var(--accent); }
.topbar-title { flex: 1; text-align: center; font-weight: 600; font-size: 1rem; }
.topbar-online { font-size: 0.8rem; color: var(--accent); margin-left: auto; }

/* 页面 */
.main { flex: 1; padding-bottom: 60px; padding-top: 52px; }
.page { display: none; padding: 0; animation: fadeUp 0.3s; min-height: calc(100vh - 120px); }
.page.active { display: block; }
#page-home.active { padding: 0; }

/* ── 首页（截图风格） ── */
.home-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 130px);
  padding: 20px 28px 10px;
  text-align: center;
}

.brand-area { margin-bottom: 48px; }

.brand-logo-wrap {
  width: 100px; height: 100px;
  margin: 0 auto 16px;
  position: relative;
  filter: drop-shadow(0 0 24px rgba(57,255,20,0.6));
}
.brand-logo-svg { width: 100%; height: 100%; }
.logo-orbit {
  transform-origin: 60px 60px;
  animation: logoSpin 6s linear infinite;
}
@keyframes logoSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.brand-name {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 6px;
  color: #fff;
  margin-bottom: 10px;
}

.brand-online {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.brand-online span:first-of-type { color: var(--muted); }
.live-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s infinite;
}

/* 性别大按钮 */
.gender-pick {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 340px;
  margin-bottom: 28px;
}
.gender-btn {
  flex: 1;
  aspect-ratio: 1;
  max-height: 150px;
  background: #1a1a1a;
  border: 2px solid transparent;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
  transition: all 0.25s;
}
.gender-btn .gender-icon { font-size: 2rem; line-height: 1; }
.gender-btn.active {
  border-color: var(--accent);
  background: rgba(57,255,20,0.08);
  box-shadow: 0 0 20px rgba(57,255,20,0.15);
}

/* 年龄显示 */
.age-display {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 36px;
  padding: 8px 16px;
}
.age-display:hover { color: #fff; }

/* 开始聊天 - 白色大按钮 */
.btn-start-chat {
  width: 100%;
  max-width: 340px;
  background: #fff;
  color: #0a0a0f;
  border: none;
  padding: 18px;
  border-radius: 50px;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 2px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(255,255,255,0.12);
}
.btn-start-chat:active { transform: scale(0.97); }

/* 筛选弹窗 */
.filter-box { text-align: left; }
.filter-box h2 { text-align: center; margin-bottom: 16px; }
.filter-box h3 { font-size: 0.85rem; color: var(--muted); margin: 14px 0 8px; }

/* 页脚（截图风格） */
.footer {
  text-align: center;
  padding: 12px 20px 20px;
  font-size: 0.68rem;
  color: #555;
  border-top: none;
  background: transparent;
  line-height: 1.6;
}
.footer p { margin-bottom: 2px; }

.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.chip.active {
  border-color: var(--accent);
  background: rgba(57,255,20,0.1);
  color: var(--accent);
}

.age-range { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.age-range label { font-size: 0.85rem; color: var(--muted); }
.age-range label strong { color: var(--accent); }
.age-range input[type=range] { width: 100%; accent-color: var(--accent); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { opacity: 0.6; box-shadow: 0 0 0 8px transparent; }
}
#page-discover, #page-matches, #page-chat, #page-rules, #page-about, #page-queue {
  padding: 16px;
}

/* 按钮 */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #0a0a0f;
  border: none;
  padding: 14px 28px;
  border-radius: 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow); }
.btn-lg { padding: 16px; font-size: 1.05rem; margin-top: 20px; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* 排队 */
.queue-screen { text-align: center; padding: 60px 20px; }
.radar {
  width: 120px; height: 120px;
  margin: 0 auto 24px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: relative;
  animation: radar 2s infinite;
}
.radar::after {
  content: '';
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(57,255,20,0.3);
  border-radius: 50%;
}
@keyframes radar {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 30px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.anon-id { color: var(--accent); margin: 12px 0; }
.queue-tip { color: var(--muted); font-size: 0.85rem; margin-bottom: 24px; }

/* 发现卡片 */
.card-stack { position: relative; height: 420px; margin-bottom: 16px; }
.profile-card {
  position: absolute; inset: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, opacity 0.3s;
  cursor: grab;
}
.profile-card .avatar-area {
  height: 280px;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg, #1a1a28, #12121a);
}
.profile-card .info { padding: 16px; }
.profile-card h3 { font-size: 1.3rem; margin-bottom: 4px; }
.profile-card .meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 8px; }
.profile-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.profile-card .tag {
  background: rgba(57,255,20,0.1);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
}
.profile-card.swipe-left { transform: translateX(-120%) rotate(-12deg); opacity: 0; }
.profile-card.swipe-right { transform: translateX(120%) rotate(12deg); opacity: 0; }

.swipe-actions { display: flex; justify-content: center; gap: 20px; }
.swipe-btn {
  width: 56px; height: 56px;
  border-radius: 50%; border: none;
  font-size: 1.3rem; cursor: pointer;
  transition: transform 0.2s;
}
.swipe-btn:hover { transform: scale(1.1); }
.swipe-btn.skip { background: var(--card); color: var(--danger); border: 1px solid var(--border); }
.swipe-btn.like { background: var(--accent); color: #0a0a0f; }
.swipe-btn.super { background: #ffd700; color: #0a0a0f; }

/* 匹配列表 */
.match-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px; cursor: pointer;
}
.match-item .avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(57,255,20,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.match-item h4 { font-size: 0.95rem; }
.match-item p { color: var(--muted); font-size: 0.8rem; }

.empty-state { text-align: center; color: var(--muted); padding: 40px; }

/* 聊天 */
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  margin: -16px -16px 0;
}
.chat-partner { font-weight: 600; color: var(--accent); }
.chat-actions { display: flex; gap: 4px; }
.icon-btn {
  background: none; border: none;
  font-size: 1.2rem; cursor: pointer;
  padding: 6px; border-radius: 8px;
}
.icon-btn:hover { background: rgba(255,255,255,0.05); }

.report-btn, .block-btn { padding: 4px; }
.action-icon {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}
.report-modal-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.report-icon-lg {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.chat-messages {
  height: calc(100vh - 260px);
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
}
.msg.mine {
  align-self: flex-end;
  background: rgba(57,255,20,0.15);
  border: 1px solid rgba(57,255,20,0.2);
  color: var(--text);
}
.msg.theirs {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
}
.msg .msg-img {
  max-width: 200px;
  border-radius: 12px;
  cursor: pointer;
}
.msg .msg-time { font-size: 0.7rem; color: var(--muted); margin-top: 4px; }
.msg-emoji { font-size: 2rem; background: none !important; border: none !important; padding: 4px; }

.chat-input-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  position: sticky; bottom: 0;
  background: var(--bg);
}
.chat-input-bar input[type=text] {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}
.chat-input-bar input:focus { border-color: var(--accent); }
.send-btn {
  background: var(--accent);
  color: #0a0a0f;
  border: none;
  padding: 10px 18px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
}

.emoji-panel {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 0;
  max-height: 120px; overflow-y: auto;
}
.emoji-panel.hidden { display: none; }
.emoji-panel button {
  background: none; border: none;
  font-size: 1.5rem; cursor: pointer;
  padding: 4px; border-radius: 8px;
}
.emoji-panel button:hover { background: rgba(255,255,255,0.05); }

/* 内容页 */
.content-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.content-card h2 { color: var(--accent); margin-bottom: 16px; }
.content-card p { color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.rule-list { list-style: none; }
.rule-list li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; color: var(--muted); }

/* 弹窗 */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 400; padding: 20px;
}
.modal.hidden { display: none; }
.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 340px; width: 100%;
  text-align: center;
  position: relative;
}
.modal-glow {
  position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.modal-box h2 { margin-bottom: 12px; color: var(--accent); }
.modal-box textarea {
  width: 100%; background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 10px;
  color: var(--text); margin: 12px 0;
  resize: none;
}
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions button { flex: 1; }
.report-preview { max-width: 100%; border-radius: 10px; margin-top: 10px; }
.report-upload { margin: 10px 0; }

/* Toast */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 0.85rem;
  z-index: 500;
  animation: fadeUp 0.3s;
}
.toast.hidden { display: none; }

.hidden { display: none !important; }

/* 滚动条 */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
