/* ---------- 变量 ---------- */
:root {
  --primary: #6b5ce7;
  --primary-dark: #5a4bd4;
  --primary-light: #e0e7ff;
  --accent: #3b82f6;
  --accent-dark: #2563eb;
  --text: #334155;
  --text-muted: #64748b;
  --bg: #f5f6fa;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 28px rgba(107, 92, 231, 0.12);
  --speed: 0.25s ease;
}

/* ---------- 基础 ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- 顶部横幅 ---------- */
.topbar {
  background: linear-gradient(100deg, #4f6af6 0%, #7c5af5 55%, #a855f7 100%);
  color: #fff;
  text-align: center;
  padding: 34px 16px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  box-shadow: 0 6px 24px rgba(107, 92, 231, 0.25);
}

.welcome {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ---------- 导航栏 ---------- */
.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: #fff;
  margin: 18px auto 0;
  padding: 14px 24px;
  max-width: 1200px;
  width: calc(100% - 32px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 中部板块：在整条导航栏水平居中 */
.nav-main {
  grid-column: 2;
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4vw;
}

.navbar a {
  position: relative;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  padding: 8px 4px;
  transition: color var(--speed);
}

.navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--primary);
  transition: width var(--speed);
}

.navbar a:hover,
.navbar a.active {
  color: var(--primary);
}

.navbar a:hover::after,
.navbar a.active::after {
  width: 100%;
}

/* 导航最右账户区 */
.nav-auth {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4vw;
}

/* ---------- 首页跳蚤市场 ---------- */
.flea-carousel {
  margin-bottom: 18px;
}

.flea-carousel .carousel-img-wrap img {
  height: 170px;
  object-fit: cover;
}

.flea-list-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin: 6px 0 10px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.flea-list {
  list-style: none;
}

.flea-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.flea-list li:last-child {
  border-bottom: none;
}

.flea-list a {
  color: var(--text);
  font-size: 14px;
  transition: all var(--speed);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flea-list a:hover {
  color: var(--primary);
}

.flea-date {
  flex: none;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- 二手详情无权限提示 ---------- */
.detail-blocked {
  text-align: center;
  padding: 48px 20px;
}

.detail-blocked .blocked-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.detail-blocked .blocked-text {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
}

.detail-blocked .blocked-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.detail-blocked .btn {
  display: inline-block;
  width: auto;
  padding: 10px 26px;
}

/* ---------- 主体容器 ---------- */
.container {
  max-width: 1200px;
  margin: 22px auto 40px;
  padding: 0 16px;
}

/* ---------- 消息 ---------- */
.messages {
  max-width: 1200px;
  margin: 12px auto 0;
  padding: 0 16px;
}

.msg {
  background: #e0e7ff;
  color: var(--primary-dark);
  border-left: 4px solid var(--primary);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
}

/* ---------- 首页三列 ---------- */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.col {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.col-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
}

/* ---------- 左列：高校展示轮播 ---------- */
.school-carousel {
  position: relative;
}

.carousel-slide[hidden] {
  display: none;
}

.carousel-img-wrap {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.carousel-img-wrap img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform var(--speed);
}

.carousel-img-wrap:hover img {
  transform: scale(1.03);
}

.carousel-title-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: auto;
  height: auto;
  padding: 4px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--primary);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--speed), color var(--speed);
  box-shadow: none;
}

.carousel-btn.prev {
  left: 4px;
}

.carousel-btn.next {
  right: 4px;
}

.carousel-btn:hover {
  background: transparent;
  color: var(--primary-dark);
  transform: translateY(-50%) scale(1.15);
  box-shadow: none;
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.carousel-title-bar .school-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.school-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  max-height: 7em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

/* ---------- 中列：高校新闻 ---------- */
.news-list {
  list-style: none;
}

.news-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.news-list li:last-child {
  border-bottom: none;
}

.news-list a {
  color: var(--text);
  font-size: 15px;
  flex: 1;
  margin-right: 10px;
  transition: color var(--speed);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-list a:hover {
  color: var(--primary);
}

.news-date {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.news-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 0 40px;
  font-size: 15px;
}

.more-link {
  display: inline-block;
  margin-top: auto;
  align-self: flex-start;
  padding-top: 14px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--speed);
}

.more-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ---------- 右列：登录注册 + 高校列表 ---------- */
.auth-box {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.user-card {
  text-align: center;
  padding: 8px 4px 4px;
  margin-bottom: 16px;
}

.user-welcome {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
}

.user-welcome strong {
  color: var(--primary);
}

.user-school {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: all var(--speed);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-login {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-login:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-register {
  flex: 1;
  background: #94a3b8;
  color: #fff;
  border-color: #94a3b8;
}

.btn-register:hover {
  background: #64748b;
  border-color: #64748b;
}

.school-list {
  list-style: none;
}

.school-list li {
  border-bottom: 1px solid #f1f5f9;
}

.school-list li:last-child {
  border-bottom: none;
}

.school-list a {
  display: block;
  padding: 12px 0;
  color: var(--text);
  font-size: 15px;
  transition: all var(--speed);
}

.school-list a:hover {
  color: var(--primary);
  padding-left: 8px;
}

/* ---------- 页脚 ---------- */
.footer {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.footer .beian a {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  transition: color var(--speed);
}

.footer .beian a:hover {
  color: var(--primary);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .home-grid {
    grid-template-columns: 1fr 1.2fr;
  }

  .col-right {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .navbar {
    gap: 5vw;
  }

  .school-alliance-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .topbar {
    border-radius: 0 0 16px 16px;
    padding: 24px 14px;
  }

  .navbar {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 10px;
  }

  .nav-main,
  .nav-auth {
    grid-column: 1;
    justify-self: center;
  }

  .navbar a {
    font-size: 15px;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .col {
    min-height: auto;
  }

  .carousel-img-wrap img {
    height: 180px;
  }

  .school-alliance-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 其他页面通用 ---------- */
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
}

.page-title.center {
  display: inline-block;
  text-align: center;
  border-bottom: none;
  margin-bottom: 8px;
}

.page-header {
  text-align: center;
  margin-bottom: 28px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

.school-scope-tip {
  margin-top: 6px;
  font-size: 13px;
  color: var(--primary);
  background: var(--primary-light);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
}
.school-scope-tip strong {
  color: var(--primary-dark);
}

/* ---------- 高校联盟 ---------- */
.school-alliance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.school-alliance-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px;
  text-align: center;
  transition: transform var(--speed), box-shadow var(--speed);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.school-alliance-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.school-alliance-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
}

.school-alliance-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 20px;
  text-align: center;
  flex: 1;
  max-height: 9.6em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
}

.btn-accent {
  display: inline-flex;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  padding: 9px 28px;
  border-radius: 8px;
}

.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.form-box {
  max-width: 460px;
  margin: 0 auto;
}

.auth-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text);
}

.auth-form input,
.auth-form select,
.auth-form textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color var(--speed), box-shadow var(--speed);
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 92, 231, 0.12);
}

.auth-form .required label::after {
  content: " *";
  color: #ef4444;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  width: 100%;
  padding: 11px;
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.form-row {
  display: flex;
  gap: 14px;
}

.form-row > div {
  flex: 1;
}

.help-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -10px;
  margin-bottom: 14px;
}

/* 学校名称联想下拉与提示（注册页） */
.suggest-list {
  list-style: none;
  margin: -6px 0 12px;
  padding: 0;
  border: 1px solid #d9dee8;
  border-radius: 8px;
  background: #fff;
  max-height: 210px;
  overflow-y: auto;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.suggest-item {
  padding: 9px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}

.suggest-item:hover {
  background: #eef2ff;
}

.school-hint {
  margin: -6px 0 12px;
  font-size: 12px;
  color: #d97706;
}

.errorlist {
  color: #dc2626;
  font-size: 13px;
  margin-bottom: 10px;
  padding-left: 16px;
}

/* ---------- 表格 ---------- */
.profile-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.profile-table th,
.profile-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
}

.profile-table th {
  width: 110px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- 新闻、学校、二手列表 ---------- */
.item-list {
  list-style: none;
}

.item-list li {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin-bottom: 14px;
  transition: box-shadow var(--speed), transform var(--speed);
}

.item-list li:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.item-list h3 {
  font-size: 17px;
  margin-bottom: 6px;
  color: var(--text);
}

.meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-approved {
  background: #dcfce7;
  color: #166534;
}

.badge-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.empty-tip {
  color: var(--text-muted);
  text-align: center;
  padding: 40px 0;
}

/* ---------- 堆塔 ---------- */
.tower-post {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.tower-post .author {
  font-weight: 600;
  color: var(--primary);
}

.tower-post .time {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 10px;
}

.tower-post .content {
  margin: 10px 0;
}

.replies {
  margin-top: 14px;
  padding-left: 24px;
  border-left: 3px solid var(--primary-light);
}

.reply {
  margin-bottom: 12px;
}

.reply-form {
  margin-top: 14px;
}

.reply-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  min-height: 80px;
  margin-bottom: 10px;
  font-size: 14px;
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 14px;
}

.pagination .current {
  background: var(--primary);
  color: #fff;
}

/* ---------- 返回按钮 ---------- */
.back-link {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 14px;
}

.back-link:hover {
  color: var(--primary);
}

.news-content {
  line-height: 1.8;
  color: var(--text);
}

/* ---------- 通用区块标题 ---------- */
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title small {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.section-dot {
  width: 6px;
  height: 18px;
  border-radius: 3px;
  background: var(--accent);
}

/* ---------- 二手商品 ---------- */
.filter-bar {
  padding: 16px 20px;
  margin-bottom: 22px;
}

.filter-form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.filter-select {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  min-width: 140px;
}

.btn-filter {
  background: #64748b;
  color: #fff;
  border-color: #64748b;
  padding: 11px 22px;
  border-radius: 8px;
}

.btn-filter:hover {
  background: #475569;
  border-color: #475569;
}

/* 推荐商品：首行 6~8 个带图卡片，尺寸紧凑 */
.featured-section {
  margin-bottom: 28px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.featured-card {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--speed), box-shadow var(--speed);
}

.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.featured-img {
  width: 100%;
  height: 120px;
  background: #f1f5f9;
  overflow: hidden;
}

.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-body {
  padding: 12px;
}

.featured-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.featured-price {
  font-size: 15px;
  font-weight: 800;
  color: #ef4444;
}

.featured-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #8b5cf6;
  color: #fff;
  font-size: 12px;
}

/* 普通列表：无图，按发布时间，紧凑 */
.regular-section {
  margin-bottom: 22px;
}

.regular-list {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.regular-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  transition: background var(--speed);
}

.regular-item:last-child {
  border-bottom: none;
}

.regular-item:hover {
  background: #f8fafc;
}

.regular-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.regular-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.regular-price {
  font-size: 15px;
  font-weight: 700;
  color: #ef4444;
  white-space: nowrap;
}

.regular-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* 交易类别：出售 / 求购 */
.tx-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
  vertical-align: middle;
}
.tx-sell {
  background: #dcfce7;
  color: #15803d;
}
.tx-buy {
  background: #dbeafe;
  color: #1d4ed8;
}

/* 已售：灰色标识，与出售/求购并列显示在标题前 */
.tx-sold {
  background: #e2e8f0;
  color: #475569;
}

.regular-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.regular-category {
  background: #e0f2fe;
  color: #0369a1;
}

.regular-condition {
  background: #f3e8ff;
  color: #7e22ce;
}

.regular-date,
.regular-views {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 二手详情 */
.secondhand-detail {
  padding: 24px;
}

.secondhand-detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  margin-bottom: 24px;
}

.secondhand-detail-img {
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
}

.secondhand-detail-img img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.secondhand-detail-info .page-title {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 10px;
}

.secondhand-detail-price {
  font-size: 28px;
  font-weight: 800;
  color: #ef4444;
  margin-bottom: 14px;
}

.secondhand-detail-tags {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.contact-box {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 16px;
}

.contact-box.muted {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: var(--text-muted);
}

.contact-box p {
  margin-bottom: 6px;
}

.secondhand-detail-desc {
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.secondhand-detail-desc p {
  line-height: 1.8;
  color: var(--text);
}

/* ---------- 我的院校（学校二级页） ---------- */
.school-hero {
  background: linear-gradient(100deg, #f8fafc 0%, #eef2ff 100%);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid #e2e8f0;
}

.school-hero-content {
  max-width: 800px;
}

.school-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}

.school-desc {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.btn-publish {
  gap: 8px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 600;
}

.school-detail-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: start;
}

.school-col {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.col-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.col-more {
  margin-left: auto;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  transition: color var(--speed);
}

.col-more:hover {
  color: var(--accent-dark);
}

.col-more-foot {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  color: var(--accent);
  background: #eff6ff;
  border-radius: 8px;
  transition: all var(--speed);
}

.col-more-foot:hover {
  background: #dbeafe;
  color: var(--accent-dark);
}

.col-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.school-news-list,
.school-tower-list {
  list-style: none;
}

.school-news-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f8fafc;
  transition: color var(--speed);
}

.school-news-list li:last-child a {
  border-bottom: none;
}

.school-news-list .news-title {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-news-list .news-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.school-news-list li a:hover .news-title {
  color: var(--primary);
}

.school-tower-list li {
  padding: 12px 0;
  border-bottom: 1px solid #f8fafc;
  font-size: 14px;
  line-height: 1.6;
}

.school-tower-list li:last-child {
  border-bottom: none;
}

.school-tower-list b {
  display: block;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.school-tower-list span {
  color: var(--text-muted);
}

.empty-item {
  color: var(--text-muted);
  font-size: 14px;
  padding: 20px 0;
  text-align: center;
}

.school-secondhand-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.school-secondhand-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 10px;
  background: #f8fafc;
  transition: all var(--speed);
}

.school-secondhand-card:hover {
  background: #eef2ff;
  box-shadow: var(--shadow-hover);
}

.shc-body {
  flex: 1;
  min-width: 0;
}

.shc-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shc-meta {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}

.shc-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.shc-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #e2e8f0;
}

.shc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 堆塔：高校数据统计看板 ---------- */
.rank-rule {
  font-size: 13px;
  color: var(--text-muted);
  margin: -6px 0 16px;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  border-left: 4px solid transparent;
  transition: transform var(--speed);
}

.rank-card:hover {
  transform: translateY(-2px);
}

.rank-top {
  border-left-color: #f59e0b;
  background: linear-gradient(100deg, #fffbeb 0%, #ffffff 60%);
}

.rank-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  background: #eef2ff;
  color: var(--primary);
  flex-shrink: 0;
}

.rank-badge.rank-1 { background: #f59e0b; color: #fff; }
.rank-badge.rank-2 { background: #94a3b8; color: #fff; }
.rank-badge.rank-3 { background: #d97706; color: #fff; }

.rank-main { flex: 1; min-width: 0; }

.rank-name { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }

.rank-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.rank-metrics .metric b { color: var(--text); font-size: 15px; }
.rank-metrics .metric.online b { color: #10b981; }

.rank-score {
  text-align: center;
  flex-shrink: 0;
  min-width: 76px;
}

.score-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.score-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin: 8px 0 28px;
}

.chart-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.chart-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.chart-box {
  position: relative;
  height: 300px;
}

.detail-section { margin-bottom: 28px; }

.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 720px;
}

.detail-table th, .detail-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}

.detail-table thead th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
}

.detail-table tbody tr:hover { background: #f8fafc; }
.detail-table .t-name { text-align: left; font-weight: 600; color: var(--text); }

.tower-section { margin-top: 8px; }
.tower-list {
  list-style: none;
  margin-top: 14px;
}
.tower-list li {
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: var(--text);
}
.tower-list b { color: var(--primary); }

@media (max-width: 1200px) {
  .featured-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .regular-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .secondhand-detail-grid {
    grid-template-columns: 1fr;
  }

  .school-detail-cols {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-filter {
    width: 100%;
  }

  .secondhand-detail-img img {
    height: 240px;
  }

  .school-detail-cols {
    grid-template-columns: 1fr;
  }

  .school-hero {
    padding: 22px;
  }
}

/* ===== 二手交易风险提示弹窗 ===== */
.risk-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 14, 45, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.risk-modal {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(46, 40, 110, 0.28);
  overflow: hidden;
  animation: riskPop 0.22s ease-out;
}

@keyframes riskPop {
  from { transform: translateY(12px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.risk-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #6b5ce7, #4a6cf7);
  color: #fff;
}

.risk-icon {
  font-size: 22px;
  line-height: 1;
}

.risk-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.risk-modal-body {
  padding: 20px 22px;
  max-height: 56vh;
  overflow-y: auto;
  color: #2b2740;
  font-size: 14px;
  line-height: 1.75;
}

.risk-lead {
  margin: 0 0 12px;
}

.risk-strong {
  margin: 0 0 10px;
  font-weight: 700;
  color: #c0392b;
}

.risk-sub {
  margin: 0 0 6px;
  font-weight: 600;
}

.risk-list {
  margin: 0 0 12px;
  padding-left: 20px;
}

.risk-list li {
  margin: 4px 0;
}

.risk-danger {
  margin: 0;
  padding: 10px 12px;
  background: #fff3f2;
  border-left: 3px solid #e74c3c;
  border-radius: 6px;
  color: #c0392b;
  font-weight: 600;
}

.risk-modal-foot {
  display: flex;
  gap: 12px;
  padding: 16px 22px 20px;
  border-top: 1px solid #eee;
}

.risk-modal-foot .btn {
  flex: 1;
  justify-content: center;
  text-align: center;
}

.btn-ghost {
  background: #f2f3f7;
  color: #555;
  border: 1px solid #e2e4ea;
}

.btn-ghost:hover {
  background: #e9ebf1;
  color: #333;
}

@media (max-width: 520px) {
  .risk-modal-foot {
    flex-direction: column;
  }
}

/* ===== 堆塔访问受限提示页 ===== */
.denied-card {
  max-width: 640px;
  margin: 8px auto 0;
  text-align: center;
  padding: 32px 28px;
}

.denied-icon {
  font-size: 46px;
  margin-bottom: 8px;
}

.denied-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: #2b2740;
  text-align: center;
}

.denied-desc {
  color: var(--text-muted);
  margin: 0 0 18px;
  text-align: center;
}

.denied-conditions {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  text-align: left;
  display: inline-block;
}

.denied-conditions li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 15px;
}

.dc-badge {
  flex: 0 0 auto;
  min-width: 56px;
  text-align: center;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f2f3f7;
  color: #888;
  border: 1px solid #e2e4ea;
}

.dc-badge.ok {
  background: #e6f7ee;
  color: #18a058;
  border-color: #b7e8cd;
}

.dc-progress {
  color: var(--text-muted);
  font-size: 13px;
}

.denied-tip {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 20px;
}

.denied-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ===== 个人中心：两栏布局 ===== */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  align-items: start;
}

.profile-info-card,
.profile-items-card {
  padding: 24px;
}

.profile-info-card .page-title,
.profile-items-card .page-title {
  margin-bottom: 16px;
}

/* 修改密码表单：默认隐藏，点击按钮展开；字号偏小、行距偏大 */
.pass-form {
  margin-top: 12px;
  font-size: 13px;          /* 字体改小一点 */
  line-height: 2;            /* 行间距设置大一点 */
  color: var(--text);
}

.pass-form p {
  margin: 0;
}

.pass-form label {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  color: var(--text);
}

.pass-form input[type="password"],
.pass-form input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  margin: 0 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color var(--speed), box-shadow var(--speed);
}

.pass-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 92, 231, 0.12);
}

.pass-form .helptext {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  display: inline-block;
  margin-bottom: 8px;
}

.pass-form .errorlist {
  font-size: 12px;
  margin: 0 0 8px;
}

.pass-form .btn-primary {
  width: auto;
  padding: 9px 20px;
  margin-top: 6px;
  font-size: 14px;
}

/* 我发布的信息列表 */
.my-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.my-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}

.my-item:last-child {
  border-bottom: none;
}

.my-item-title {
  flex: 1 1 auto;
  min-width: 160px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.my-item-title:hover {
  color: var(--primary);
  text-decoration: underline;
}

.my-item-time {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.my-item-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.status-approved {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.status-pending {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}

.status-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.my-item-actions {
  display: flex;
  gap: 8px;
}

/* 小按钮 */
.btn-sm {
  padding: 5px 12px;
  font-size: 13px;
  border-radius: 6px;
  width: auto;
}

/* 危险/删除按钮 */
.btn-danger {
  background: #e23b3b;
  color: #fff;
  border-color: #e23b3b;
  width: auto;
}

.btn-danger:hover {
  background: #c5302f;
  border-color: #c5302f;
}

/* 已售按钮（个人中心“我发布的信息”列表内） */
.inline-form {
  display: inline-flex;
  align-items: center;
}

.btn-sold {
  background: #64748b;
  color: #fff;
  border-color: #64748b;
  width: auto;
}

.btn-sold:hover {
  background: #475569;
  border-color: #475569;
}

.btn-sold.is-sold {
  background: #94a3b8;
  border-color: #94a3b8;
}

/* 编辑页 */
.secondhand-edit .meta {
  color: var(--text-muted);
  margin: 4px 0 18px;
}

.edit-form {
  margin-bottom: 8px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.form-actions .btn-primary,
.form-actions .btn-ghost {
  width: auto;
  padding: 9px 20px;
}

.delete-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

@media (max-width: 860px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

