/* 公开页样式 - 深邃星空蓝 + 流光金主题 */

/* 顶部导航 - 增强毛玻璃效果 */
.portal-header {
  background: rgba(10, 25, 41, 0.98);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  color: #fff;
  padding: 18px 0;
  box-shadow: 0 4px 30px rgba(0,0,0,0.4), 0 0 20px rgba(212, 175, 55, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.portal-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-user-area {
  display: flex;
  gap: 10px;
  align-items: center;
}

.portal-user-area .user-welcome {
  font-size: 14px;
  opacity: 0.9;
  margin-right: 4px;
  color: var(--text-secondary);
}

.portal-user-area .btn-outline {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--accent);
}

.portal-user-area .btn-outline:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--accent);
}

.portal-user-menu {
  display: flex;
  gap: 10px;
  align-items: center;
}

.portal-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #e6c36a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
  transition: transform 0.2s ease;
  user-select: none;
}

.portal-user-avatar:hover {
  transform: scale(1.1);
}

.portal-user-name {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .portal-user-name {
    display: none;
  }
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .5px;
}

.portal-logo { 
  font-size: 28px; 
  text-shadow: 0 0 15px var(--accent-glow);
  filter: drop-shadow(0 0 8px rgba(212,175,55,.35));
}

.portal-header .btn-outline {
  color: var(--accent);
  border-color: rgba(212, 175, 55, 0.3);
}

.portal-header .btn-outline:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent);
}

/* 班级信息横幅 */
.class-banner {
  background: linear-gradient(135deg, rgba(13, 27, 42, 0.92) 0%, rgba(30, 58, 95, 0.86) 45%, rgba(27, 75, 120, 0.92) 100%);
  color: #fff;
  padding: 68px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

/* 顶部微光流光（金色横条） */
.class-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(212,175,55,.55) 35%, rgba(250,204,21,.8) 50%, rgba(212,175,55,.55) 65%, transparent 100%);
  pointer-events: none;
}
.class-banner::after {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,.18) 0%, rgba(212,175,55,0) 70%);
  pointer-events: none;
  animation: bannerGlow 8s ease-in-out infinite alternate;
}
.class-banner > .ribbon-deco{
  content:'';position:absolute;pointer-events:none;
  left:-140px;bottom:-180px;width:520px;height:520px;border-radius:50%;
  background: radial-gradient(circle, rgba(59,130,246,.16) 0%, rgba(59,130,246,0) 70%);
  animation: bannerGlow 10s ease-in-out infinite alternate-reverse;
}
@keyframes bannerGlow{
  from{transform:translate(0,0) scale(1);}
  to  {transform:translate(24px,-18px) scale(1.08);}
}

.class-banner-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
}

.class-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  margin-bottom: 28px;
  letter-spacing: 4px;
}
.class-name-prefix{
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 8px;
  color: var(--text-secondary);
  opacity: .85;
}
.class-name-main{
  font-size: 54px;
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow), 0 4px 14px rgba(0,0,0,.35);
  background: linear-gradient(135deg,#fde68a 0%, #d4af37 45%, #f6d57c 65%, #b8860b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(212,175,55,.3));
}

.class-slogan {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  margin-bottom: 44px;
  opacity: 0.95;
  letter-spacing: 2.5px;
  line-height: 1.8;
  color: var(--text-secondary);
  padding: 12px 28px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(212,175,55,.18);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.slogan-quote{
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  opacity: .9;
}

.class-info-bar {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px dashed rgba(212,175,55,.22);
}

.class-info-item {
  min-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  transition: all .25s ease;
}
.class-info-item:hover{
  transform: translateY(-2px);
  background: rgba(212,175,55,.08);
  border-color: rgba(212,175,55,.3);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

.info-label {
  font-size: 12px;
  opacity: 0.78;
  color: var(--text-muted);
  letter-spacing: .5px;
}

.info-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .5px;
}

.info-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.info-link:hover { 
  opacity: 0.85; 
  text-shadow: 0 0 10px var(--accent-glow);
}

/* 内容区 */
.portal-content, .portal-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 48px;
}

/* 统计卡片手机端调整 */
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

/* 公开页统计卡片增强发光效果 */
.stats-grid .stat-card {
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.stats-grid .stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

/* 大图标导航卡片 */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.nav-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* 导航卡片流光效果 */
.nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 175, 55, 0.08),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

.nav-card:hover::before {
  left: 100%;
}

.nav-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-glow);
  border-color: rgba(212, 175, 55, 0.4);
}

.nav-card:active {
  transform: translateY(-4px) scale(0.98);
}

.nav-icon-wrapper {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--accent-glow), 0 0 40px rgba(212, 175, 55, 0.2);
  transition: all var(--transition-normal);
  position: relative;
  z-index: 1;
}

.nav-card:hover .nav-icon-wrapper {
  box-shadow: 0 0 50px var(--accent-glow), 0 0 80px rgba(212, 175, 55, 0.3);
  transform: scale(1.1);
}

.nav-icon {
  font-size: 40px;
  color: var(--bg-gradient-start);
}

.nav-text {
  text-align: center;
}

.nav-text h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

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

.nav-arrow {
  font-size: 16px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.nav-card:hover .nav-arrow {
  color: var(--accent);
  transform: translateX(6px);
}

/* 详情页 */
.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-back {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-back:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.back-icon {
  font-size: 16px;
}

.detail-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: 2px;
}

/* 详情内容区 */
.detail-content {
  display: none;
}

.detail-content.active {
  display: block;
  animation: fadeIn 0.5s ease-out;
}

/* 通知卡片 */
.portal-notice {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  border-left: 4px solid var(--border);
  border: 1px solid var(--border);
  transition: all var(--transition-normal);
}

.portal-notice:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(212, 175, 55, 0.3);
}

.portal-notice.pinned { border-left-color: var(--accent); background: rgba(212, 175, 55, 0.05); }

.portal-notice h4 {
  font-size: 16px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text);
}

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

.portal-notice .notice-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* 课表 */
.schedule-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: auto;
  border: 1px solid var(--border);
}

.schedule-grid {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  min-width: 600px;
}

.schedule-cell {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  min-height: 75px;
  font-size: 13px;
}

.schedule-header {
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent);
  font-weight: 600;
  text-align: center;
}

.schedule-time {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: pre-line;
}

/* 表格手机端可滚动 */
.table-wrapper { overflow-x: auto; }

/* ============ 座位表（公开页） ============ */
.seat-legend-portal {
  display: flex;
  gap: 20px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
  align-items: center;
}

.seat-legend-portal .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.seat-legend-portal .legend-color {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: inline-block;
  border: 1px solid var(--border);
}

.seat-legend-portal .legend-color.male { background: rgba(74,144,217,0.2); border-color: rgba(74,144,217,0.4); }
.seat-legend-portal .legend-color.female { background: rgba(233,30,99,0.2); border-color: rgba(233,30,99,0.4); }
.seat-legend-portal .legend-color.empty { background: rgba(255,255,255,0.03); border-color: var(--border); }

.seat-grid-portal {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 20px;
  overflow-x: auto;
  border: 1px solid var(--border);
}

.seat-grid-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  min-width: max-content;
  margin: 0 auto;
}

.seat-row-portal {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.seat-group-portal {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.1);
}

.seat-aisle {
  width: 20px;
  flex-shrink: 0;
}

.seat-group-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
}

.seat-group-title-portal {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  width: calc(80px * 2 + 8px + 8px);
}

.seat-cell-portal {
  width: 80px;
  height: 56px;
  border: 2px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  box-sizing: border-box;
  transition: all var(--transition-fast);
}

.seat-cell-portal.occupied {
  border-style: solid;
  background: rgba(255, 255, 255, 0.05);
}

.seat-cell-portal.occupied.male {
  border-color: rgba(74,144,217,0.5);
  background: rgba(74,144,217,0.1);
}

.seat-cell-portal.occupied.female {
  border-color: rgba(233,30,99,0.5);
  background: rgba(233,30,99,0.1);
}

.seat-cell-portal:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow);
}

.seat-cell-portal .seat-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  text-align: center;
}

.seat-podium-portal {
  margin-top: 24px;
  align-self: center;
  width: 60%;
  max-width: 360px;
  padding: 16px 28px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--bg-gradient-start);
  text-align: center;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 8px;
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* ============ 班级资料（公开页） ============ */
.document-list-portal {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.doc-category-portal {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  border: 1px solid var(--border);
}

.doc-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.doc-cat-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.doc-cat-icon { font-size: 20px; color: var(--accent); }

.doc-cat-count {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(212, 175, 55, 0.1);
  padding: 4px 12px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.doc-cat-desc {
  margin: 0 0 14px 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.doc-file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-file-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

.doc-file-item:hover {
  border-color: var(--accent);
  background: rgba(212, 175, 55, 0.05);
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.15);
}

.doc-file-icon {
  font-size: 32px;
  flex-shrink: 0;
  width: 44px;
  text-align: center;
  color: var(--accent);
}

.doc-file-info {
  flex: 1;
  min-width: 0;
}

.doc-file-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  word-break: break-all;
}

.doc-file-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.doc-file-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

.doc-file-action {
  flex-shrink: 0;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--bg-gradient-start);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.doc-file-item:hover .doc-file-action {
  box-shadow: 0 0 20px var(--accent-glow);
}

/* 相册布局统一使用 admin.css 中的 .album-grid 样式（管理页与公开页一致） */

/* 分页手机端 */
.pagination { flex-wrap: wrap; }

/* ============ 趣味记忆翻牌游戏 ============ */
.game-section {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-top: 24px;
  border: 1px solid var(--border);
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.game-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px 0;
  letter-spacing: 2px;
}

.game-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.game-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.game-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.15);
  padding: 8px 16px;
  border-radius: 10px;
  min-width: 70px;
}

.game-stat .stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.game-stat .stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.game-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

/* 卡牌网格：自适应列数 */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
}

.memory-card {
  aspect-ratio: 1 / 1;
  perspective: 1000px;
  cursor: pointer;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
}

.memory-card.flipped .memory-card-inner,
.memory-card.matched .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-front,
.memory-card-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.memory-card-front {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--bg-gradient-start);
  font-size: 36px;
}

.memory-card-front:hover {
  box-shadow: 0 0 30px var(--accent-glow);
}

.memory-card-back {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  transform: rotateY(180deg);
  gap: 6px;
}

.memory-icon {
  font-size: 34px;
  line-height: 1;
}

.memory-name {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.memory-card.matched .memory-card-back {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
}

.memory-card.matched {
  animation: matchPulse 0.5s ease;
}

@keyframes matchPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* 完成结果卡片 */
.game-result {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.result-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  padding: 28px 36px;
  text-align: center;
  max-width: 400px;
  box-shadow: var(--shadow-glow);
}

.result-emoji {
  font-size: 52px;
  margin-bottom: 10px;
  animation: bounce 0.8s ease;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-12px); }
  50% { transform: translateY(0); }
  75% { transform: translateY(-6px); }
}

.result-grade {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent);
}

.result-msg {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.result-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  gap: 16px;
}

.result-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-stats span {
  font-size: 12px;
  color: var(--text-muted);
}

.result-stats strong {
  font-size: 20px;
  color: var(--text);
  font-weight: 700;
  margin-top: 4px;
}

/* ============ 手机端响应式 ============ */
@media (max-width: 768px) {
  .portal-header-inner { padding: 0 16px; }
  .portal-brand { font-size: 16px; }
  .portal-logo { font-size: 22px; }

  .class-banner { padding: 48px 18px 44px; }
  .class-name { gap: 8px; margin-bottom: 22px; letter-spacing: 2px; }
  .class-name-prefix { font-size: 14px; letter-spacing: 5px; }
  .class-name-main { font-size: 40px; }
  .class-slogan { font-size: 14px; margin-bottom: 32px; padding: 10px 18px; letter-spacing: 1.5px; }
  .slogan-quote { font-size: 18px; }
  .class-info-bar { gap: 14px; padding-top: 24px; }
  .class-info-item { min-width: 140px; padding: 12px 14px 14px; }
  .info-value { font-size: 16px; }

  .portal-content, .portal-detail { padding: 20px 16px 32px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* 游戏区域移动端适配 */
  .game-section { padding: 20px; }
  .game-header { flex-direction: column; align-items: stretch; }
  .game-controls { justify-content: space-between; }
  .game-stat { padding: 6px 12px; min-width: 60px; }
  .game-stat .stat-value { font-size: 16px; }
  .memory-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .memory-card-front { font-size: 28px; }
  .memory-icon { font-size: 24px; }
  .memory-name { font-size: 11px; }
  .result-card { padding: 20px 24px; }
  .result-emoji { font-size: 42px; }
  .result-grade { font-size: 20px; }

  .nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .nav-card {
    padding: 22px 18px;
  }
  .nav-icon-wrapper {
    width: 66px;
    height: 66px;
  }
  .nav-icon { font-size: 32px; }
  .nav-text h3 { font-size: 16px; }
  .nav-text p { font-size: 12px; }

  .stat-card { padding: 18px; gap: 12px; }
  .stat-icon { width: 44px; height: 44px; font-size: 20px; }
  .stat-info h3 { font-size: 22px; }
  .stat-info p { font-size: 12px; }

  .portal-notice { padding: 16px 18px; }

  .album-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .album-item .album-img-wrap { height: 150px; }

  .balance-card { flex-direction: column; gap: 14px; padding: 20px; }
  .balance-amount { font-size: 30px; }
  .balance-details { text-align: center; }

  .detail-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .detail-title { font-size: 22px; }
}

@media (max-width: 480px) {
  .class-name { gap: 6px; margin-bottom: 20px; }
  .class-name-prefix { font-size: 13px; letter-spacing: 4px; }
  .class-name-main { font-size: 34px; }
  .class-slogan { font-size: 13px; padding: 10px 14px; }
  .slogan-quote { font-size: 16px; }
  .class-info-bar { gap: 12px; flex-direction: column; }
  .class-info-item { min-width: 0; width: 100%; padding: 12px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  .nav-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .nav-card {
    flex-direction: row;
    padding: 18px;
    justify-content: flex-start;
    gap: 18px;
  }
  .nav-icon-wrapper {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }
  .nav-icon { font-size: 28px; }
  .nav-text {
    text-align: left;
    flex: 1;
  }
}

/* ============ 相册评论区样式 ============ */
.portal-preview-modal {
  max-width: 780px;
}

.portal-preview-body {
  max-height: 75vh;
  overflow-y: auto;
}

.comment-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.comment-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 14px 0;
}

.comment-count {
  display: inline-block;
  background: rgba(212, 175, 55, 0.1);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  margin-left: 6px;
  font-weight: normal;
}

.comment-list {
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 16px;
}

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

.comment-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--bg-gradient-start);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 0 10px var(--accent-glow);
}

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

.comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.comment-user {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

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

.comment-del-btn {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--danger);
  font-size: 12px;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
}

.comment-del-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

.comment-action-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
}

.comment-action-btn:hover {
  background: rgba(212, 175, 55, 0.1);
}

.reply-action-btn, .reply-del-btn {
  font-size: 11px;
  padding: 2px 6px;
}

.comment-content {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.comment-input {
  width: 100%;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.comment-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.comment-login-tip {
  text-align: center;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13px;
}

/* 回复列表 */
.reply-list {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.reply-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.5;
}

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

.reply-user {
  font-weight: 600;
  color: var(--text);
}

.reply-to {
  color: var(--text-muted);
}

.reply-to-user {
  font-weight: 500;
  color: var(--text-secondary);
}

.reply-content {
  color: var(--text);
  word-break: break-word;
}

.reply-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.reply-meta .comment-time { flex-shrink: 0; }

/* 回复表单 */
.reply-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reply-input {
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.reply-input:focus {
  outline: none;
  border-color: var(--accent);
}

.reply-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 480px 响应式补充 */
@media (max-width: 480px) {
  .nav-arrow { font-size: 18px; }
}

/* ============ 小游戏排行榜样式 ============ */
.leaderboard-section {
  margin-top: 28px;
  padding: 24px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.leaderboard-header {
  text-align: center;
  margin-bottom: 20px;
}

.leaderboard-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px 0;
  letter-spacing: 2px;
}

.leaderboard-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.leaderboard-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.lb-tab {
  padding: 8px 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 22px;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}

.lb-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lb-tab.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--bg-gradient-start);
  border-color: var(--accent);
  font-weight: 600;
}

.leaderboard-list {
  min-height: 140px;
}

.lb-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 36px 20px;
  font-size: 14px;
  line-height: 1.8;
}

.lb-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.lb-row {
  display: grid;
  grid-template-columns: 60px 1fr 80px 60px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  transition: background var(--transition-fast);
}

.lb-row:last-child { border-bottom: none; }

.lb-row-head {
  background: rgba(212, 175, 55, 0.05);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.lb-row:not(.lb-row-head):hover {
  background: rgba(212, 175, 55, 0.05);
}

.lb-row-top {
  background: rgba(212, 175, 55, 0.03);
}

.lb-row-me {
  background: rgba(212, 175, 55, 0.1) !important;
  border-left: 3px solid var(--accent);
}

.lb-rank {
  font-size: 20px;
  text-align: center;
}

.lb-rank-num {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.lb-user {
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-me-tag {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-gradient-start);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.lb-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
}

.lb-moves {
  text-align: center;
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .lb-row {
    grid-template-columns: 48px 1fr 68px 48px;
    padding: 10px 12px;
    font-size: 13px;
  }
  .lb-rank { font-size: 17px; }
  .leaderboard-section { padding: 18px; }
}

/* ============ 班级投票 ============ */
.vote-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.vote-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 26px;
  border: 1px solid var(--border);
}

.vote-card-header {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.vote-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.vote-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.vote-type-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--accent);
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
}

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

.vote-voted-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #10b981;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
}

.vote-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.vote-body {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.vote-options {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vote-option-result {
  position: relative;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition-normal);
  background: rgba(255, 255, 255, 0.03);
}

.vote-option-result:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.vote-option-result.selected {
  border-color: var(--accent);
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.vote-option-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 9px;
  background: rgba(212, 175, 55, 0.2);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.vote-option-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.vote-option-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.8), 0 1px 3px rgba(0,0,0,0.15);
  background: var(--accent);
}

.vote-option-text {
  flex: 1;
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}

.vote-option-check {
  color: var(--accent);
  font-weight: bold;
  font-size: 18px;
}

.vote-option-percent {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  min-width: 60px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.vote-option-count {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 50px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.vote-option-select {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 15px;
  background: rgba(255, 255, 255, 0.03);
  user-select: none;
}

.vote-option-select:hover {
  border-color: var(--accent);
  background: rgba(212, 175, 55, 0.05);
  transform: translateX(4px);
}

.vote-option-select.checked {
  border-color: var(--accent);
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.vote-option-select input {
  display: none;
}

.vote-option-select .vote-option-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.05);
}

.vote-option-select input:checked + .vote-option-radio {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.vote-option-select input:checked + .vote-option-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-gradient-start);
}

/* 多选模式使用方形勾选框 */
.vote-option-select input[type="checkbox"] + .vote-option-radio {
  border-radius: 8px;
}

.vote-option-select input[type="checkbox"]:checked + .vote-option-radio::after {
  width: 6px;
  height: 10px;
  border: solid var(--bg-gradient-start);
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -60%) rotate(45deg);
  background: transparent;
  border-radius: 0;
}

.vote-chart-wrap {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vote-pie-chart {
  max-width: 100%;
  height: auto;
}

.vote-card-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}

.vote-login-tip {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ 倒计时 ============ */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.countdown-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  transition: all var(--transition-normal);
}

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

.cd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.cd-icon {
  font-size: 32px;
  color: var(--accent);
}

.cd-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.cd-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.cd-number {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.cd-num {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cd-days .cd-num {
  font-size: 42px;
}

.cd-unit {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.cd-sep {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.cd-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.cd-date {
  font-size: 13px;
  color: var(--text-secondary);
}

.cd-status {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 14px;
  font-weight: 600;
}

.cd-active {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.cd-past {
  background: rgba(107, 114, 128, 0.1);
  border: 1px solid rgba(107, 114, 128, 0.2);
  color: #6b7280;
}

/* ============ 首页倒计时预览 ============ */
.home-countdown-section {
  margin-top: 28px;
  margin-bottom: 10px;
}

.home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.home-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: 2px;
}

.home-section-more {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity var(--transition-fast);
}

.home-section-more:hover {
  opacity: 0.7;
  text-shadow: 0 0 10px var(--accent-glow);
}

.home-countdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.home-cd-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow);
}

.home-cd-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-left-width: 6px;
}

.home-cd-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.home-cd-icon {
  font-size: 24px;
  color: var(--accent);
}

.home-cd-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-cd-body {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.home-cd-days {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.home-cd-unit {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}

.home-cd-time {
  font-size: 14px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.home-cd-past {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-muted);
}

.home-cd-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* 投票和倒计时移动端响应式 */
@media (max-width: 768px) {
  .vote-card {
    padding: 20px;
  }
  .vote-title {
    font-size: 18px;
  }
  .vote-body {
    flex-direction: column;
    gap: 20px;
  }
  .vote-chart-wrap {
    width: 100%;
    order: -1;
  }
  .vote-options {
    min-width: auto;
    width: 100%;
  }

  .countdown-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .countdown-card {
    padding: 20px;
  }
  .cd-num {
    font-size: 30px;
  }
  .cd-days .cd-num {
    font-size: 34px;
  }
  .cd-number {
    min-width: 50px;
  }
  .cd-sep {
    font-size: 22px;
    margin-bottom: 14px;
  }
  .home-countdown-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
  }
  .home-cd-card {
    padding: 14px 16px;
  }
  .home-cd-days {
    font-size: 30px;
  }
  .home-section-title {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .vote-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}