/* ============================================================
   星途拼车团 · 全局样式
   深空渐变 + 玻璃拟态 + 细腻排版
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0e21;
  --bg-2: #140f33;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.11);
  --border: rgba(255, 255, 255, 0.13);
  --border-soft: rgba(255, 255, 255, 0.08);
  --text: #f4f5ff;
  --text-dim: #a8add1;
  --text-faint: #6b7099;
  --accent: #7c5cff;
  --accent-2: #ff5ce1;
  --accent-3: #4dd7ff;
  --grad: linear-gradient(135deg, #7c5cff, #ff5ce1);
  --grad-2: linear-gradient(135deg, #4dd7ff, #7c5cff);
  --good: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(2, 4, 20, 0.5);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 12% -8%, rgba(124, 92, 255, 0.30), transparent 62%),
    radial-gradient(1000px 520px at 108% 8%, rgba(255, 92, 225, 0.20), transparent 60%),
    radial-gradient(900px 640px at 50% 118%, rgba(77, 215, 255, 0.13), transparent 60%),
    linear-gradient(160deg, #0a0e21 0%, #120b2f 52%, #0a0e21 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; color: var(--text); }

/* ---------- 通用布局 ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.section { padding: 34px 0 10px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.section-title { font-size: 22px; font-weight: 800; letter-spacing: 0.5px; display: flex; align-items: center; gap: 10px; }
.section-title .tick { width: 6px; height: 22px; border-radius: 4px; background: var(--grad); box-shadow: 0 0 14px rgba(255, 92, 225, 0.6); }
.section-sub { color: var(--text-faint); font-size: 13px; margin-top: 4px; }
.muted { color: var(--text-faint); }
.dim { color: var(--text-dim); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.hidden { display: none !important; }
.flex { display: flex; align-items: center; gap: 10px; }

/* 微动效：上浮入场 */
.fade-in { animation: fadeUp .6s cubic-bezier(.2,.7,.3,1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.d1 { animation-delay: .06s; } .d2 { animation-delay: .14s; } .d3 { animation-delay: .22s; }
.d4 { animation-delay: .3s; } .d5 { animation-delay: .38s; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  background: rgba(10, 14, 33, 0.72);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand-logo {
  width: 38px; height: 38px; border-radius: 13px; background: var(--grad);
  display: grid; place-items: center; font-size: 19px; flex: none;
  box-shadow: 0 8px 22px rgba(124, 92, 255, 0.5);
  animation: logoFloat 4s ease-in-out infinite;
}
@keyframes logoFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-3px) } }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: .6px; line-height: 1.2; }
.brand-sub { display: block; font-size: 10px; font-weight: 500; color: var(--text-faint); letter-spacing: 1.4px; }
.nav-links { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.nav-link {
  padding: 8px 13px; border-radius: 12px; color: var(--text-dim);
  text-decoration: none; font-size: 13.5px; transition: .25s; white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--glass); }
.nav-link.active { color: var(--text); background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--border-soft); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 14px; padding: 11px 22px;
  font-size: 14.5px; font-weight: 600; color: var(--text);
  background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--border);
  transition: transform .22s, box-shadow .22s, background .22s, opacity .22s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--border), 0 12px 26px rgba(0,0,0,.35); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--grad); box-shadow: 0 10px 26px rgba(124, 92, 255, 0.42); }
.btn-primary:hover { box-shadow: 0 14px 34px rgba(124, 92, 255, 0.6); }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--border); color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); background: var(--glass); }
.btn-soft { background: var(--glass); box-shadow: inset 0 0 0 1px var(--border-soft); }
.btn-danger { background: linear-gradient(135deg, #f43f5e, #fb7185); box-shadow: 0 10px 26px rgba(244, 63, 94, .35); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn:disabled, .btn.disabled { opacity: .5; pointer-events: none; }

/* ---------- 表单 ---------- */
.form-card { background: var(--glass); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 26px; backdrop-filter: blur(14px); }
.field { margin-bottom: 18px; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 8px; }
.label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(10, 14, 33, 0.55); border: 1px solid var(--border);
  font-size: 14.5px; outline: none; transition: .22s; color: var(--text);
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 92, 255, .18); }
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-dim); }
.checkbox-row input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- 徽标 / 标签 ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-pickup { background: rgba(52, 211, 153, .15); color: var(--good); box-shadow: inset 0 0 0 1px rgba(52,211,153,.35); }
.badge-drop { background: rgba(255, 92, 225, .15); color: var(--accent-2); box-shadow: inset 0 0 0 1px rgba(255,92,225,.35); }
.badge-credit { background: rgba(255, 184, 77, .14); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(255,184,77,.35); }
.badge-verified { background: rgba(77, 215, 255, .14); color: var(--accent-3); box-shadow: inset 0 0 0 1px rgba(77,215,255,.4); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 8px; font-size: 11.5px; color: var(--text-dim); background: var(--glass); box-shadow: inset 0 0 0 1px var(--border-soft); }

/* ---------- 头像 ---------- */
.avatar { border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; box-shadow: 0 6px 16px rgba(0,0,0,.3); }

/* ---------- 行程卡片 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.ride-card {
  background: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 20px; backdrop-filter: blur(12px); cursor: pointer;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  display: flex; flex-direction: column; gap: 14px; text-decoration: none;
}
.ride-card:hover { transform: translateY(-5px); border-color: rgba(124,92,255,.5); box-shadow: var(--shadow); }
.ride-top { display: flex; gap: 13px; align-items: center; }
.ride-avatar { width: 52px; height: 52px; border-radius: 16px; flex: none; display: grid; place-items: center; font-size: 20px; font-weight: 800; color: #fff; box-shadow: 0 10px 22px rgba(0,0,0,.35); }
.ride-star { font-size: 17px; font-weight: 800; line-height: 1.3; }
.ride-airport { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.ride-main { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ride-meta { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; color: var(--text-dim); }
.ride-meta b { color: var(--text); font-weight: 700; }
.price { text-align: right; flex: none; }
.price-num { font-size: 24px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-unit { font-size: 12px; color: var(--text-faint); }
.seats { font-size: 12.5px; margin-top: 3px; }
.seats .left { color: var(--good); font-weight: 700; }
.seats .full { color: var(--danger); font-weight: 700; }
.ride-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-faint); padding-top: 12px; border-top: 1px dashed var(--border-soft); }

/* ---------- 搜索 / 筛选 ---------- */
.searchbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch;
  background: var(--glass); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 12px; backdrop-filter: blur(14px); margin-bottom: 16px;
}
.search-field { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; background: rgba(10,14,33,.55); border: 1px solid var(--border); border-radius: 13px; padding: 0 14px; }
.search-field input { flex: 1; background: transparent; border: none; outline: none; padding: 11px 0; font-size: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--text-dim); background: var(--glass); border: 1px solid var(--border-soft);
  transition: .22s;
}
.chip:hover { color: var(--text); border-color: var(--border); }
.chip.active { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 8px 20px rgba(124,92,255,.4); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 30px; position: relative; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--border-soft); font-size: 12.5px; color: var(--text-dim); margin-bottom: 20px; }
.hero-title { font-size: clamp(30px, 5.4vw, 52px); font-weight: 900; line-height: 1.16; letter-spacing: 1px; }
.hero-title .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-title .grad-2 { background: var(--grad-2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 16px 0 26px; color: var(--text-dim); font-size: 15.5px; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { background: var(--glass); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 18px 16px; backdrop-filter: blur(12px); text-align: center; transition: .3s; }
.stat:hover { transform: translateY(-3px); border-color: rgba(124,92,255,.45); }
.stat-num { font-size: 26px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; }

/* ---------- 安全横幅 ---------- */
.safety {
  display: flex; gap: 16px; align-items: flex-start;
  background: linear-gradient(120deg, rgba(251,191,36,.12), rgba(251,113,133,.12));
  border: 1px solid rgba(251, 191, 36, .35); border-radius: var(--radius);
  padding: 18px 20px; margin: 8px 0 26px;
}
.safety-icon { font-size: 26px; line-height: 1; flex: none; }
.safety-title { font-weight: 800; font-size: 15px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.safety p { font-size: 13.5px; color: var(--text-dim); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 46px 16px; color: var(--text-faint); background: var(--glass); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty .big { font-size: 40px; margin-bottom: 10px; }

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 18px;
  background: rgba(4, 6, 18, 0.66); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: .28s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 420px; max-height: 90vh; overflow: auto;
  background: linear-gradient(170deg, #191a3a, #120f2e); border: 1px solid var(--border);
  border-radius: 22px; padding: 26px; box-shadow: var(--shadow);
  transform: translateY(22px) scale(.96); transition: .28s cubic-bezier(.2,.8,.3,1.2);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.modal-title { font-size: 19px; font-weight: 800; }
.modal-close { width: 32px; height: 32px; border-radius: 10px; border: none; background: var(--glass); color: var(--text-dim); font-size: 16px; transition: .2s; }
.modal-close:hover { color: var(--text); background: var(--glass-strong); }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  background: linear-gradient(170deg, #1b1c3f, #141133); border: 1px solid var(--border);
  padding: 11px 20px; border-radius: 14px; font-size: 14px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 9px; animation: toastIn .35s cubic-bezier(.2,.8,.3,1.2) both;
}
.toast.ok { border-color: rgba(52,211,153,.5); }
.toast.err { border-color: rgba(251,113,133,.5); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.92); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- 详情页 ---------- */
.detail-hero { background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border: 1px solid var(--border-soft); border-radius: 24px; padding: 28px; backdrop-filter: blur(12px); margin-top: 24px; }
.detail-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.detail-star { font-size: 26px; font-weight: 900; }
.detail-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 22px; }
.kv { background: var(--glass); border: 1px solid var(--border-soft); border-radius: 14px; padding: 14px; }
.kv-label { font-size: 12px; color: var(--text-faint); margin-bottom: 4px; }
.kv-value { font-size: 15.5px; font-weight: 700; }
.card { background: var(--glass); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(12px); margin-bottom: 18px; }
.card-title { font-size: 17px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.card-title .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 10px rgba(255,92,225,.8); }

/* 成员 */
.member-list { display: flex; flex-direction: column; gap: 12px; }
.member { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--glass); border: 1px solid var(--border-soft); border-radius: 16px; transition: .25s; }
.member:hover { border-color: rgba(124,92,255,.4); transform: translateX(3px); }
.member-info { flex: 1; min-width: 0; }
.member-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.member-sub { font-size: 12.5px; color: var(--text-faint); }
.member-role { font-size: 11px; color: var(--accent-2); font-weight: 700; }

/* 评分 */
.stars { color: var(--warn); letter-spacing: 2px; font-size: 14px; }
.stars .off { opacity: .25; }

/* 评论 */
.comment { padding: 14px 0; border-bottom: 1px dashed var(--border-soft); }
.comment:last-child { border-bottom: none; }
.comment-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.comment-body { font-size: 14px; color: var(--text-dim); white-space: pre-wrap; word-break: break-word; }

/* 帖子 */
.post { padding: 20px; background: var(--glass); border: 1px solid var(--border-soft); border-radius: var(--radius); margin-bottom: 16px; transition: .25s; }
.post:hover { border-color: rgba(124,92,255,.4); }
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-title { font-size: 16.5px; font-weight: 800; margin-bottom: 8px; cursor: pointer; }
.post-title:hover { color: var(--accent-3); }
.post-content { color: var(--text-dim); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.post-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.like-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border-soft); background: var(--glass); color: var(--text-dim); font-size: 13px; transition: .2s; }
.like-btn:hover { color: var(--danger); border-color: rgba(251,113,133,.4); }
.like-btn.liked { color: var(--danger); border-color: rgba(251,113,133,.5); background: rgba(251,113,133,.1); }
.reply-box { margin-top: 12px; }

/* ---------- 个人中心 ---------- */
.profile-card { display: flex; gap: 20px; align-items: center; background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border: 1px solid var(--border-soft); border-radius: 24px; padding: 26px; backdrop-filter: blur(12px); margin-top: 24px; flex-wrap: wrap; }
.profile-avatar { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #fff; box-shadow: 0 16px 34px rgba(0,0,0,.4); flex: none; }
.profile-info { flex: 1; min-width: 200px; }
.profile-name { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-credit { text-align: right; }
.credit-num { font-size: 34px; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.credit-label { font-size: 12px; color: var(--text-faint); }

/* 标签页 */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid var(--border-soft); overflow-x: auto; }
.tab { padding: 11px 18px; font-size: 14px; font-weight: 600; color: var(--text-dim); background: none; border: none; border-bottom: 2px solid transparent; transition: .22s; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent-2); }

/* 评价列表 */
.rating-item { display: flex; gap: 12px; padding: 14px; background: var(--glass); border: 1px solid var(--border-soft); border-radius: 16px; margin-bottom: 12px; }

/* ---------- 底部 ---------- */
.footer { margin-top: 60px; border-top: 1px solid var(--border-soft); padding: 34px 0 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-faint); font-size: 13px; }
.footer b { color: var(--text-dim); }
.footer a { color: var(--text-faint); text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
  .hero { padding: 40px 0 20px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .detail-kv { grid-template-columns: repeat(2, 1fr); }
  .profile-card { flex-direction: column; text-align: center; align-items: center; }
  .profile-credit { text-align: center; }
  .nav-link { padding: 8px 10px; font-size: 13px; }
  .nav-links { gap: 0; }
}
@media (max-width: 560px) {
  .brand-name span { display: none; }
  .nav-cta .btn { padding: 8px 12px; font-size: 13px; }
  .section-title { font-size: 19px; }
}
