/* ============================================================
   旅行者1号 Voyager 1 — 星空主题样式
   主色：#0B0C10（深邃星空蓝黑） / #D4AF37（旅行者金唱片金）
   ============================================================ */

:root {
  --bg: #0B0C10;
  --bg-2: #10121a;
  --bg-3: #161923;
  --panel: #11131b;
  --border: #232633;
  --border-soft: #1c1f2b;
  --gold: #D4AF37;
  --gold-soft: #e7c766;
  --gold-dim: rgba(212, 175, 55, .16);
  --text: #e6e8f0;
  --muted: #8a90a8;
  --muted-2: #5d6478;
  --ok: #3ecf8e;
  --warn: #e8a23a;
  --err: #e05c5c;
  --info: #5b9dff;
  --violet: #9b7bff;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .5);
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(88, 70, 180, .18), transparent 60%),
    radial-gradient(900px 500px at 0% 20%, rgba(30, 90, 160, .12), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-soft); }
img, video { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-alt { background: rgba(16, 18, 26, .6); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.gold { color: var(--gold); }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 12, 16, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); letter-spacing: .5px; }
.brand:hover { color: var(--text); }
.brand-mark { display: inline-flex; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
.main-nav a {
  color: var(--muted); padding: 8px 13px; border-radius: 8px; font-size: .94em; transition: .18s;
}
.main-nav a:hover { color: var(--text); background: var(--bg-3); }
.main-nav a.active { color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.auth-links, .user-chip { display: flex; align-items: center; gap: 12px; }
.chip-link { color: var(--text); font-size: .92em; }
.chip-link.subtle { color: var(--muted); }
.lang-switch {
  background: var(--bg-3); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px; font-size: .86em; cursor: pointer;
}
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; border: 1px solid transparent;
  font-size: .95em; font-weight: 600; cursor: pointer; transition: .2s; text-decoration: none;
  font-family: inherit;
}
.btn-lg { padding: 15px 30px; font-size: 1.05em; }
.btn-sm { padding: 7px 14px; font-size: .86em; }
.btn-block { width: 100%; }
.btn-gold { background: linear-gradient(135deg, #e7c766, #D4AF37); color: #1a1405; box-shadow: 0 6px 22px rgba(212, 175, 55, .28); }
.btn-gold:hover { filter: brightness(1.06); color: #1a1405; }
.btn-outline { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn-outline:hover { background: var(--gold-dim); }
.btn-ghost { background: var(--bg-3); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- 首页 Hero ---------- */
.hero { position: relative; min-height: 88vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: saturate(.9); opacity: .85;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,12,16,.55) 0%, rgba(11,12,16,.35) 45%, var(--bg) 100%);
}
.hero-content { position: relative; text-align: center; max-width: 820px; padding-top: 40px; padding-bottom: 40px; }
.hero-record { width: 120px; height: 120px; margin: 0 auto 22px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold); box-shadow: 0 0 60px rgba(212,175,55,.35); animation: float 6s ease-in-out infinite; }
.hero-record img { width: 100%; height: 100%; object-fit: cover; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }
.hero-subtitle { color: var(--gold); letter-spacing: 4px; text-transform: uppercase; font-size: .85em; margin-bottom: 14px; }
.hero-title { font-size: clamp(28px, 5vw, 50px); line-height: 1.2; font-weight: 800; margin-bottom: 18px; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.hero-desc { color: #c7cbd9; font-size: 1.06em; max-width: 640px; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- 版块卡片 ---------- */
.section-title { font-size: 1.7em; font-weight: 700; margin-bottom: 34px; text-align: center; letter-spacing: .5px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; transition: .22s; color: var(--text); position: relative; overflow: hidden;
}
.cat-card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: var(--shadow); color: var(--text); }
.cat-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(300px 120px at 50% 0, var(--gold-dim), transparent 70%); opacity: 0; transition: .3s; }
.cat-card:hover::after { opacity: 1; }
.cat-icon { font-size: 30px; display: block; margin-bottom: 14px; }
.cat-card h3 { font-size: 1.12em; margin-bottom: 8px; color: var(--gold); }
.cat-card p { color: var(--muted); font-size: .9em; }

/* ---------- 步骤 ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step-card { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 24px; }
.step-num { width: 38px; height: 38px; border-radius: 50%; background: var(--gold-dim); color: var(--gold); display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 14px; }
.step-card h3 { margin-bottom: 8px; font-size: 1.05em; }
.step-card p { color: var(--muted); font-size: .9em; }

/* ---------- CTA ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--bg-2), #1a1626);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-banner h2 { font-size: 1.5em; margin-bottom: 8px; }
.cta-banner p { color: var(--muted); }

/* ---------- 卡片 / 通用 ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.page { padding: 44px 20px 64px; }
.page-title { font-size: 1.9em; font-weight: 800; margin-bottom: 10px; }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--muted); font-size: .92em; }
.back-link:hover { color: var(--gold); }

/* ---------- 心愿列表 ---------- */
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 30px; }
.filter-tab { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: .9em; transition: .18s; }
.filter-tab:hover { color: var(--text); }
.filter-tab.active { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }
.grid-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.wish-card { display: flex; flex-direction: column; gap: 10px; color: var(--text); transition: .2s; }
.wish-card:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow); color: var(--text); }
.wish-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wish-name { font-size: 1.15em; }
.wish-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.reward { color: var(--gold); font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; border: 1px dashed var(--border); border-radius: var(--radius); }

/* ---------- 徽章 ---------- */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78em; font-weight: 600; }
.badge-cat { background: var(--bg-3); color: var(--gold); border: 1px solid var(--border); }
.badge-gold { background: var(--gold-dim); color: var(--gold); }
.badge-status { border: 1px solid var(--border); color: var(--muted); }
.status-active { color: var(--gold); }
.status-matched { color: var(--info); }
.status-in_progress { color: var(--info); }
.status-fulfilled { color: var(--ok); }
.status-refunded { color: var(--err); }
.status-to_be_implemented { color: var(--violet); }
.status-applied { color: var(--muted); }
.status-accepted { color: var(--info); }
.status-delivering { color: var(--warn); }
.status-completed { color: var(--ok); }
.status-failed { color: var(--err); }
.status-cancelled { color: var(--muted-2); }

/* ---------- 表单 ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.field > span { font-size: .88em; color: var(--muted); }
.field input, .field textarea, .field select {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); padding: 12px 14px; font-size: .98em; font-family: inherit; width: 100%;
  transition: .18s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.form-row { display: flex; gap: 16px; }
.input-group { display: flex; gap: 8px; }
.input-group select { width: 110px; flex: none; }

/* 四大板块 Tab（发布表单）*/
.cat-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cat-tab {
  position: relative; cursor: pointer; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; background: var(--bg-2); transition: .2s; display: flex; flex-direction: column; gap: 6px;
}
.cat-tab input { position: absolute; opacity: 0; }
.cat-tab-title { color: var(--text); font-weight: 600; }
.cat-tab-desc { color: var(--muted); font-size: .8em; line-height: 1.4; }
.cat-tab.selected, .cat-tab:has(input:checked) { border-color: var(--gold); background: var(--gold-dim); }
.cat-tab.selected .cat-tab-title, .cat-tab:has(input:checked) .cat-tab-title { color: var(--gold); }

.escrow-note { background: var(--gold-dim); border: 1px solid var(--gold); border-radius: 12px; padding: 16px 18px; }
.escrow-note p { color: var(--muted); margin-top: 6px; font-size: .9em; }
.escrow-note .small { color: var(--gold); }

/* ---------- 认证 ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 60px 20px; }
.auth-card { width: 100%; max-width: 460px; }

/* ---------- Flash ---------- */
.flash { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .94em; border: 1px solid; }
.flash-success { background: rgba(62, 207, 142, .12); border-color: var(--ok); color: var(--ok); }
.flash-error { background: rgba(224, 92, 92, .12); border-color: var(--err); color: var(--err); }
.flash-info { background: rgba(91, 157, 255, .12); border-color: var(--info); color: var(--info); }

/* ---------- 详情 ---------- */
.detail-card { margin-bottom: 22px; }
.meta-grid { display: flex; flex-wrap: wrap; gap: 26px; margin: 18px 0; }
.meta-grid > div { display: flex; flex-direction: column; }
.meta-grid .muted { font-size: .8em; }
.detail-desc { color: #c7cbd9; margin: 12px 0 18px; white-space: pre-wrap; }
.order-card { margin-bottom: 14px; }
.order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.order-card form { margin-top: 4px; }

/* ---------- 重温时刻 ---------- */
.moments-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.moment { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.moment img, .moment video { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.moment figcaption { padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; font-size: .9em; }
.moment figcaption span { color: var(--muted); }

/* ---------- 个人星图 ---------- */
.profile-head { display: flex; gap: 22px; align-items: center; margin-bottom: 34px; }
.profile-info { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #e7c766, #D4AF37);
  color: #1a1405; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 1.2em; flex: none;
}
.avatar-lg { width: 84px; height: 84px; font-size: 2em; }

/* ---------- 工程师 ---------- */
.engineer-card { display: flex; align-items: center; gap: 16px; }
.engineer-info { flex: 1; }
.engineer-info h3 { margin-bottom: 4px; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border-soft); background: var(--bg-2); padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.footer-tagline { color: var(--muted); font-size: .92em; }
.footer-rights { color: var(--muted-2); font-size: .8em; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .cat-grid, .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-list { grid-template-columns: repeat(2, 1fr); }
  .cat-tabs { grid-template-columns: repeat(2, 1fr); }
  .main-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(11, 12, 16, .98); flex-direction: column; padding: 12px 20px 20px;
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
}

@media (max-width: 560px) {
  .grid-list, .cat-grid, .steps-grid, .moments-grid { grid-template-columns: 1fr; }
  .cat-tabs { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .header-actions .auth-links .chip-link { display: none; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .cta-banner { flex-direction: column; text-align: center; }
  .meta-grid { gap: 16px; }
}

/* ============================================================
   RTL（阿拉伯语）
   ============================================================ */
[dir="rtl"] .main-nav { margin-left: 0; margin-right: 8px; }
[dir="rtl"] .brand, [dir="rtl"] .footer-brand { flex-direction: row-reverse; }
