/* 首页 — 液态玻璃补充 */

body.index-page {
  min-height: 100vh;
}

.search-section h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.search-section p {
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto 20px;
  line-height: 1.65;
}

.stats-card {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

/* 匹配数 — 旋转渐变边框 + 液态玻璃内芯 */
.stat-glow-card {
  position: relative;
  width: clamp(150px, 38vw, 190px);
  min-height: clamp(108px, 26vw, 132px);
  display: flex;
  place-content: center;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  background: transparent;
}

.stat-glow-card::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100px;
  height: 130%;
  transform: translate(-50%, -50%);
  background-image: linear-gradient(180deg, rgb(0, 183, 255), rgb(255, 48, 255));
  animation: stat-glow-rotate 3s linear infinite;
  transition: background-image 0.2s linear;
  z-index: 0;
}

.stat-glow-card::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 15px;
  z-index: 1;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.stat-glow-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 16px 18px;
  width: 100%;
}

@keyframes stat-glow-rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.search-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--btn-gap, 8px);
  max-width: 640px;
  margin: 0 auto;
}

.search-row .search-box {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.search-row .animated-button {
  flex-shrink: 0;
}

.stat-glow-inner .stat-number {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stat-glow-inner .stat-number.is-loading {
  color: var(--text-secondary);
  font-size: 1.5rem;
}

.stat-glow-inner .stat-label {
  font-size: 0.875rem;
  color: var(--text-regular);
  font-weight: 500;
  line-height: 1.35;
}

.stat-item {
  text-align: center;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  padding: 16px 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  min-width: 140px;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stat-number.is-loading {
  color: var(--text-secondary);
  font-size: 1.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-regular);
  font-weight: 500;
}

.checkbox-group--inline {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  align-items: center;
}

.site-footer a {
  color: var(--text-primary);
  font-weight: 500;
}

.list-header h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* 随机大学 3D 旋转展示栏（仅首页 · 原 wrapper/inner/card/img 效果） */
.index-page .random-showcase {
  --showcase-head-h: 44px;
  --showcase-area-h: 420px;
  flex-shrink: 0;
  margin-bottom: 16px;
  padding: 14px 16px 12px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  display: flex;
  flex-direction: column;
}

.index-page .random-showcase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--showcase-head-h);
  margin-bottom: 8px;
  flex-shrink: 0;
}

.index-page .random-showcase-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.index-page .random-showcase-refresh {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  color: var(--text-regular);
  font-size: 12px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.index-page .random-showcase-refresh:hover:not(:disabled) {
  background: var(--color-primary);
  color: var(--text-on-primary);
}

.index-page .random-showcase-refresh:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.index-page .random-showcase .wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 1;
  min-height: calc(var(--showcase-area-h) - var(--showcase-head-h) - 26px);
}

.index-page .random-showcase .inner {
  --w: 100px;
  --h: 150px;
  --translateZ: calc((var(--w) + var(--h)) + 0px);
  --rotateX: -15deg;
  --perspective: 1000px;
  position: absolute;
  width: var(--w);
  height: var(--h);
  top: 25%;
  left: calc(50% - (var(--w) / 2) - 2.5px);
  z-index: 2;
  transform-style: preserve-3d;
  transform: perspective(var(--perspective));
  animation: rotating 20s linear infinite;
}

@keyframes rotating {
  from {
    transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(0);
  }
  to {
    transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(1turn);
  }
}

.index-page .random-showcase a.card {
  text-decoration: none;
}

.index-page .random-showcase .card {
  position: absolute;
  border: 2px solid rgba(var(--color-card));
  border-radius: 12px;
  overflow: hidden;
  inset: 0;
  transform: rotateY(calc((360deg / var(--quantity)) * var(--index))) translateZ(var(--translateZ));
}

/* 泛光：与列表翻转卡同逻辑，颜色跟随 --color-card */
.index-page .random-showcase .card::before {
  position: absolute;
  content: '';
  display: block;
  width: 100px;
  height: 160%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--color-card), 0.45),
    rgba(var(--color-card), 1),
    rgba(var(--color-card), 0.45),
    transparent
  );
  animation: index-uc-glow-rotate 5s linear infinite;
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

.index-page .random-showcase .img {
  position: absolute;
  inset: 2px;
  z-index: 1;
  border-radius: 10px;
  width: auto;
  height: auto;
  object-fit: cover;
  background: #0000
    radial-gradient(
      circle,
      rgba(var(--color-card), 0.2) 0%,
      rgba(var(--color-card), 0.6) 80%,
      rgba(var(--color-card), 0.9) 100%
    );
}

/* 介绍文字：叠在 .img 之上，不改动炫彩逻辑 */
.index-page .random-showcase .showcase-caption {
  position: absolute;
  inset: 2px;
  z-index: 2;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  pointer-events: none;
  text-align: center;
  color: rgba(80, 80, 90, 0.88);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.index-page .random-showcase .showcase-initial {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.index-page .random-showcase .showcase-name {
  font-size: 9px;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.index-page .random-showcase .showcase-loc {
  font-size: 8px;
  line-height: 1.2;
  opacity: 0.9;
}

.index-page .random-showcase-placeholder {
  flex: 1;
  min-height: calc(var(--showcase-area-h) - var(--showcase-head-h) - 26px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* 首页右侧栏布局：展示栏 + 列表高度对齐筛选面板 */
.index-page .university-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.index-page .university-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.index-page .university-list-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.index-page .university-list .list-header,
.index-page .university-list .pagination {
  flex-shrink: 0;
}

/* 首页大学列表 — 3D 翻转卡片（仅 index） */
.index-page .university-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 24px;
  justify-items: center;
}

.index-page .university-card {
  overflow: visible;
  width: 100%;
  max-width: 220px;
  height: 280px;
  perspective: 1000px;
  cursor: pointer;
  outline: none;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.index-page .university-card .uc-content {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.index-page .university-card:hover .uc-content,
.index-page .university-card:focus-within .uc-content {
  transform: rotateY(180deg);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.index-page .university-card:hover,
.index-page .university-card:focus-within {
  transform: translateY(-4px);
}

.index-page .uc-front,
.index-page .uc-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.index-page .uc-back {
  z-index: 2;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-glass);
}

.index-page .uc-front {
  z-index: 1;
  pointer-events: none;
  transform: rotateY(180deg);
  color: var(--text-primary);
  background: var(--bg-muted);
  border: 1px solid var(--border-glass);
}

.index-page .university-card:hover .uc-back,
.index-page .university-card:focus-within .uc-back {
  z-index: 1;
  pointer-events: none;
}

.index-page .university-card:hover .uc-front,
.index-page .university-card:focus-within .uc-front {
  z-index: 2;
  pointer-events: auto;
}

.index-page .uc-back::before {
  position: absolute;
  content: '';
  display: block;
  width: 140px;
  height: 160%;
  background: linear-gradient(90deg, transparent, var(--orb-2), var(--orb-1), var(--orb-2), transparent);
  animation: index-uc-glow-rotate 5s linear infinite;
  opacity: 0.85;
  pointer-events: none;
}

.index-page .uc-back-inner {
  position: relative;
  z-index: 1;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  padding: 16px 14px;
  border-radius: calc(var(--radius-md) - 2px);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.index-page .uc-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.index-page .uc-loc {
  font-size: 12px;
  color: var(--text-secondary);
}

.index-page .uc-back-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
}

.index-page .uc-hint {
  margin-top: auto;
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.index-page .uc-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

.index-page .uc-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  animation: index-uc-float 2.6s ease-in-out infinite;
}

.index-page .uc-circle--main {
  width: 90px;
  height: 90px;
  left: 12px;
  top: 20px;
  background: var(--orb-1);
  opacity: 0.55;
}

.index-page .uc-circle--sub {
  width: 56px;
  height: 56px;
  right: 18px;
  bottom: 36px;
  background: var(--orb-3);
  opacity: 0.7;
  animation-delay: -1.2s;
}

.index-page .uc-front-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, var(--bg-glass) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, var(--orb-1) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 90%, var(--orb-3) 0%, transparent 45%),
    var(--bg-elevated);
  opacity: 0.9;
  pointer-events: none;
}

.index-page .uc-front-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.index-page .uc-front-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.index-page .uc-badge {
  background: var(--color-primary-soft);
  color: var(--text-primary);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--border);
}

.index-page .uc-description {
  flex: 1;
  width: 100%;
  padding: 10px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.index-page .uc-desc-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  line-height: 1.45;
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
}

.index-page .uc-desc-row:last-child {
  border-bottom: none;
}

.index-page .uc-desc-row span:first-child {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.index-page .uc-desc-row span:last-child {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}

.index-page .uc-desc-row--wrap span:last-child {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.index-page .uc-detail-link {
  display: block;
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 8px 10px;
  background: var(--color-primary);
  color: var(--text-on-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition);
}

.index-page .uc-detail-link:hover {
  background: var(--color-primary-hover);
}

.index-page .university-card .campus-tag {
  margin-top: 0;
  font-size: 11px;
}

@keyframes index-uc-glow-rotate {
  0% { transform: rotateZ(0deg); }
  100% { transform: rotateZ(360deg); }
}

@keyframes index-uc-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@media (max-width: 992px) {
  .index-page .university-column {
    min-height: auto !important;
  }

  .index-page .random-showcase {
    height: auto !important;
    --showcase-area-h: 420px;
  }

  .index-page .university-list-body {
    overflow: visible;
  }
}

.index-page .team-intro-btn {
  border: none;
  border-radius: 12px;
  background: var(--bg-glass-strong, #fff);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.index-page .team-intro-btn:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}

/* 意见反馈 — 导航栏按钮 + 收集弹层 */
.index-page .feedback-nav-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: var(--bg-glass-strong, #fff);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.index-page .feedback-nav-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}

.index-page .feedback-nav-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  pointer-events: none;
}

.index-page .feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.index-page .feedback-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.index-page .feedback-panel {
  width: 100%;
  max-width: 520px;
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 28px 28px 24px;
  border-radius: 20px;
  background: var(--bg-glass-strong, rgba(255, 255, 255, 0.95));
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.2));
  box-shadow: var(--shadow-lg, 0 16px 48px rgba(0, 0, 0, 0.2));
  color: var(--text-primary, #1a1a1a);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}

.index-page .feedback-overlay.is-open .feedback-panel {
  transform: translateY(0) scale(1);
}

.index-page .feedback-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.index-page .feedback-panel-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.index-page .feedback-panel-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary, #333);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.index-page .feedback-panel-desc {
  margin: 0 0 20px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-regular, #666);
}

.index-page .feedback-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 600;
}

.index-page .feedback-label .required {
  color: #e53935;
}

.index-page .feedback-textarea,
.index-page .feedback-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--border, #ddd);
  border-radius: 12px;
  font: inherit;
  font-size: 0.9375rem;
  background: var(--bg-base, #fff);
  color: var(--text-primary, #1a1a1a);
  resize: vertical;
}

.index-page .feedback-textarea:focus,
.index-page .feedback-input:focus {
  outline: none;
  border-color: var(--color-primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.index-page .feedback-meta {
  margin: 6px 0 16px;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-secondary, #999);
}

.index-page .feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.index-page .feedback-btn {
  min-width: 96px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.index-page .feedback-btn--ghost {
  background: transparent;
  border-color: var(--border, #ddd);
  color: var(--text-primary, #333);
}

.index-page .feedback-btn--primary {
  background: var(--color-primary, #2563eb);
  color: var(--text-on-primary, #fff);
}

.index-page .feedback-btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.index-page .feedback-success {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  font-size: 0.875rem;
  text-align: center;
}

@media (max-width: 992px) {
  .index-page .feedback-panel {
    padding: 22px 18px 18px;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    align-self: flex-end;
  }

  .index-page .feedback-overlay {
    align-items: flex-end;
    padding: 0;
  }
}

/* 首页无 nav-toggle 时，移动端仍展示导航链接 */
@media (max-width: 768px) {
  .index-page .navbar .container {
    flex-wrap: wrap;
    gap: 8px;
  }

  .index-page .navbar-nav {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 8px;
    padding: 0 0 10px;
    margin: 0;
  }

  .index-page .navbar-nav a {
    width: auto;
    padding: 6px 12px;
    font-size: 0.875rem;
  }
}
