/* =============================================
   笔杆子书法空中课�?· 作业统计排名系统
   主题：水墨中国风 · 雅致 · 专业
   ============================================= */

/* ----- Logo ----- */
.header-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}
.logo-img-wrap {
  display: inline-flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.logo-img {
  display: block;
  max-height: 64px;
  width: auto;
}
.logo-img-sm {
  display: block;
  height: 36px;
  width: auto;
  border-radius: 4px;
  -webkit-border-radius: 4px;
}
.admin-logo {
  display: flex;
  align-items: center;
}

/* ----- 调色�?----- */
:root {
  /* 墨色系列 */
  --ink-deepest: #1a1a1a;
  --ink-deep:   #2c2c2c;
  --ink:        #3d3d3d;
  --ink-light:  #6b6b6b;
  --ink-faint:  #999999;

  /* 宣纸系列 */
  --paper-deep: #e8dcc8;
  --paper:      #f2ead8;
  --paper-light:#f8f3e9;
  --paper-bg:   #fdfaf2;

  /* 印章�?*/
  --seal:       #b52b1d;
  --seal-light: #d4443a;
  --seal-glow:  rgba(181,43,29,0.12);

  /* 金色 */
  --gold:       #b8860b;
  --gold-light: #f0d68a;
  --gold-bg:    #fffbe6;

  /* 翡翠�?*/
  --jade:       #3a7d5c;
  --jade-light: #6db08a;

  /* 青蓝 */
  --blue:       #2c5f7a;
  --blue-light: #598ba8;

  /* 功能�?*/
  --success:    #3a7d5c;
  --danger:     #b52b1d;
  --warning:    #b8860b;

  /* 阴影 */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.10);

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* 动画 */
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, sans-serif;
  background: var(--paper-bg);
  background-image:
    radial-gradient(ellipse at 10% 20%, rgba(139,119,90,0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(139,119,90,0.03) 0%, transparent 50%);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ====== 头部：书法卷轴风�?====== */
.header {
  position: relative;
  background: linear-gradient(135deg, #2c2c2c 0%, #3d3d3d 50%, #4a3020 100%);
  color: #fff;
  padding: 0;
  overflow: hidden;
}

/* 顶部纹理 */
.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.02) 2px, rgba(255,255,255,0.02) 4px);
  pointer-events: none;
}

/* 装饰性水墨晕�?*/
.header::after {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.header-inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 20px 24px;
  text-align: center;
}

/* 顶部导航链�?*/
.header-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(255,255,255,0.3);
}

/* 底部导航栏 */
.bottom-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 12px 16px;
  background: var(--paper);
  border-radius: var(--radius-md);
  border: 1px solid var(--paper-deep);
}

.bottom-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 20px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--paper-deep);
  transition: all 0.2s;
  flex: 1;
  max-width: 160px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  background: var(--seal);
  color: white;
  border-color: var(--seal);
}

/* QR码弹窗 */
.qr-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-modal {
  background: white;
  padding: 32px 28px 24px;
  border-radius: var(--radius-lg);
  max-width: 340px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.qr-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  font-size: 20px;
  color: var(--ink-light);
  cursor: pointer;
  padding: 4px 8px;
}

.qr-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-deep);
  margin-bottom: 20px;
}

.qr-code-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.qr-image {
  width: 220px;
  height: 220px;
  border: 2px solid var(--paper-deep);
  border-radius: var(--radius-sm);
}

.qr-hint {
  font-size: 13px;
  color: var(--ink-light);
  margin-bottom: 16px;
}

.qr-direct-link {
  display: inline-block;
  font-size: 13px;
  color: var(--seal);
  text-decoration: underline;
}

/* 书法标题 - 模拟毛笔�?*/
.header-title {
  font-family: "STKaiti", "KaiTi", "楷体", serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  position: relative;
  display: inline-block;
}

/* 标题下方的朱砂印章装�?*/


.header-sub {
  font-size: 13px;
  opacity: 0.75;
  margin-top: 6px;
  letter-spacing: 3px;
  font-weight: 300;
}

/* 印章装饰（右上角�?*/
.header-seal {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 2px solid var(--seal-light);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 11px;
  color: var(--seal-light);
  letter-spacing: 1px;
  transform: rotate(3deg);
  opacity: 0.85;
  line-height: 1.2;
  text-align: center;
}
.header-seal span { display: block; }

/* ----- 容器 ----- */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* ----- 卡片 ----- */
.card {
  background: var(--paper-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 18px;
  border: 1px solid rgba(212, 201, 168, 0.4);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--paper-deep);
  position: relative;
}

/* 毛笔分割线装�?*/
.card-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--seal);
  border-radius: 1px;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-deep);
  letter-spacing: 1px;
}

.card-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--seal-glow);
  border-radius: 8px;
}

.page-section {
  margin-bottom: 18px;
}
.page-section:last-child { margin-bottom: 0; }

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-light);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

/* ----- 搜索 ----- */
.search-box {
  display: flex;
  gap: 10px;
}
.search-box input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid rgba(212, 201, 168, 0.6);
  border-radius: var(--radius-md);
  font-size: 15px;
  background: #fff;
  outline: none;
  transition: border-color var(--transition);
  font-family: inherit;
}
.search-box input:focus {
  border-color: var(--seal);
  box-shadow: 0 0 0 3px var(--seal-glow);
}
.search-box input::placeholder {
  color: var(--ink-faint);
}
.search-box .btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  background: var(--seal);
  color: white;
  transition: all var(--transition);
  white-space: nowrap;
}
.search-box .btn:hover {
  background: var(--seal-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(181,43,29,0.3);
}
.search-box .btn:active {
  transform: translateY(0);
}

.search-hint {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ----- 按钮 ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--seal);
  color: white;
}
.btn-primary:hover {
  background: var(--seal-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--seal-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(212, 201, 168, 0.6);
}
.btn-ghost:hover {
  border-color: var(--seal);
  color: var(--seal);
  background: var(--seal-glow);
}
.btn-jade {
  background: var(--jade);
  color: white;
}
.btn-jade:hover {
  background: var(--jade-light);
  transform: translateY(-1px);
}
.btn-ghost-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(181,43,29,0.3);
}
.btn-ghost-danger:hover {
  background: rgba(181,43,29,0.08);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ----- 统计网格 ----- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.stat-item {
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  border: 1px solid rgba(212, 201, 168, 0.4);
  position: relative;
  overflow: hidden;
}
.stat-item .value {
  font-size: 30px;
  font-weight: 700;
  color: var(--ink-deep);
  line-height: 1.2;
}
.stat-item .value.seal { color: var(--seal); }
.stat-item .value.gold { color: var(--gold); }
.stat-item .value.jade { color: var(--jade); }
.stat-item .value.blue { color: var(--blue); }
.stat-item .label {
  font-size: 12px;
  color: var(--ink-light);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* 统计项装饰线 */
.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: rgba(212, 201, 168, 0.6);
  border-radius: 0 0 3px 3px;
}

/* ----- 等级标签 ----- */
.grade-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  min-width: 44px;
}
.grade-you-plus {
  background: linear-gradient(135deg, #fff8e1, #ffe082);
  color: #5a3e00;
  border: 1px solid #ffd54f;
  box-shadow: 0 1px 4px rgba(255,193,7,0.3);
}
.grade-you {
  background: linear-gradient(135deg, #e8f5e9, #a5d6a7);
  color: #1b5e20;
  border: 1px solid #66bb6a;
}
.grade-liang {
  background: linear-gradient(135deg, #e3f2fd, #90caf9);
  color: #0d47a1;
  border: 1px solid #42a5f5;
}
.grade-zhong {
  background: linear-gradient(135deg, #fbe9e7, #ffab91);
  color: #bf360c;
  border: 1px solid #ff7043;
}

/* ----- 学生搜索结果 ----- */
.student-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.student-result-item:hover {
  background: var(--paper);
  border-color: rgba(212, 201, 168, 0.5);
  transform: translateX(4px);
}
.student-result-item .name {
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ====== 排行�?====== */
.period-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.period-tab {
  padding: 6px 16px;
  border: 1px solid rgba(212, 201, 168, 0.5);
  border-radius: 20px;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--ink-light);
}
.period-tab:hover {
  border-color: var(--seal);
  color: var(--seal);
}
.period-tab.active {
  background: var(--seal);
  color: white;
  border-color: var(--seal);
}

.sort-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.sort-tab {
  padding: 7px 16px;
  border: 1px solid rgba(212, 201, 168, 0.5);
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--ink-light);
}
.sort-tab:hover {
  border-color: var(--ink-light);
  color: var(--ink);
}
.sort-tab.active {
  background: var(--ink-deep);
  color: white;
  border-color: var(--ink-deep);
}

/* 排名表格 */
.ranking-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ranking-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-size: 14px;
}
.ranking-table thead th {
  text-align: center;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0.5px;
  border-bottom: none;
  line-height: 1.2;
}
.ranking-table thead th br {
  display: block;
  content: '';
  margin: 2px 0;
}
.ranking-table tbody td {
  padding: 8px 4px;
  vertical-align: middle;
  height: 40px;
  box-sizing: border-box;
}
.ranking-table tbody tr { transition: transform 0.15s; border-radius: var(--radius-sm); }
.ranking-table tbody tr:hover { transform: scale(1.008); }
.ranking-table tbody tr:hover td { background: rgba(212, 201, 168, 0.15); }

/* 前三名特殊样式 */
.ranking-table tbody tr.rank-1 td { background: linear-gradient(90deg, #fff8e1, #fffde7); }
.ranking-table tbody tr.rank-2 td { background: linear-gradient(90deg, #f5f5f5, #fafafa); }
.ranking-table tbody tr.rank-3 td { background: linear-gradient(90deg, #fce4ec, #fff0f2); }
.ranking-table tbody tr.rank-1:hover td { background: linear-gradient(90deg, #fff3cd, #fff9c4) !important; }
.ranking-table tbody tr.rank-2:hover td { background: linear-gradient(90deg, #eeeeee, #f5f5f5) !important; }
.ranking-table tbody tr.rank-3:hover td { background: linear-gradient(90deg, #f8bbd0, #fce4ec) !important; }
.ranking-table tbody tr.rank-1 { border-left: 3px solid #ffa000; }
.ranking-table tbody tr.rank-2 { border-left: 3px solid #9e9e9e; }
.ranking-table tbody tr.rank-3 { border-left: 3px solid #bf6a3a; }

/* 排名奖牌 */
.rank-medal { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 700; font-size: 13px; }
.rank-medal.gold { background: linear-gradient(135deg,#ffd54f,#ffb300); color:#5d4037; box-shadow: 0 2px 6px rgba(255,179,0,0.3); }
.rank-medal.silver { background: linear-gradient(135deg,#e0e0e0,#bdbdbd); color:#424242; box-shadow: 0 2px 6px rgba(158,158,158,0.3); }
.rank-medal.bronze { background: linear-gradient(135deg,#ffab91,#bf6a3a); color:#fff; box-shadow: 0 2px 6px rgba(191,106,58,0.3); }
.rank-medal.plain { background: var(--paper-deep); color: var(--ink-light); font-size: 12px; width: 24px; height: 24px; }

/* 表彰角标（前三名） */
.rank-tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; margin-left: 4px; }
.rank-tag.gold-tag { background: linear-gradient(135deg,#ffd54f,#ffb300); color:#5d4037; }
.rank-tag.silver-tag { background: linear-gradient(135deg,#e0e0e0,#bdbdbd); color:#424242; }
.rank-tag.bronze-tag { background: linear-gradient(135deg,#ffab91,#bf6a3a); color:#fff; }

/* 排名 - 居中对齐（奖牌） */
.ranking-table tbody td:first-child { text-align: center; width: 40px; }

/* 姓名 - 左对齐 */
.ranking-table tbody td:nth-child(2) { text-align: left; padding-left: 12px; }

/* 提交/当日最佳 - 居中 */
.ranking-table tbody td:nth-child(3) { text-align: center; width: 40px; }
.ranking-table tbody td:nth-child(4) { text-align: center; width: 40px; }

/* 成绩等级 - 居中 */
.ranking-table tbody td:nth-child(5) { text-align: center; width: 38px; }
.ranking-table tbody td:nth-child(6) { text-align: center; width: 36px; }
.ranking-table tbody td:nth-child(7) { text-align: center; width: 36px; }
.ranking-table tbody td:nth-child(8) { text-align: center; width: 36px; }

/* 得分 - 右对齐（数字按位对齐，方便比较） */
.ranking-table tbody td:nth-child(9) { text-align: right; width: 48px; font-weight: 700; padding-right: 8px; }

/* 备注 - 居中 */
.ranking-table tbody td:nth-child(10) { text-align: center; width: 44px; }

/* 列表头同样调整：得分右对齐 */
.ranking-table thead th:nth-child(9) { text-align: right; padding-right: 8px; }


.ranking-table .rank-name { font-weight: 600; font-size: 14px; }
.ranking-table .rank-name.top1-name { color: var(--ink-deep); }
.ranking-table .rank-name.top2-name { color: var(--ink-deep); }
.ranking-table .rank-name.top3-name { color: var(--ink-deep); }

.ranking-table .rank-score { font-weight: 700; color: var(--seal); font-size: 15px; }

/* 电脑端排行榜底部操作 */
.ranking-actions { margin-top: 24px; text-align: center; padding: 14px 0 18px; border-top: 1px solid rgba(212,201,168,0.3); }
.ranking-actions .btn-share { display: inline-flex; align-items: center; gap: 6px; padding: 8px 22px; background: var(--paper); border: 1px solid rgba(212,201,168,0.4); border-radius: 20px; font-size: 13px; color: var(--ink-light); cursor: pointer; transition: all 0.2s; }

/* ===== 底部版权 ===== */
.footer { text-align: center; padding: 24px 0 32px; color: var(--ink-light); font-size: 13px; letter-spacing: 0.5px; opacity: 0.75; }
.footer a { color: inherit; text-decoration: none; transition: opacity 0.2s; }
.footer a:hover { opacity: 1; }
.ranking-actions .btn-share:hover { background: var(--paper-deep); color: var(--ink-deep); }
/* =============================================
   管理后台样式
   ============================================= */
.admin-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(135deg, #2c2c2c 0%, #3d3d3d 50%, #4a3020 100%);
  color: white;
}
.admin-header h1 {
  font-size: 16px;
  letter-spacing: 2px;
  font-weight: 600;
}
.admin-header .btn-logout {
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.admin-header .btn-logout:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

/* 导航 Tabs */
.nav-bar {
  display: flex;
  gap: 2px;
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-bar::-webkit-scrollbar { display: none; }
.nav-bar button {
  flex-shrink: 0;
  padding: 9px 20px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: var(--ink-light);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-bar button:hover { color: var(--ink); }
.nav-bar button.active {
  background: white;
  color: var(--ink-deep);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* 管理表单 */
.admin-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 16px;
  background: var(--paper);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.admin-form .field { min-width: 120px; flex:1; }
.admin-form .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-light);
}
.admin-form .field label { font-weight: 500; }
.admin-form input, .admin-form select {
  padding: 9px 12px;
  border: 1px solid rgba(212, 201, 168, 0.5);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: white;
  min-width: 120px;
  outline: none;
  transition: border-color var(--transition);
}
.admin-form input:focus, .admin-form select:focus {
  border-color: var(--seal);
  box-shadow: 0 0 0 3px var(--seal-glow);
}

/* 管理表格 */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.admin-table thead th {
  text-align: left;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
  border-bottom: 2px solid var(--paper-deep);
  white-space: nowrap;
}
.admin-table tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(212, 201, 168, 0.3);
}
.admin-table tbody tr:hover td {
  background: rgba(212, 201, 168, 0.15);
}

.audit-entry {
  background: #fff;
  border: 1px solid rgba(212,201,168,0.25);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 4px;
}
.audit-entry:last-child { margin-bottom: 0; }
.audit-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.audit-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink-light);
  white-space: nowrap;
}
.audit-loc {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.audit-loc.本地 { background: #e8f5e9; color: #2e7d32; }
.audit-loc.内网 { background: #e3f2fd; color: #1565c0; }
.audit-loc.外网 { background: #fff3e0; color: #e65100; }
.audit-time {
  margin-left: auto;
  font-size: 10px;
  color: var(--ink-faint);
  white-space: nowrap;
}
.audit-detail {
  font-size: 12px;
  color: var(--ink-light);
  line-height: 1.4;
  word-break: break-all;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 15px;
}
.btn-icon.danger {
  background: rgba(181,43,29,0.1);
  color: var(--danger);
}
.btn-icon.danger:hover {
  background: rgba(181,43,29,0.2);
}

/* Toast 提示 */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 14px;
  z-index: 9999;
  animation: toastIn 0.35s ease-out;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}
.toast.success { background: #e8f5e9; color: #1b5e20; border: 1px solid #66bb6a; }
.toast.error { background: #ffebee; color: #b71c1c; border: 1px solid #ef5350; }
.toast.info { background: #e3f2fd; color: #0d47a1; border: 1px solid #42a5f5; }
@keyframes toastIn {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ----- 登录�?----- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2c2c2c 0%, #3d3d3d 100%);
  padding: 20px;
}
.login-logo {
  max-height: 64px; width: auto; border-radius: 8px; display: block; margin: 0 auto;
  max-width: 100%;
}
.login-card {
  background: var(--paper-light);
  border-radius: var(--radius-lg);
  padding: 40px 32px 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
}
.login-card .seal-icon {
  width: 64px;
  height: 64px;
  border: 2px solid var(--seal);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 18px;
  color: var(--seal);
  transform: rotate(3deg);
  margin-bottom: 20px;
  line-height: 1.3;
}
.login-card h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-deep);
  margin-bottom: 24px;
  letter-spacing: 2px;
}
.login-card .field {
  text-align: left;
  margin-bottom: 14px;
}
.login-card .field label {
  display: block;
  font-size: 12px;
  color: var(--ink-light);
  margin-bottom: 4px;
  font-weight: 500;
}
.login-card .field input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid rgba(212, 201, 168, 0.5);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.login-card .field input:focus {
  border-color: var(--seal);
  box-shadow: 0 0 0 3px var(--seal-glow);
}
.login-card .login-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--seal);
  color: white;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
}
.login-card .login-btn:hover {
  background: var(--seal-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--seal-glow);
}
.login-card .back-link {
  display: block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-faint);
  text-decoration: none;
}
.login-card .back-link:hover { color: var(--seal); }

/* ----- 批量勾�?----- */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(212, 201, 168, 0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
  user-select: none;
}
.checkbox-item:hover {
  border-color: var(--seal);
  background: var(--seal-glow);
}
.checkbox-item.checked {
  background: var(--seal-glow);
  border-color: var(--seal);
  color: var(--seal);
  font-weight: 500;
}
.checkbox-item input { display: none; }

/* ----- 奖品管理 ----- */
.prize-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.prize-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  border: 1px solid rgba(212, 201, 168, 0.4);
  transition: all var(--transition);
}
.prize-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.prize-card .prize-emoji {
  font-size: 36px;
  margin-bottom: 8px;
}
.prize-card .prize-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.prize-card .prize-stock {
  font-size: 12px;
  color: var(--ink-light);
}

.winners-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.winner-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--gold-bg);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(184,134,11,0.2);
}
.winner-item .winner-rank {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}
.winner-item .winner-name {
  font-weight: 500;
}
.winner-item .winner-prize {
  font-size: 13px;
  color: var(--ink-light);
}

/* ----- 加载动画 ----- */
.loading-state {
  text-align: center;
  padding: 40px;
  color: var(--ink-faint);
}
.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--paper-deep);
  border-top-color: var(--seal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== 响应�?====== */
@media (max-width: 640px) {
  .header-inner { padding: 20px 16px 18px; }
  .header-title { font-size: 20px; letter-spacing: 4px; }
  .header-seal { width: 36px; height: 36px; font-size: 9px; top: 10px; right: 12px; }
  .header-inner { padding: 14px 12px 12px; }
  .header-title { font-size: 17px; }
  .header-sub { font-size: 11px; }
  .header-links { margin-top: 6px; flex-wrap: wrap; justify-content: center; gap: 4px; }
  .nav-link { font-size: 12px; padding: 5px 10px; }
  

  /* 手机端隐藏底部导航（已移除HTML中的三按钮） */
  .bottom-nav { display: none !important; }

  .container { padding: 10px 8px 20px; }
  .card { padding: 12px; margin-bottom: 8px; }
  .card-header { margin-bottom: 14px; }
  .card-title { font-size: 15px; }

  .search-box { flex-direction: column; }
  .search-box .btn { width: 100%; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-item { padding: 12px 8px; }
  .stat-item .value { font-size: 24px; }

  .ranking-table { font-size: 13px; }
  .ranking-table thead th,
  .ranking-table tbody td { padding: 8px 6px; }
  .rank-medal { width: 28px; height: 28px; font-size: 14px; }

  .admin-form { flex-direction: column; align-items: stretch; }
  .admin-form .field { width: 100%; }
  .admin-form input, .admin-form select { width: 100%; }
  input[type=date], input[type=month], input[type=time] { max-width: 100%; width: auto; min-width: 0; }
  .admin-form .btn { width: 100%; }

  .nav-bar button { padding: 8px 14px; font-size: 12px; }

  .admin-layout { padding: 10px; }
  .login-card { padding: 28px 20px 20px; }

  .prize-card-grid { grid-template-columns: repeat(2, 1fr); }
  .checkbox-grid { grid-template-columns: repeat(2, 1fr); }

  /* ===== 手机端：本月奖品 ===== */
  .tier-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0;
  }
  .tier-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: white;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 12px;
    gap: 12px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .tier-card.tier-1 {
    border: 1.5px solid #c8964a;
    background: linear-gradient(180deg, #fffdf5, #fff9ed);
  }
  .tier-card.tier-2 {
    border: 1.5px solid #b0a090;
    background: linear-gradient(180deg, #fafafa, #f5f3f0);
  }
  .tier-card.tier-3 {
    border: 1.5px solid #c4a882;
    background: linear-gradient(180deg, #fdfafa, #faf5ed);
  }
  .tier-photo-wrap {
    flex-shrink: 0;
    width: 28%;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 4;
    background: #f5f0e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  }
  .tier-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .tier-card:hover .tier-photo {
    transform: scale(1.06);
  }
  .tier-body {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr auto;
    gap: 2px 10px;
    padding: 3px 2px 2px;
  }
  .tier-rank {
    grid-column: 1;
    grid-row: 1;
    font-size: 17px;
    font-weight: 600;
    color: #3d2e24;
    letter-spacing: 0.5px;
    align-self: start;
  }
  .tier-prize-name {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
  }
  .prize-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 4px;
  }
  .prize-emoji {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1.3;
  }
  .prize-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .prize-title {
    font-size: 15px;
    font-weight: 600;
    color: #4a3728;
    line-height: 1.3;
  }
  .prize-price {
    font-size: 12px;
    font-weight: 400;
    color: #b0a090;
    line-height: 1.2;
    letter-spacing: 0.3px;
  }
  .tier-view-detail {
    grid-column: 1;
    grid-row: 3;
    font-size: 11px;
    font-weight: 400;
    color: #b52b1d;
    padding: 4px 14px;
    background: rgba(181, 43, 29, 0.07);
    border-radius: 6px;
    display: inline-block;
    justify-self: start;
    align-self: end;
    transition: background 0.2s, transform 0.2s;
    letter-spacing: 0.3px;
  }
  .tier-view-detail:active {
    background: rgba(181, 43, 29, 0.14);
    transform: scale(0.96);
  }
  .tier-current-holder {
    grid-column: 2;
    grid-row: 1 / 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 12px;
    background: #faf7f0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    border: 1px solid #ede6d8;
    min-width: 62px;
    padding: 4px;
  }
  .tier-holder-label {
    font-size: 10px;
    font-weight: 400;
    color: #b0a090;
    display: block;
    line-height: 1.3;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
  }
  .tier-holder-name {
    font-size: 12px;
    font-weight: 500;
    color: #8b6914;
    line-height: 1.3;
    letter-spacing: 0.2px;
  }
  .tier-holder-name {
    font-size: 12px;
  }
  .tier-current-holder {
    margin-top: 4px;
    padding: 3px 6px;
    font-size: 11px;
  }
  .tier-footer {
    padding: 8px 10px;
  }
  .tier-footer-title {
    font-size: 12px;
  }
  .tier-rules-list {
    font-size: 11px;
    padding-left: 14px;
    line-height: 1.7;
  }

  /* ===== 手机端：排序标签 ===== */
  .sort-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sort-tab {
    padding: 6px 10px;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 6px;
    border: 1px solid rgba(212, 201, 168, 0.4);
    background: transparent;
    color: #999;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.2px;
  }
  .sort-tab.active {
    background: linear-gradient(135deg, #4a3728, #3d2e24);
    color: #f0e6d3;
    border-color: #4a3728;
  }
  .sort-tab:active {
    transform: scale(0.96);
  }

  /* ===== 手机端：月份标签 ===== */
  .period-tabs {
    gap: 4px;
    margin-bottom: 12px;
  }
  .period-tab {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 14px;
  }
  .logo-img { max-height: 42px; }
}

@media (max-width: 400px) {
  .ranking-table { font-size: 12px; }
  .ranking-table thead th,
  .ranking-table tbody td { padding: 6px 4px; }
}

/* 评分规则栏 - 移动端适配 */
@media (max-width: 640px) {
  .ranking-rules-bar {
    font-size: 11px;
    padding: 10px 12px;
    line-height: 1.7;
  }
  .ranking-rules-bar .icon-item {
    font-size: 11px;
    padding: 1px 6px;
    margin: 1px;
  }
}

/* =============================================
   �ۺϵ÷�Ӣ����
   ============================================= */

.score-hero {
  text-align: center;
  padding: 20px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--paper), var(--gold-bg));
  border-radius: var(--radius-md);
  border: 1px solid rgba(184, 134, 11, 0.2);
}

.score-hero-value {
  font-size: 48px;
  font-weight: 800;
  color: var(--seal);
  line-height: 1;
  letter-spacing: 2px;
}

.score-hero-label {
  font-size: 13px;
  color: var(--ink-light);
  margin-top: 4px;
  letter-spacing: 1px;
}

.score-hero-detail {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 6px;
}

.stat-grade-card {
  border-left: 4px solid transparent !important;
}

.stat-grade-card.you-plus-bg {
  border-left-color: #ffd54f !important;
  background: linear-gradient(135deg, #fffbe6, var(--paper)) !important;
}

.stat-grade-card.you-bg {
  border-left-color: #66bb6a !important;
  background: linear-gradient(135deg, #e8f5e9, var(--paper)) !important;
}

.stat-grade-card.liang-bg {
  border-left-color: #42a5f5 !important;
  background: var(--paper) !important;
}

.stat-grade-card.zhong-bg {
  border-left-color: #ff7043 !important;
  background: var(--paper) !important;
}

.stat-grade-card .sub-label {
  font-size: 10px;
  color: var(--ink-faint);
  margin-top: 1px;
}

/* =============================================
   ���п�Ƭ���ƶ��ˣ�
   ============================================= */

.rank-card-rank {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 8px;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 201, 168, 0.3);
  transition: all var(--transition);
}

.rank-card-rank.top3 {
  background: var(--gold-bg) !important;
  border-color: rgba(184, 134, 11, 0.3) !important;
}

.rank-card-left {
  flex-shrink: 0;
}

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

.rank-card-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-deep);
}

.rank-card-stats {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--ink-light);
  flex-wrap: wrap;
}

.rank-card-prize-hint {
  font-size: 11px;
  color: var(--gold);
  margin-top: 2px;
  font-weight: 500;
}

.rank-card-score {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 18px;
  color: var(--seal);
  min-width: 36px;
  text-align: center;
}

/* =============================================
   ���ֹ���˵��
   ============================================= */

.score-legend {
  margin-top: 16px;
  padding: 14px;
  background: var(--paper);
  border-radius: var(--radius-md);
  border: 1px dashed rgba(212, 201, 168, 0.5);
}

.legend-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-light);
  margin-bottom: 8px;
}

.legend-items {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.legend-note {
  font-size: 12px;
  color: var(--ink-faint);
  font-style: italic;
}

/* 卡片hover光效（统一） */
.tier-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
  pointer-events: none;
}

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

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(184, 134, 11, 0); }
}

.tier-card.tier-occupied {
  animation: pulse-gold 2s infinite;
}

/* ������Ƭ��ǿ */
.rank-card-rank {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rank-card-rank:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.rank-card-rank.top3 {
  background: linear-gradient(135deg, #fffbe6, #fff8dc) !important;
  border-left: 4px solid var(--gold);
}



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

/* �÷����ֶ��� */
.rank-card-score {
  position: relative;
  font-size: 20px;
}



/* ͳ�Ʊ�ǩ��ʽ */
.rank-card-stats span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  background: rgba(212,201,168,0.2);
  border-radius: 10px;
  font-size: 10px;
}

/* ��Ʒ��ʾ */
.rank-card-prize-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--gold-bg);
  border: 1px solid rgba(184,134,11,0.3);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  margin-top: 6px;
}

/* �÷�Ӣ������ǿ */
.score-hero {
  position: relative;
  overflow: hidden;
}

.score-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 50%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.score-hero-value {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 4px rgba(181,43,29,0.2);
}

/* �ȼ�ͳ�ƿ�Ƭ��ǿ */
.stat-grade-card {
  position: relative;
}


/* �ύ��¼�÷ֱ�ǩ */
.sub-item .points {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--seal-glow);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--seal);
}

/* ������������ͣЧ�� */
.ranking-table tbody tr {
  transition: background 0.2s;
}

.ranking-table tbody tr:hover {
  background: rgba(212, 201, 168, 0.25) !important;
}

.ranking-table .highlight-row {
  position: relative;
}

.ranking-table .highlight-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gold);
}

/* ��Ӧʽ�Ż� */

/* =============================================
   ��Ʒ���鵯��
   ============================================= */

.prize-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.prize-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.prize-modal-content {
  position: relative;
  background: var(--paper-light);
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.prize-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.1);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.prize-modal-close:hover {
  background: var(--seal);
  color: white;
}

.prize-modal-header {
  padding: 24px 24px 16px;
  text-align: center;
  border-bottom: 1px solid rgba(212, 201, 168, 0.4);
}

.prize-modal-rank {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-deep);
  margin-bottom: 4px;
}

.prize-modal-value {
  display: inline-block;
  padding: 4px 16px;
  background: var(--seal-glow);
  color: var(--seal);
  font-size: 14px;
  font-weight: 600;
  border-radius: 20px;
}

.prize-modal-body {
  padding: 20px 24px;
}

.prize-modal-image {
  width: 100%;
  height: 200px;
  background: var(--paper);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prize-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prize-image-placeholder {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  text-align: center;
}

.prize-image-placeholder span {
  font-size: 48px;
  margin-bottom: 8px;
}

.prize-image-placeholder p {
  font-size: 13px;
  line-height: 1.6;
}

.prize-modal-desc h4 {
  font-size: 14px;
  color: var(--ink-light);
  margin-bottom: 8px;
  font-weight: 600;
}

.prize-modal-desc p {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.7;
  padding: 12px;
  background: var(--paper);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}

.prize-modal-footer {
  padding: 16px 24px 24px;
  text-align: center;
  border-top: 1px solid rgba(212, 201, 168, 0.3);
}

.prize-modal-footer p {
  font-size: 13px;
  color: var(--ink-light);
}

/* ����鿴�������?*/
.tier-view-detail {
  font-size: 11px;
  color: var(--seal);
  text-align: center;
  padding: 6px;
  margin: 8px 0;
  background: var(--seal-glow);
  border-radius: var(--radius-sm);
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.3s;
}

.tier-card:hover .tier-view-detail {
  opacity: 1;
  transform: translateY(0);
}

/* ��Ӧʽ���� */
@media (max-width: 480px) {
  .prize-modal {
    padding: 10px;
  }
  
  .prize-modal-content {
    max-height: 95vh;
  }
  
  .prize-modal-header {
    padding: 20px 16px 12px;
  }
  
  .prize-modal-body {
    padding: 16px;
  }
  
  .prize-modal-image {
    height: 160px;
  }
}

/* =============================================
   ��Ʒ�б�������ʽ�������ˣ�
   ============================================= */

.prize-list-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prize-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 201, 168, 0.4);
  cursor: pointer;
  transition: all 0.2s;
}

.prize-list-item:hover {
  border-color: var(--seal);
  box-shadow: 0 2px 8px rgba(181, 43, 29, 0.1);
  transform: translateX(4px);
}

.prize-list-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.prize-list-info {
  flex: 1;
  min-width: 0;
}

.prize-list-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-deep);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prize-list-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.prize-list-meta span {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink-light);
}

.prize-list-category {
  background: var(--seal-glow) !important;
  color: var(--seal) !important;
}

.prize-list-rank {
  background: var(--gold-bg) !important;
  color: var(--gold) !important;
}

.prize-list-stock {
  background: var(--paper) !important;
}

.prize-list-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.prize-list-actions .btn {
  padding: 6px 10px;
  font-size: 13px;
}

/* ������ʽ��ǿ */
#prizeFormCard textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(212, 201, 168, 0.5);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

#prizeFormCard textarea:focus {
  border-color: var(--seal);
  box-shadow: 0 0 0 3px var(--seal-glow);
  outline: none;
}

/* ������ʽ */
code {
  background: rgba(212, 201, 168, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--ink);
}

/* ��Ӧʽ��Ʒ�б� */
@media (max-width: 640px) {
  .prize-list-item {
    flex-wrap: wrap;
    padding: 10px 12px;
  }
  
  .prize-list-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
  }
  
  .prize-list-name {
    font-size: 14px;
  }
  
  .prize-list-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(212, 201, 168, 0.2);
  }
}

/* =============================================
   ��ѽ��������?   ============================================= */

/* ��������Ƭ��ʽ */
#progressAwardCard {
  border: 2px solid var(--jade);
  box-shadow: 0 4px 16px rgba(46, 125, 50, 0.15);
  overflow: hidden;
}

#progressAwardCard .card-header {
  background: linear-gradient(90deg, var(--jade), #4caf50);
  color: white;
  margin: -24px -24px 16px -24px;
  padding: 16px 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: none;
}

#progressAwardCard .card-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

#progressAwardCard .card-header::after { display: none; }

#progressAwardCard .card-title {
  color: white;
}

/* �����б��еĽ�������ʶ */
.rank-card-rank.progress-winner {
  border-left: 4px solid var(--jade);
  background: linear-gradient(90deg, rgba(46, 125, 50, 0.05), transparent);
}

.rank-card-progress-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--jade-light);
  color: var(--jade);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}

/* �����еĽ������� */
.ranking-table .progress-row {
  background: linear-gradient(90deg, rgba(46, 125, 50, 0.08), transparent) !important;
}

.ranking-table .progress-row td {
  border-bottom-color: rgba(46, 125, 50, 0.2);
}

/* ���������� */
.progress-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: linear-gradient(90deg, var(--jade), #4caf50);
  color: white;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
  white-space: nowrap;
}

.progress-badge-small {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  background: var(--jade-light);
  color: var(--jade);
  border-radius: 6px;
  font-size: 9px;
  font-weight: 500;
  margin-left: 4px;
  white-space: nowrap;
}



/* =============================================
   v3.0 ����������ʽ
   ============================================= */

/* �༶/����ǩ */
.group-badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  background: var(--blue-light);
  color: white;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  margin-left: 6px;
}

/* �༶ѡ�� */
.group-select {
  padding: 4px 8px;
  border: 1px solid rgba(212, 201, 168, 0.4);
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: white;
  font-family: inherit;
}

/* �����༭ */
.inline-edit {
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 13px;
  background: transparent;
  cursor: text;
  transition: all 0.2s;
  font-family: inherit;
  width: 80px;
}
.inline-edit:focus {
  border-color: rgba(212, 201, 168, 0.5);
  background: white;
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 201, 168, 0.2);
}

/* ͼ�갴ť */
.btn-icon-small {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s;
}
.btn-icon-small:hover {
  background: rgba(212, 201, 168, 0.3);
  transform: scale(1.1);
}

/* ˢ�°�ť */
.btn-refresh {
  padding: 6px 12px;
  border: 1px solid rgba(212, 201, 168, 0.4);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-light);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-refresh:hover {
  border-color: var(--seal);
  color: var(--seal);
}

/* ��Ʒѡ�����ÿ��� */
#awardStudent {
  min-width: 200px;
}

/* �ָ��� */
.section-divider {
  border: none;
  border-top: 1px solid rgba(212, 201, 168, 0.3);
  margin: 20px 0;
}

/* ��Ϣ��� */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: #e3f2fd;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--blue);
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 12px;
}
.info-banner.warning {
  background: #fff8e1;
  border-left-color: var(--gold);
}
.info-banner.success {
  background: #e8f5e9;
  border-left-color: var(--jade);
}

/* ����ͳ�� */
.stat-mini {
  padding: 6px 12px;
  background: var(--paper);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--ink-light);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stat-mini strong {
  color: var(--ink);
}

/* �ƶ������� */
@media (max-width: 640px) {
  .group-select {
    width: 100%;
  }
  .inline-edit {
    width: 100%;
  }
  #awardStudent {
    min-width: unset;
    width: 100%;
  }
}

/* ===== 当日最佳作业展示 ===== */
.daily-best-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--paper-deep);
  position: relative;
}
.daily-best-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 1px;
}
.daily-best-header-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff8e1, #ffe082);
  border-radius: 10px;
  font-size: 20px;
  flex-shrink: 0;
}
.daily-best-header-text {
  flex: 1;
}
.daily-best-header-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-deep);
  letter-spacing: 1px;
}
.daily-best-header-sub {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 1px;
}

.daily-best-scroll-hint {
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 10px;
  letter-spacing: 1px;
  animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.daily-best-scroll-hint span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: var(--paper);
  border-radius: 20px;
}

.daily-best-gallery {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 4px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--paper-deep) transparent;
}
.daily-best-gallery::-webkit-scrollbar { height: 4px; }
.daily-best-gallery::-webkit-scrollbar-track { background: transparent; }
.daily-best-gallery::-webkit-scrollbar-thumb {
  background: var(--paper-deep);
  border-radius: 4px;
}

.daily-best-item {
  flex: 0 0 auto;
  width: 220px;
  scroll-snap-align: start;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--paper-deep);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.daily-best-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* 当日最佳 - 名字旁的星星 */
.daily-best-star {
  display: inline-block;
  font-size: 14px;
  margin-right: 3px;
  animation: starFloat 2.5s ease-in-out infinite;
  filter: drop-shadow(0 1px 2px rgba(255,193,7,0.4));
}
@keyframes starFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(5deg); }
}

.daily-best-item .daily-best-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
}
.daily-best-item .daily-best-photo-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(0,0,0,0.15));
  pointer-events: none;
}
.daily-best-item .daily-best-photo-wrap .empty-icon {
  font-size: 48px;
  opacity: 0.2;
}
.daily-best-item .daily-best-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.daily-best-item:hover .daily-best-photo {
  transform: scale(1.05);
}

.daily-best-item .daily-best-meta {
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, #fff, #fdfaf5);
  border-top: 1px solid rgba(212,201,168,0.3);
}
.daily-best-item .daily-best-meta .student {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-deep);
}
.daily-best-item .daily-best-meta .student::before {
  content: none;
}
.daily-best-item .daily-best-meta .date {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 2px;
}

.daily-best-item .daily-best-meta .notes {
  font-family: "STKaiti", "KaiTi", "楷体", "Noto Serif SC", serif;
  font-size: 13px;
  color: var(--ink);
  margin-top: 6px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.5px;
  line-height: 1.5;
  padding: 6px 8px;
  background: rgba(242,234,216,0.3);
  border-radius: 6px;
  border-left: 2px solid var(--gold-light);
}

/* 无图时空状态 */
.daily-best-empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--ink-faint);
}
.daily-best-empty .icon {
  font-size: 48px;
  margin-bottom: 8px;
  opacity: 0.3;
}

/* ===== 灯箱（查看大图） ===== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox-overlay.active {
  display: flex;
}
.lightbox-overlay .lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-overlay .lightbox-close {
  position: absolute;
  top: -32px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  z-index: 1;
}
.lightbox-overlay .lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  object-fit: contain;
}
.lightbox-overlay .lightbox-caption {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}
.lightbox-overlay .lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.lightbox-overlay .lightbox-nav button {
  pointer-events: auto;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay .lightbox-nav button:hover {
  background: rgba(255,255,255,0.3);
}

@media (max-width: 640px) {
  .daily-best-item {
    width: 175px;
  }
  .daily-best-gallery {
    gap: 10px;
    padding: 4px 0 8px;
  }
  .daily-best-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }
  .daily-best-header-icon {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  .daily-best-header-title {
    font-size: 14px;
  }
  .daily-best-header-sub {
    font-size: 10px;
  }
  .daily-best-item .daily-best-meta .notes {
    font-size: 12px;
    padding: 4px 6px;
  }
  .daily-best-item .daily-best-meta .student {
    font-size: 13px;
  }
  .daily-best-scroll-hint {
    font-size: 11px;
    margin-bottom: 8px;
  }
  .lightbox-overlay .lightbox-img {
    max-height: 65vh;
  }
}

/* ===== 最佳进步奖 ===== */
.progress-card .row {
  display: grid;
  grid-template-columns: 32px 1fr 85px 48px;
  gap: 6px;
  align-items: center;
  padding: 10px 14px;
  margin-bottom: 6px;
  background: var(--paper);
  border-radius: var(--radius-md);
  border: 1px solid rgba(212,201,168,0.3);
}
.progress-card .row.winner {
  background: linear-gradient(135deg,#fff8e1,#ffecb3);
  border-color: #ffa000;
  padding-bottom: 8px;
  grid-template-rows: auto auto;
}
.progress-card .cell-medal { font-size:24px; text-align:center; }
.progress-card .cell-name { font-weight:600; font-size:15px; color:var(--ink-deep); }
.progress-card .cell-change { font-size:12px; color:var(--ink-light); text-align:right; }
.progress-card .cell-score { font-size:18px; font-weight:700; color:var(--jade); text-align:right; }
.progress-card .prize-line {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 4px;
  padding: 3px 12px;
  background: linear-gradient(135deg,#fff3e0,#ffe0b2);
  border-radius: 20px;
  border: 1px solid #ff8f00;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-deep);
}
.progress-card .prize-line img {
  width: 20px; height: 26px; object-fit: cover;
  border-radius: 3px; border: 1px solid #ff8f00;
}

@media (max-width: 640px) {
  .progress-card .row { grid-template-columns: 28px 1fr 70px 42px; gap: 4px; padding: 8px 10px; }
  .progress-card .row.winner { padding-bottom: 6px; }
  .progress-card .cell-change { font-size:11px; }
  .progress-card .cell-score { font-size:16px; }
}




/* =============================================
   当日最佳记录列表（学习报告内）
   ============================================= */

.daily-best-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 6px 0;
}

.daily-best-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: linear-gradient(90deg, #e8f5e9, white);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.daily-best-date {
  color: var(--ink);
  min-width: 85px;
  font-weight: 500;
}

.daily-best-notes {
  color: var(--ink-light);
  flex: 1;
  font-size: 12px;
}

.daily-best-points {
  color: var(--jade);
  font-weight: 600;
  font-size: 12px;
}

.daily-best-total {
  text-align: right;
  font-size: 12px;
  color: var(--ink-light);
  padding-top: 4px;
  border-top: 1px dashed var(--paper-deep);
  margin-top: 4px;
}

.card-section {
  margin-top: 16px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-deep);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--paper-deep);
}

@media (max-width: 480px) {
  .daily-best-item-row {
    font-size: 12px;
    padding: 5px 8px;
  }
  .daily-best-date { min-width: 72px; }
}

/* 当日最佳统计卡片 */
.stat-dailybest .value.gold {
  color: #b8860b;
  font-weight: 700;
}
.stat-dailybest .sub-label {
  color: #b8860b;
  font-weight: 500;
}

.ranking-rules-bar {
  font-size: 12px;
  color: var(--ink-light);
  padding: 12px 16px;
  background: linear-gradient(135deg, #fdfaf5, var(--paper));
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  line-height: 1.8;
  border-left: 4px solid var(--seal);
  border-top: 1px solid rgba(212,201,168,0.3);
  border-right: 1px solid rgba(212,201,168,0.3);
  border-bottom: 1px solid rgba(212,201,168,0.3);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.ranking-rules-bar strong {
  color: var(--ink-deep);
}
.ranking-rules-bar .icon-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
  margin: 0 2px;
  white-space: nowrap;
}
.ranking-rules-bar .sep {
  display: inline-block;
  margin: 0 6px;
  color: rgba(212,201,168,0.6);
}

@media (min-width: 641px) {
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 12px 0;
}

.tier-card {
  position: relative;
  overflow: hidden;
  background: white;
  border-radius: 14px;
  padding: 20px;
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tier-card.tier-1 {
  border: 1.5px solid #c8964a;
  background: linear-gradient(180deg, #fffdf5, #fff9ed);
  box-shadow: 0 2px 12px rgba(200, 150, 74, 0.10);
}
.tier-card.tier-2 {
  border: 1.5px solid #b0a090;
  background: linear-gradient(180deg, #fafafa, #f5f3f0);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.tier-card.tier-3 {
  border: 1.5px solid #c4a882;
  background: linear-gradient(180deg, #fdfafa, #faf5ed);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.tier-photo-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.tier-photo {
  width: 130px;
  height: 173px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid rgba(212, 201, 168, 0.5);
  background: #f5f0e8;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.tier-card:hover .tier-photo {
  transform: scale(1.04);
}

.tier-body {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tier-rank {
  font-size: 18px;
  font-weight: 600;
  color: #3d2e24;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.tier-prize-name {
  display: flex;
  justify-content: center;
}

.prize-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.prize-emoji {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1.4;
}

.prize-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prize-title {
  font-size: 15px;
  font-weight: 600;
  color: #4a3728;
  line-height: 1.3;
  text-align: left;
}

.prize-price {
  font-size: 12px;
  font-weight: 400;
  color: #b0a090;
  line-height: 1.2;
  letter-spacing: 0.3px;
  text-align: left;
}

.tier-view-detail {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  color: #b52b1d;
  padding: 4px 14px;
  background: rgba(181, 43, 29, 0.07);
  border-radius: 6px;
  margin: 4px auto 0;
  transition: background 0.2s, transform 0.2s;
  letter-spacing: 0.3px;
}
.tier-card:hover .tier-view-detail {
  opacity: 1;
  transform: translateY(0);
  background: rgba(181, 43, 29, 0.10);
}

.tier-current-holder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 6px;
  padding: 8px 10px;
  background: #faf7f0;
  border-radius: 10px;
  border: 1px solid #ede6d8;
}

.tier-holder-label {
  font-size: 11px;
  font-weight: 400;
  color: #b0a090;
  display: block;
  line-height: 1.3;
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}

.tier-holder-name {
  font-size: 13px;
  font-weight: 500;
  color: #8b6914;
  line-height: 1.3;
  letter-spacing: 0.2px;
}

/* ===== 管理后台 · 手机适配 ===== */
@media (max-width: 640px) {
  /* ---- 全局布局 ---- */
  body.admin-page { overflow-x: hidden; }
  .admin-layout { padding: 4px 6px 16px; max-width: 100vw; overflow-x: hidden; }
  .admin-header { padding: 6px 8px; }
  .admin-header h1 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw; }
  .admin-logo .logo-img-sm { max-height: 30px !important; }
  .btn-logout { padding: 4px 10px; font-size: 12px; min-height: 36px; }

  /* ---- 导航栏（手机端横向滚动） ---- */
  .nav-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 2px; padding: 4px; }

  /* ---- 卡片 ---- */
  .card { padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; }
  .card-header { padding: 0 0 6px; font-size: 13px; min-height: 32px; }
  .card-icon { font-size: 14px; }

  /* ---- 表单 ---- */
  .admin-form { padding: 8px; gap: 6px; }
  .admin-form .field { min-width: 100% !important; width: 100% !important; }
  .admin-form .field label { font-size: 12px; margin-bottom: 2px; }
  .admin-form input, .admin-form select, .admin-form textarea {
    font-size: 14px; padding: 8px 10px; min-height: 38px;
  }
  .admin-form textarea { min-height: 60px; }
  .card .field { min-width: 0 !important; width: 100% !important; }

  /* ---- 按钮 ---- */
  .btn, .btn-primary, .btn-jade, .btn-ghost, .btn-danger {
    min-height: 40px; padding: 8px 14px; font-size: 13px;
  }
  button.btn-sm { min-height: 34px; padding: 6px 10px; font-size: 12px; }

  /* ---- 概览统计 ---- */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 5px; }
  .stat-item { padding: 8px; }
  .stat-item .value { font-size: 20px; }
  .stat-item .label { font-size: 11px; }

  /* ---- 等级分布标签 ---- */
  #ovGradeDist { gap: 6px !important; padding: 4px 0 !important; }
  .grade-tag { font-size: 11px !important; padding: 2px 8px !important; border-radius: 4px; }

  /* ---- 最近提交列表 ---- */
  .sub-item { padding: 6px 8px; font-size: 12px; }

  /* ---- 表格 ---- */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0; }
  .admin-table { font-size: 12px; min-width: 450px; }
  .admin-table th, .admin-table td { padding: 5px 3px; }
  .admin-table th { font-size: 11px; }

  /* ---- 学生列表 ---- */
  .student-item { padding: 6px 8px; font-size: 12px; }
  .student-item .badge { font-size: 10px; padding: 1px 6px; }

  /* ---- 勾选框网格 ---- */
  .checkbox-grid { grid-template-columns: 1fr 1fr; gap: 3px; }
  .checkbox-grid label {
    font-size: 13px; padding: 8px 6px; min-height: 38px;
    display: flex; align-items: center; gap: 4px;
  }
  .checkbox-grid input[type="checkbox"] { width: 18px; height: 18px; }

  /* ---- 奖品管理 ---- */
  .prize-list-item { flex-wrap: wrap; padding: 6px; gap: 4px; font-size: 12px; }
  .prize-list-item .btn { min-height: 30px; padding: 4px 8px; font-size: 11px; }

  /* ---- 当日最佳 ---- */
  #dbListContent { font-size: 12px; }
  #dbListContent > div > div { flex-wrap: wrap; padding: 6px 8px !important; gap: 6px; }
  #dbListContent img { width: 36px !important; height: 48px !important; }
  #dbListContent .btn { min-height: 30px; padding: 4px 8px; font-size: 11px; }

  /* ---- 获奖者 ---- */
  .winner-item { flex-wrap: wrap; gap: 4px; padding: 6px 8px; font-size: 12px; }
  .winner-rank { font-size: 11px; }
  .winner-name { font-size: 13px; }

  /* ---- 进步奖 ---- */
  #progressAwardContent > div:first-child { flex-direction: column; }

  /* ---- 预览排名 ---- */
  .admin-page .preview-ranking { grid-template-columns: 1fr; }
  .ranking-rules-bar { font-size: 11px; padding: 8px 10px; }

  /* ---- 登录页 ---- */
  .login-card { padding: 20px 16px; margin: 16px 10px; width: auto; max-width: 340px; }
  .login-card h2 { font-size: 16px; }
  .login-btn { min-height: 44px; font-size: 15px; }
  .login-container { padding: 0; }

  /* ---- 设置 ---- */
  #sysInfo p { font-size: 12px; }
  #auditLogContent { font-size: 12px; }
  #backupContent { font-size: 12px; }
  #backupContent button, #backupContent .btn { min-height: 30px; padding: 4px 8px; font-size: 11px; }

  /* ---- 其他 ---- */
  .section-title { font-size: 13px; }
  .admin-form input[type="month"], .admin-form input[type="date"] { font-size: 14px; }
  #prizePhotoImg { max-width: 100% !important; }
  input, select, textarea { border-radius: 6px; }
}

/* Visit dashboard responsive */
.visits-dashboard { max-width: 100%; }
.visits-chart-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px; }
@media (max-width: 640px) {
  .visits-chart-grid { grid-template-columns:1fr; }
  .stat-value { font-size:24px; }
}
.clickable { cursor:pointer; transition:transform 0.15s; }
.clickable:hover { transform:scale(1.03); }


/* ===== Visit dashboard enhancements ===== */
.stat-card {
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  border: 1px solid rgba(212,201,168,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink-deep);
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--ink-light);
  margin-top: 4px;
  line-height: 1.4;
}
.clickable {
  cursor: pointer;
}
.clickable:hover {
  transform: scale(1.03);
}

/* Online panel */
#onlineUsersPanel {
  transition: all 0.2s ease;
}

/* Visit log table */
#visitsLogList {
  max-height: 500px;
  overflow-y: auto;
}

/* Responsive */
@media (max-width: 640px) {
  .stat-card .stat-value { font-size: 22px; }
  .stat-card { padding: 10px 6px; }
  #visitsLogList { max-height: 350px; font-size: 11px; }
}
