:root {
  --primary: #0066CC;
  --primary-dark: #0052A3;
  --primary-light: #E8F2FC;
  --text: #1A1A1A;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border: #EEEEEE;
  --bg: #F5F7FA;
  --bg-gradient: linear-gradient(
    180deg,
    #EAF3FC 0%,
    #F3F7FB 38%,
    #F8FAFD 72%,
    #FDFEFF 100%
  );
  --card: #FFFFFF;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 102, 204, 0.06);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
  background: var(--bg-gradient);
  background-color: #F3F7FB;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: transparent;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: calc(56px + var(--safe-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-gradient);
  pointer-events: none;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
  background: linear-gradient(135deg, #0077E6 0%, #0066CC 55%, #005BB5 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.top-bar__school {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.top-bar__user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  opacity: 0.95;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 20px;
  color: inherit;
  text-decoration: none;
}

a.top-bar__user:active {
  opacity: 0.8;
}

.top-bar__user-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7CFC00;
}

/* 幻灯 Banner */
.banner-slide {
  position: relative;
  width: 100%;
  height: 210px;
  overflow: hidden;
  background: var(--primary-dark);
}

.banner-slide .swiper-wrapper,
.banner-slide .swiper-slide {
  height: 100%;
}

.banner-slide .swiper-slide {
  position: relative;
}

.banner-slide__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-slide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 16px 64px;
  color: #fff;
  pointer-events: none;
}

.banner-slide__tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  background: var(--primary);
  border-radius: 4px;
  margin-bottom: 6px;
  align-self: flex-start;
}

.banner-slide__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0;
}

/* 标题下方居中：圆角长条指示器 */
.banner-slide__pager.swiper-pagination {
  position: absolute;
  bottom: 38px;
  left: 16px;
  right: 16px;
  width: auto;
  text-align: center;
  padding: 0;
  line-height: 0;
  z-index: 3;
  pointer-events: auto;
}

.banner-slide__pager .swiper-pagination-bullet {
  width: 14px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.45);
  opacity: 1;
  margin: 0 3px;
  vertical-align: middle;
  transition: width 0.25s ease, background 0.25s ease;
}

.banner-slide__pager .swiper-pagination-bullet-active {
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: #fff;
}

.quick-nav {
  margin: -20px 12px 0;
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 8px 12px;
}

.quick-nav__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 4px;
}

.quick-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px;
}

.quick-nav__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.quick-nav__icon img {
  width: 24px;
  height: 24px;
}

.quick-nav__label {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
}

.quick-nav__item--tone-blue .quick-nav__icon { background: #E8F2FC; }
.quick-nav__item--tone-orange .quick-nav__icon { background: #FFF4E5; }
.quick-nav__item--tone-purple .quick-nav__icon { background: #F3EFFE; }
.quick-nav__item--tone-green .quick-nav__icon { background: #E8FAF3; }
.quick-nav__item--tone-teal .quick-nav__icon { background: #E6F7FA; }
.quick-nav__item--tone-rose .quick-nav__icon { background: #FDF2F8; }
.quick-nav__item--tone-red .quick-nav__icon { background: #FEECEC; }
.quick-nav__item--tone-indigo .quick-nav__icon { background: #EEF2FF; }

.quick-nav__item:active .quick-nav__icon {
  transform: scale(0.94);
}

.section {
  margin-top: 16px;
  padding: 0 12px;
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section__title {
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section__title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

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

.news-list {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.news-list > li {
  position: relative;
}

.news-list > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  border-bottom: 1px dashed rgba(0, 102, 204, 0.2);
}

.news-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-bottom: none;
}

.news-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-item__title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item__title--hot::after {
  content: "热";
  display: inline-block;
  font-size: 10px;
  color: #fff;
  background: #FF4D4F;
  padding: 0 4px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
}

.news-item__meta {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-item__author + .news-item__date::before {
  content: "·";
  margin: 0 4px;
}

.news-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.news-item__tag {
  flex-shrink: 0;
  max-width: 46%;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #555;
  background: #F3F3F3;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-item__thumb {
  flex-shrink: 0;
  width: 96px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--primary-light);
}

.news-item__thumb--placeholder {
  background-color: #EDF3FA;
  background-image: url("../img/placeholder-no-image.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
  border: 1px solid rgba(0, 102, 204, 0.08);
}

.news-item--featured {
  flex-direction: column;
}

.news-item--featured .news-item__thumb {
  width: 100%;
  height: 160px;
}

.news-item--featured .news-item__thumb--placeholder {
  background-size: 52px 52px;
}

/* 校园图库 */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photo-gallery__item {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
}

.photo-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.25s ease;
}

.photo-gallery__item:active img {
  transform: scale(1.03);
}

.photo-gallery__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 8px 6px;
  font-size: 11px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  border-radius: 0 0 10px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 图库预览 */
.gallery-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.gallery-viewer--open {
  display: flex;
}

.gallery-viewer__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}

.gallery-viewer__body {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  padding: 48px 16px 32px;
  text-align: center;
}

.gallery-viewer__img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 4px;
}

.gallery-viewer__caption {
  margin-top: 12px;
  font-size: 14px;
  color: #fff;
}

.gallery-viewer__counter {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.gallery-viewer__close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.gallery-viewer__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.gallery-viewer__nav--prev { left: 8px; }
.gallery-viewer__nav--next { right: 8px; }

.bottom-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 102, 204, 0.08);
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -2px 16px rgba(0, 102, 204, 0.06);
}

.bottom-tabs__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 0 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.bottom-tabs__item--active {
  color: var(--primary);
  font-weight: 500;
}

.bottom-tabs__icon {
  width: 22px;
  height: 22px;
}

.demo-badge {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 12px;
}

/* 内页工具栏 */
.page-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 8px 0 4px;
  background: linear-gradient(135deg, #0077E6 0%, #0066CC 55%, #005BB5 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.page-toolbar__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
}

.page-toolbar__back:active {
  background: rgba(255, 255, 255, 0.12);
}

.page-toolbar__title {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

.page-toolbar__placeholder {
  width: 40px;
  flex-shrink: 0;
}

/* 栏目横向导航 */
.column-nav {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(0, 102, 204, 0.08);
  padding: 10px 12px;
  overflow: hidden;
}

.column-nav__list {
  display: flex;
}

.column-nav__item {
  width: auto;
}

.column-nav__item a {
  display: block;
  padding: 6px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  border-radius: 20px;
  background: rgba(0, 102, 204, 0.06);
  transition: background 0.2s, color 0.2s;
}

.column-nav__item--active a {
  color: #fff;
  background: var(--primary);
  font-weight: 500;
}

.section--flush {
  padding: 0;
}

.section--flush .news-list {
  margin: 0 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.section--flush .photo-grid {
  border-radius: 0;
  border-left: none;
  border-right: none;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head__title {
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-head__title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.section-head__hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* 相册列表 */
.page-album {
  padding-bottom: calc(56px + var(--safe-bottom));
}

.album-section {
  padding-bottom: 24px;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 18px;
}

.album-tile {
  display: block;
  -webkit-tap-highlight-color: transparent;
}

.album-tile:active .album-tile__cover {
  opacity: 0.82;
  transform: scale(0.98);
}

.album-tile__cover {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #E5E5EA;
  display: grid;
  gap: 2px;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.album-tile__cell {
  display: block;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  background: #E5E5EA;
}

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

.album-tile__cover--grid4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.album-tile__cover--single {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.album-tile__cover--duo {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
}

.album-tile__cover--trio {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.album-tile__cover--trio .album-tile__cell--main {
  grid-row: 1 / 3;
}

.album-tile__name {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: #000;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.album-tile__count {
  margin-top: 2px;
  font-size: 13px;
  color: #8E8E93;
  font-variant-numeric: tabular-nums;
}

.bottom-tabs--ios {
  background: rgba(249, 249, 249, 0.94);
  border-top-color: rgba(60, 60, 67, 0.12);
  box-shadow: none;
}

.bottom-tabs--ios .bottom-tabs__item--active {
  color: var(--primary);
}

/* 相册图片网格 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.85);
}

.photo-grid li a {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
}

.photo-grid li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.25s ease;
}

.photo-grid li a:active img {
  transform: scale(1.03);
}

.page-list .column-nav,
.page-sublist .column-nav {
  position: sticky;
  top: 48px;
  z-index: 99;
}

.page-sublist .page-toolbar {
  position: sticky;
  top: 0;
}

.page-album-pics .page-toolbar {
  position: sticky;
  top: 0;
}

/* 表单查询页 */
.search-section {
  padding-bottom: 24px;
}

.search-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: var(--shadow);
}

.search-field {
  display: block;
  margin-bottom: 16px;
}

.search-field__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.search-field__control {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #E8E8ED;
  border-radius: 10px;
  font-size: 15px;
  color: var(--text);
  background: #FAFAFC;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.search-field__control:focus {
  border-color: var(--primary);
  background: #fff;
}

.search-picker {
  position: relative;
}

.search-picker__trigger {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.search-picker__value {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-picker__menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #E8E8ED;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 220px;
  overflow-y: auto;
}

.search-picker--open .search-picker__menu {
  display: block;
}

.search-picker--open .search-picker__trigger {
  border-color: var(--primary);
  background-color: #fff;
}

.search-picker__option {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.search-picker__option--active,
.search-picker__option:active {
  color: var(--primary);
  background: #E8F2FC;
}

.search-tip {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 4px 0 16px;
}

.search-submit {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #0077E6 0%, #0066CC 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.search-submit:active {
  opacity: 0.88;
}

.search-links {
  margin-top: 20px;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.search-links li {
  border-bottom: 1px dashed rgba(0, 102, 204, 0.16);
}

.search-links li:last-child {
  border-bottom: none;
}

.search-links a {
  display: block;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text);
}

.search-links a:active {
  background: #F5F7FA;
}

.search-links a::after {
  content: "›";
  float: right;
  color: #C7C7CC;
}
