/* 附近租 — 全站样式（大红主色 · 科技暗色风） */
:root {
  --primary: #ee1c26;
  --primary-bright: #ff4b55;
  --primary-deep: #c51019;
  --primary-weak: rgba(238, 28, 38, 0.12);
  --primary-line: rgba(238, 28, 38, 0.5);
  --glow: 0 0 14px rgba(238, 28, 38, 0.5);
  --bg: #0a0e18;
  --bg-2: #0e1424;
  --card: #121928;
  --card-2: #171f31;
  --line: #212b40;
  --line-2: #2c3854;
  --ink: #e9edf6;
  --ink-2: #9aa6bd;
  --ink-3: #64718c;
  --green: #2dd4a7;
  --blue: #5aa2ff;
  --red: #ff4b55;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(238, 28, 38, 0.13), transparent 60%),
    radial-gradient(900px 420px at -10% 8%, rgba(238, 28, 38, 0.08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 24, 0.78); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: 1080px; margin: 0 auto; padding: 0 16px;
  height: 60px; display: flex; align-items: center; gap: 22px;
}
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; color: var(--primary-bright); white-space: nowrap; }
.logo-img { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 0 10px rgba(239, 28, 38, 0.5); }
.logo .mark { font-size: 22px; filter: drop-shadow(0 0 6px rgba(239, 28, 38,.6)); }
.logo small { font-size: 15px; color: var(--primary-bright); font-weight: 800; margin-left: 4px; letter-spacing: .3px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 7px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14.5px; white-space: nowrap; transition: all .15s; }
.nav a:hover { background: var(--primary-weak); color: var(--primary-bright); }
.nav a.active { color: var(--primary-bright); font-weight: 600; background: var(--primary-weak); box-shadow: inset 0 0 0 1px var(--primary-line); }
.header-user { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
  box-shadow: var(--glow);
}
.link-btn { background: none; border: none; color: var(--ink-3); font-size: 13px; padding: 4px; }
.link-btn:hover { color: var(--red); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 10px; padding: 10px 20px;
  font-size: 15px; font-weight: 600; transition: all .15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff; box-shadow: 0 4px 16px rgba(238, 28, 38, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 22px rgba(238, 28, 38, 0.55); transform: translateY(-1px); }
.btn-primary:disabled { background: #5a2530; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--primary-bright); border: 1px solid var(--primary-line); box-shadow: inset 0 0 12px rgba(238,28,38,.08); }
.btn-ghost:hover { background: var(--primary-weak); box-shadow: var(--glow); }
.btn-plain { background: var(--card-2); color: var(--ink-2); border: 1px solid var(--line); }
.btn-plain:hover { color: var(--ink); border-color: var(--line-2); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid rgba(255, 75, 85, 0.45); }
.btn-danger:hover { background: rgba(255, 75, 85, 0.1); }
.btn-sm { padding: 6px 14px; font-size: 13.5px; border-radius: 8px; }

/* ---------- 首页 Hero ---------- */
.hero {
  padding: 56px 0 72px; position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(238,28,38,0.14), transparent 70%),
    linear-gradient(115deg, #1a0f1d 0%, #12182a 45%, #0e1424 100%);
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(238, 28, 38, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 28, 38, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; width: 420px; height: 420px; right: -80px; top: -120px;
  background: radial-gradient(circle, rgba(238,28,38,0.28), transparent 65%); pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero h1 {
  font-size: 36px; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(120deg, #ffffff 20%, var(--primary-bright) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 30px rgba(238, 28, 38, 0.35);
}
.hero p.sub { margin-top: 10px; font-size: 16px; color: var(--ink-2); }
.hero .search-bar {
  margin-top: 26px; display: flex; gap: 10px; max-width: 640px;
  background: rgba(18, 25, 40, 0.85); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.4), inset 0 0 20px rgba(238,28,38,.05);
}
.hero .search-bar input {
  flex: 1; border: none; outline: none; padding: 8px 12px; font-size: 15px;
  border-radius: 8px; background: transparent; color: var(--ink);
}
.hero .search-bar input::placeholder { color: var(--ink-3); }
.hero .tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero .tags span {
  background: rgba(238, 28, 38, 0.1); border: 1px solid var(--primary-line);
  padding: 4px 12px; border-radius: 4px; font-size: 13px; color: #ffb9be;
  font-family: var(--mono); letter-spacing: 0.5px;
}
.hero .deco { position: absolute; right: -30px; top: -30px; font-size: 200px; opacity: .1; transform: rotate(12deg); }

/* ---------- 分类 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; margin-top: -34px; position: relative; z-index: 3; }
.cat-card {
  background: rgba(18, 25, 40, 0.92); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 8px; text-align: center; cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  backdrop-filter: blur(6px);
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--primary-line); box-shadow: var(--glow); }
.cat-card.active { border-color: var(--primary); background: var(--primary-weak); box-shadow: var(--glow); }
.cat-card .ico { font-size: 26px; filter: drop-shadow(0 0 8px rgba(238,28,38,.25)); }
.cat-card .name { margin-top: 6px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.cat-card.active .name { color: var(--primary-bright); }

/* ---------- 区块标题 ---------- */
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 21px; font-weight: 700; position: relative; padding-left: 14px; }
.section-head h2::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--primary-deep));
  border-radius: 2px; box-shadow: var(--glow);
}
.section-head .more { color: var(--ink-3); font-size: 14px; }
.section-head .more:hover { color: var(--primary-bright); }

/* ---------- 卡片列表 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.item-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s; display: flex; flex-direction: column;
}
.item-card:hover { transform: translateY(-3px); border-color: var(--primary-line); box-shadow: 0 8px 28px rgba(0,0,0,.5), var(--glow); }
.item-cover {
  height: 150px; display: flex; align-items: center; justify-content: center;
  font-size: 52px; color: #fff; position: relative; overflow: hidden;
}
.item-cover img { width: 100%; height: 100%; object-fit: cover; }
.item-cover .status-tag {
  position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 4px;
  font-size: 12px; background: rgba(5, 8, 15, 0.75); color: #fff;
  border: 1px solid rgba(255,255,255,.18); font-family: var(--mono);
}
.item-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; }
.item-title { font-size: 15.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item-meta { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.item-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; }
.price {
  color: var(--primary-bright); font-weight: 800; font-size: 18px;
  font-family: var(--mono); text-shadow: 0 0 12px rgba(238,28,38,.4);
}
.price small { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.owner-line { font-size: 12.5px; color: var(--ink-3); }

/* 求租卡片 */
.want-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; border-left: 3px solid var(--primary); transition: border-color .15s, box-shadow .15s;
}
.want-card:hover { border-color: var(--line-2); border-left-color: var(--primary); box-shadow: var(--glow); }
.want-card h3 { font-size: 16px; font-weight: 600; color: var(--ink); }
.want-card p { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.want-card .meta { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); align-items: center; }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px;
  background: var(--primary-weak); color: var(--primary-bright); border: 1px solid var(--primary-line);
  font-family: var(--mono);
}
.budget { color: var(--primary-bright); font-weight: 700; font-family: var(--mono); }

/* ---------- 表单 ---------- */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; max-width: 640px; margin: 28px auto; }
.form-card h1 { font-size: 22px; margin-bottom: 4px; }
.form-card .tip { color: var(--ink-3); font-size: 13.5px; margin-bottom: 20px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field label .req { color: var(--red); }
.field input[type="text"], .field input[type="tel"], .field input[type="number"], .field input[type="password"],
.field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px;
  outline: none; background: var(--bg-2); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: var(--glow); }
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }
.field .err { font-size: 12.5px; color: var(--red); margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.img-upload-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.img-thumb { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; border: 1.5px solid var(--line-2); }
.upload-btn {
  width: 72px; height: 72px; border-radius: 10px; border: 1.5px dashed var(--line-2); background: var(--bg-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-3); font-size: 12px;
}
.upload-btn:hover { border-color: var(--primary); color: var(--primary-bright); }

/* ---------- 详情页 ---------- */
.detail-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; margin-top: 24px; }
.detail-media {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  min-height: 340px; display: flex; align-items: center; justify-content: center; font-size: 110px; color: #fff;
  overflow: hidden;
}
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.detail-thumbs img, .detail-thumbs .ph {
  width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 2px solid var(--line); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.detail-thumbs .active { border-color: var(--primary); box-shadow: var(--glow); }
.detail-main { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.detail-main h1 { font-size: 22px; line-height: 1.4; color: var(--ink); }
.detail-main .price-line { margin: 14px 0; display: flex; align-items: baseline; gap: 8px; }
.detail-main .price { font-size: 28px; }
.detail-main .desc { color: var(--ink-2); font-size: 14.5px; white-space: pre-wrap; }
.detail-main .info-rows { margin-top: 16px; border-top: 1px dashed var(--line-2); padding-top: 14px; font-size: 13.5px; color: var(--ink-2); display: grid; gap: 8px; }
.order-box { margin-top: 18px; background: var(--primary-weak); border: 1px solid var(--primary-line); border-radius: 12px; padding: 16px; }
.order-box .price { font-size: 18px; }

/* ---------- 我的页 ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 20px 0 16px; }
.tabs button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 18px; font-size: 14px; color: var(--ink-2); transition: all .15s; }
.tabs button:hover { color: var(--primary-bright); border-color: var(--primary-line); }
.tabs button.active { background: linear-gradient(135deg, var(--primary), var(--primary-deep)); border-color: var(--primary); color: #fff; font-weight: 600; box-shadow: var(--glow); }
.list-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; display: flex; gap: 14px; align-items: center; transition: border-color .15s; }
.list-card:hover { border-color: var(--line-2); }
.list-card .thumb { width: 64px; height: 64px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #fff; overflow: hidden; }
.list-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-card .info { flex: 1; min-width: 0; }
.list-card .info h3 { font-size: 15px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-card .info .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.list-card .ops { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 4px; font-size: 12px; font-weight: 600; font-family: var(--mono); }
.tag-green { background: rgba(45, 212, 167, 0.12); color: var(--green); border: 1px solid rgba(45, 212, 167, 0.4); }
.tag-orange { background: var(--primary-weak); color: var(--primary-bright); border: 1px solid var(--primary-line); }
.tag-gray { background: rgba(100, 113, 140, 0.15); color: var(--ink-2); border: 1px solid var(--line-2); }
.tag-red { background: rgba(255, 75, 85, 0.12); color: var(--red); border: 1px solid rgba(255, 75, 85, 0.45); }
.tag-blue { background: rgba(90, 162, 255, 0.12); color: var(--blue); border: 1px solid rgba(90, 162, 255, 0.4); }

/* ---------- 登录页 ---------- */
.login-card { max-width: 400px; margin: 48px auto; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 32px 28px; position: relative; overflow: hidden; }
.login-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: var(--glow);
}
.login-card h1 { font-size: 22px; text-align: center; }
.login-card .sub { text-align: center; color: var(--ink-3); font-size: 13.5px; margin: 6px 0 24px; }
.phone-row { display: flex; gap: 10px; }
.phone-row input { flex: 1; }
.code-btn { flex: none; border: 1px solid var(--primary-line); color: var(--primary-bright); background: var(--primary-weak); border-radius: 10px; padding: 0 16px; font-size: 14px; font-weight: 600; }
.code-btn:disabled { border-color: var(--line); color: var(--ink-3); background: var(--card-2); }
.login-error { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 20px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12.5px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-agreement { font-size: 12px; color: var(--ink-3); text-align: center; margin-top: 14px; }

/* ---------- 空状态 / 提示 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty .ico { font-size: 44px; margin-bottom: 10px; filter: grayscale(0.2); }
.empty .main-btn { margin-top: 16px; }
.loading { text-align: center; color: var(--ink-3); padding: 40px; }
.toast {
  position: fixed; left: 50%; bottom: 48px; transform: translateX(-50%) translateY(20px);
  background: rgba(18, 25, 40, 0.95); color: var(--ink); padding: 10px 22px; border-radius: 10px;
  border: 1px solid var(--primary-line); box-shadow: var(--glow);
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 999; max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-3); font-size: 13px; text-align: center; background: var(--bg-2); }
.site-footer .slogan { font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.site-footer .slogan::after { content: " ▮"; color: var(--primary); }
.beian-line { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: .5px; }
.beian-line .sep { color: var(--line-2); }
.beian-line a { color: var(--ink-3); text-decoration: none; border-bottom: 1px dotted var(--line-2); transition: color .2s, border-color .2s; }
.beian-line a:hover { color: var(--primary-bright); border-bottom-color: var(--primary); }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .site-header .inner { height: 54px; gap: 10px; overflow-x: auto; }
  .nav a { padding: 6px 8px; font-size: 13.5px; }
  .hero h1 { font-size: 26px; }
  .hero { padding: 38px 0 58px; }
  .detail-wrap { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(46%, 1fr)); gap: 10px; }
  .item-cover { height: 120px; font-size: 40px; }
  .form-card { padding: 20px 16px; }
  .list-card .ops { flex-direction: column; align-items: stretch; }
}
