/* 账号与行程大厅类页面（登录、注册、我的旅程、新的行程、加入、我的）共用样式。
   颜色和组件沿用首页 / 我的档案页现有的值；头像和抽屉内容见 crew.css。 */
:root {
  --male-blue: #3A86FF;
  --female-pink: #FF006E;
  --accent-primary: #6366F1;
  --accent-gradient: linear-gradient(135deg, #6366F1 0%, #A855F7 100%);
  --bg-main: #F8FAFC;
  --text-dark: #0F172A;
  --text-light: #64748B;
  --text-hint: #94A3B8;
  --border: #E2E8F0;
  --divider: #F1F5F9;
  --input-bg: #F1F5F9;
  --danger: #FF4336;
  --ok: #059669;
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.03);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.06);
  --shadow-accent: 0 8px 20px rgba(99, 102, 241, 0.25);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg-main); }
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', Roboto, system-ui, sans-serif; color: var(--text-dark); min-height: 100vh; overflow-x: hidden; padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
body.has-nav { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; text-align: inherit; }
#app { max-width: 600px; margin: 0 auto; }
.ambient-light { position: fixed; top: -150px; right: -50px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(255,255,255,0) 70%); z-index: -1; pointer-events: none; }

/* 页头 */
.page-header { padding: calc(36px + env(safe-area-inset-top)) 20px 18px; }
.header-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-title { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-title.sm { font-size: 20px; }
.page-sub { font-size: 14px; color: var(--text-light); line-height: 1.5; margin-top: 10px; }
.icon-btn { width: 44px; height: 44px; background: white; border: 1px solid rgba(0,0,0,0.03); border-radius: 14px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); color: var(--text-dark); flex-shrink: 0; transition: transform .15s; }
.icon-btn:active, .me-btn:active { transform: scale(0.94); }
.me-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-gradient); color: white; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); flex-shrink: 0; transition: transform .15s; }

/* 卡片 / 表单 */
.section { padding: 0 20px; }
.card { display: block; width: 100%; background: white; border-radius: 24px; padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.section-label { font-size: 13px; font-weight: 600; color: var(--text-light); margin: 22px 4px 10px; }
.section-label.first { margin-top: 0; }
.form-group { margin-top: 18px; }
.form-group:first-child { margin-top: 0; }
.form-group label, .field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-light); margin-bottom: 8px; }
.input, .textarea { width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid transparent; background: var(--input-bg); color: var(--text-dark); font-size: 16px; font-family: inherit; -webkit-appearance: none; transition: all .2s; }
.input:focus, .textarea:focus { outline: none; background: #fff; border-color: var(--accent-primary); box-shadow: 0 0 0 4px rgba(99,102,241,0.1); }
.textarea { resize: none; min-height: 88px; line-height: 1.5; }
.input.code-input { text-align: center; font-size: 26px; font-weight: 700; letter-spacing: 0.3em; padding: 14px 8px 14px calc(8px + 0.3em); }
.input.upper { text-transform: uppercase; letter-spacing: 0.12em; }
.hint-text { font-size: 12px; color: var(--text-hint); margin-top: 10px; line-height: 1.5; text-align: center; }
.err { font-size: 13px; color: var(--danger); margin-top: 10px; min-height: 1.2em; }
.btn-primary { display: block; width: 100%; padding: 15px; margin-top: 16px; background: var(--accent-gradient); color: white; border-radius: 16px; font-size: 16px; font-weight: 600; box-shadow: var(--shadow-accent); text-align: center; transition: all .2s; }
.btn-primary:active { transform: scale(0.98); box-shadow: none; }
.btn-primary:disabled { opacity: .6; }
.btn-secondary { display: block; width: 100%; padding: 14px; margin-top: 12px; background: white; border: 1px solid var(--border); border-radius: 16px; font-size: 15px; font-weight: 600; text-align: center; }
.btn-text { display: block; width: 100%; padding: 14px; margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--text-light); text-align: center; }

/* 列表 */
.list-card { padding: 2px 18px; }
.list-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 0; border-bottom: 1px solid var(--divider); text-align: left; }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.row-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-title.danger { color: var(--danger); }
.row-sub { font-size: 13px; color: var(--text-light); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-ic { width: 36px; display: flex; justify-content: center; color: var(--text-light); }
.chev { color: #CBD5E1; }

/* 开始一段旅程：二选一 + 加入 */
.empty-head { font-size: 20px; font-weight: 700; margin: 4px 4px 16px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: white; border-radius: 24px; padding: 20px 16px 18px; box-shadow: var(--shadow-sm); transition: transform .15s; }
.choice:active { transform: scale(0.97); }
.choice .ci { width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.choice .ci .lt-i { width: 24px; height: 24px; }
.ci.solo { background: #E0E7FF; color: #4338CA; }
.ci.together { background: #D1FAE5; color: #059669; }
.choice b { font-size: 17px; font-weight: 700; }
.choice .d { font-size: 13px; color: var(--text-light); line-height: 1.5; }
.join-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; width: 100%; background: white; border-radius: 20px; padding: 14px 12px 14px 16px; box-shadow: var(--shadow-sm); text-align: left; }
.join-row .grow { flex: 1; min-width: 0; }

/* 待处理：收到邀请 / 有人想加入 / 等对方同意 */
.invite-card { margin: 0 20px 14px; background: white; border-radius: 24px; padding: 14px; box-shadow: var(--shadow-sm); }
.section .invite-card { margin-left: 0; margin-right: 0; }
.trip-preview { display: flex; align-items: center; gap: 12px; text-align: left; }
.trip-preview .grow { flex: 1; min-width: 0; }
.thumb { width: 56px; height: 56px; border-radius: 16px; background-color: rgba(99,102,241,0.08); background-size: cover; background-position: center; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--accent-primary); font-size: 13px; font-weight: 800; overflow: hidden; }
.thumb.sm { width: 36px; height: 36px; border-radius: 12px; font-size: 10px; }
.pv-from { font-size: 13px; color: var(--text-light); margin-bottom: 2px; }
.ic-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 10px; }
.request-card { margin: 0 20px 14px; display: flex; align-items: center; gap: 10px; background: white; border-radius: 20px; padding: 12px 12px 12px 14px; box-shadow: var(--shadow-sm); font-size: 14px; }
.request-card .grow { flex: 1; min-width: 0; line-height: 1.4; }
.request-card .sub { display: block; font-size: 12px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 我的旅程 */
.trip-card { display: block; margin: 0 20px 14px; background: white; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .2s; }
.trip-card:active { transform: scale(0.99); }
.trip-cover { height: 150px; position: relative; background-color: rgba(99,102,241,0.08); background-size: cover; background-position: center; }
.trip-cover .cover-city { position: absolute; left: 20px; bottom: 14px; color: var(--accent-primary); font-size: 28px; font-weight: 800; letter-spacing: -0.5px; opacity: 0.5; }
.badge-current { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.92); color: var(--text-dark); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 100px; }
.trip-body { display: flex; align-items: center; gap: 8px; padding: 14px 6px 14px 18px; }
.trip-body .grow { flex: 1; min-width: 0; }
.trip-name { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-meta { font-size: 13px; color: var(--text-light); margin-top: 3px; }
.more-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-hint); flex-shrink: 0; }
.add-trip { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 20px 14px; padding: 18px; border: 1.5px dashed #CBD5E1; border-radius: 24px; color: var(--text-light); font-size: 15px; font-weight: 600; }
.add-trip .lt-i { width: 18px; height: 18px; }
.list-label { font-size: 13px; font-weight: 600; color: var(--text-light); margin: 22px 24px 10px; }
.quiet-link { display: block; width: 100%; text-align: center; font-size: 13px; color: var(--text-hint); padding: 10px 0; }
.add-ic { width: 36px; height: 36px; border-radius: 50%; border: 1.5px dashed #CBD5E1; display: flex; align-items: center; justify-content: center; color: var(--text-light); flex-shrink: 0; }
.add-ic .lt-i { width: 16px; height: 16px; }

/* 加入 */
.found { margin-top: 16px; padding: 14px; border-radius: 18px; background: var(--input-bg); }
.status-line { margin-top: 12px; font-size: 14px; color: var(--text-light); text-align: center; }

/* 居中整页（发邀请 / 收到链接 / 加入成功） */
.success { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px 28px; }
.success .pair-art { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; animation: pop .5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both; }
.success .link-line { width: 40px; height: 2px; border-radius: 1px; background: var(--border); }
.success .from { font-size: 14px; color: var(--text-light); margin-bottom: 6px; }
.success h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.success p { font-size: 15px; color: var(--text-light); line-height: 1.6; margin-bottom: 22px; }
.success .actions { width: 100%; max-width: 360px; }
@keyframes pop { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

/* 登录注册 */
.auth { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 48px 24px; }
.brand { text-align: center; margin-bottom: 28px; }
.brand-name { font-size: 34px; font-weight: 800; letter-spacing: -0.5px; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-size: 14px; color: var(--text-light); margin-top: 4px; }
.auth-card { background: white; border-radius: 28px; padding: 24px; box-shadow: var(--shadow-lg); }
.auth-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.auth-top { margin-bottom: 20px; padding: 12px; border-radius: 18px; background: var(--input-bg); }
.auth-top .from-line { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 18px; font-size: 14px; color: var(--text-light); }
.auth-links a { color: var(--accent-primary); font-weight: 600; }
.auth-note { text-align: center; font-size: 12px; color: var(--text-hint); margin-top: 18px; line-height: 1.6; }
.inviter { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--ok); font-weight: 600; }
.inviter.bad { color: var(--danger); }
.banner-note { padding: 10px 14px; border-radius: 14px; background: var(--input-bg); color: var(--text-light); font-size: 13px; margin-bottom: 16px; line-height: 1.6; }

/* 我的 */
.profile-card { display: flex; align-items: flex-start; gap: 14px; text-align: left; }
.profile-card .grow { flex: 1; min-width: 0; }
.profile-card .prefs { font-size: 13px; line-height: 1.5; margin-top: 8px; color: var(--text-dark); white-space: pre-wrap; }
.profile-card .prefs .ph { color: var(--text-hint); }
.profile-card .chev { margin-top: 14px; }
.code-display { font-size: 34px; font-weight: 800; letter-spacing: 0.22em; text-align: center; margin: 10px 0 2px; padding-left: 0.22em; font-variant-numeric: tabular-nums; }

/* 抽屉外壳（内容样式见 crew.css） */
.drawer-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0); z-index: 500; display: flex; align-items: flex-end; justify-content: center; transition: background .35s; }
.drawer-overlay.open { background: rgba(15,23,42,0.5); }
.drawer-sheet { width: 100%; max-width: 600px; background: #fff; border-radius: 28px 28px 0 0; padding: 12px 20px calc(env(safe-area-inset-bottom, 6px) + 16px); transform: translateY(100%); transition: transform .4s cubic-bezier(0.32, 0.72, 0, 1); max-height: 85vh; overflow-y: auto; }
.drawer-sheet.dragging { transition: none; }
.drawer-overlay.open .drawer-sheet { transform: translateY(0); }
.drawer-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto 16px; }

/* 讲解视频：入口卡片 + 全屏播放层（注册页、我的）。颜色沿用 account.css 变量 */
.iv-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px 10px 10px; margin-bottom: 16px; border: 0; border-radius: 20px;
           background: white; box-shadow: var(--shadow-sm); text-align: left; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.iv-card:active { transform: scale(.98); }
.iv-thumb { position: relative; flex: none; width: 46px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--input-bg) center / cover; }
.iv-play { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: rgba(15, 23, 42, .55);
           display: grid; place-items: center; }
.iv-play svg { width: 10px; height: 10px; margin-left: 2px; fill: #fff; }
.iv-card .grow { flex: 1; min-width: 0; }
.iv-title { display: block; font-size: 15px; font-weight: 600; }
.iv-sub { display: block; font-size: 12.5px; color: var(--text-light); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-layer { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .94);
            padding: calc(env(safe-area-inset-top) + 60px) 16px calc(env(safe-area-inset-bottom) + 24px); opacity: 0; transition: opacity .25s ease; }
.iv-layer[hidden] { display: none; }   /* 自己写了 display，hidden 要显式补上，否则关掉后透明层仍挡住整页点击 */
.iv-layer.on { opacity: 1; }
.iv-layer video { display: block; max-width: 100%; max-height: 100%; aspect-ratio: 9 / 16; border-radius: 18px; background: #F8FAFC; }
.iv-close { position: absolute; top: calc(env(safe-area-inset-top) + 12px); right: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
            background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); color: #fff; cursor: pointer; }
.iv-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
