/* ============================================================
   星河同窗录 · 全局样式
   深空星空氛围：暗色半透明磨砂面板、蓝紫银白柔和光晕
   ============================================================ */
:root {
  --bg: #05060f;
  --panel: rgba(16, 20, 45, .55);
  --border: rgba(140, 160, 255, .18);
  --text: #dfe6ff;
  --muted: #8b93c9;
  --accent: #8fa8ff;
  --gold: #ffd27a;
  --green: #7ce3a1;
  --red: #ff8f9f;
  --yellow: #ffe08a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(1200px 800px at 70% -10%, #1a1f4d 0%, transparent 60%),
    radial-gradient(900px 700px at 10% 110%, #241a4d 0%, transparent 55%),
    var(--bg);
}

a { color: var(--accent); }

/* ---------------- 顶部导航 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
.brand { font-weight: 700; letter-spacing: 1px; color: var(--text); text-decoration: none; }
.nav-links a { margin-left: 18px; font-size: 14px; color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.user-chip { margin-left: 18px; font-size: 13px; color: var(--accent); }

/* ---------------- 页面容器 ---------------- */
.page { max-width: 1100px; margin: 0 auto; padding: 24px 18px 60px; }
.galaxy-page { max-width: none; padding: 0; }
.login-page { display: flex; align-items: center; justify-content: center; min-height: 88vh; }
.login-card { width: 400px; padding: 30px 30px 22px; }

.page-title { margin: 0 0 6px; font-size: 20px; letter-spacing: 1px; }
.panel-title { margin: 0 0 12px; font-size: 16px; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 12px; }
.spacer { flex: 1; }

/* ---------------- 磨砂玻璃组件 ---------------- */
.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 24px rgba(90, 110, 255, .12);
}
.card { padding: 20px; }
.center-card { max-width: 480px; margin: 10vh auto; text-align: center; }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  background: rgba(10, 14, 35, .6);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
.alert-error {
  margin-bottom: 14px;
  padding: 10px 14px;
  color: #ffc2cd;
  background: rgba(255, 100, 120, .12);
  border: 1px solid rgba(255, 120, 140, .4);
  border-radius: 10px;
}

/* ---------------- 按钮 / 徽标 ---------------- */
.btn {
  display: inline-block;
  padding: 10px 18px;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #3a4a9e, #5a6cd8);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost { color: var(--muted); background: transparent; }
.btn.danger { background: linear-gradient(135deg, #8e3a4e, #c05a6a); }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  border: 1px solid;
  border-radius: 999px;
}
.badge.pending { color: var(--yellow); border-color: rgba(255, 224, 138, .5); background: rgba(255, 224, 138, .08); }
.badge.approved { color: var(--green); border-color: rgba(124, 227, 161, .5); background: rgba(124, 227, 161, .08); }
.badge.rejected { color: var(--red); border-color: rgba(255, 143, 159, .5); background: rgba(255, 143, 159, .08); }
.badge.public { color: var(--accent); border-color: rgba(143, 168, 255, .5); background: rgba(143, 168, 255, .08); }

/* ---------------- 素材网格 ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.thumb { overflow: hidden; padding: 10px; position: relative; }
.card-check {
  position: absolute; top: 14px; left: 14px; z-index: 5;
  background: rgba(15, 20, 50, 0.72); border-radius: 6px;
  padding: 4px 6px; cursor: pointer; display: flex; align-items: center;
  backdrop-filter: blur(4px);
}
.card-check input { cursor: pointer; }
.thumb-media { position: relative; height: 140px; border-radius: 10px; overflow: hidden; background: rgba(10, 14, 35, .6); }
.thumb-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-info { margin-top: 10px; }
.thumb-desc { font-size: 13px; }
.video-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 140px;
  font-size: 12px;
  background: linear-gradient(135deg, #1b2350, #31235a);
  border-radius: 10px;
}
.play-icon { font-size: 26px; color: var(--accent); }

/* ---------------- 弹窗（星空磨砂 UI 统一规范） ---------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 4, 12, .55);
  backdrop-filter: blur(10px);
  animation: fadeIn .2s ease;
}
.modal-card {
  position: relative;
  width: min(640px, 92vw);
  max-height: 84vh;
  overflow: auto;
  padding: 22px 24px;
  color: var(--text);
  background: linear-gradient(160deg, rgba(20, 26, 60, .88), rgba(34, 24, 70, .82));
  border: 1px solid rgba(150, 170, 255, .25);
  border-radius: 18px;
  box-shadow: 0 0 40px rgba(110, 130, 255, .25), inset 0 0 60px rgba(120, 140, 255, .06);
  animation: pop .22s ease;
}
.modal-card h3 { margin: 0 0 12px; font-size: 18px; }
.modal-card img { display: block; max-width: 100%; }
.modal-close {
  position: absolute;
  top: 10px; right: 14px;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
}
.role-tag { font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid; }
.role-tag.counselor { color: var(--gold); border-color: rgba(255, 210, 122, .5); }
.role-tag.committee { color: #9fd8ff; border-color: rgba(159, 216, 255, .5); }
.role-tag.student { color: #cfe3ff; border-color: rgba(207, 227, 255, .4); }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.gallery-grid img { width: 100%; height: 110px; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.gallery-grid img:hover { box-shadow: 0 0 14px rgba(143, 168, 255, .6); }

/* ---------------- 时间线（成长档案） ---------------- */
.resume-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .resume-layout { grid-template-columns: 1fr; } }

.timeline { position: relative; margin-left: 10px; padding-left: 26px; border-left: 2px solid rgba(140, 160, 255, .25); }
.tl-item { position: relative; margin-bottom: 22px; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -33px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.tl-date { font-size: 12px; color: var(--muted); }
.tl-title { margin-top: 2px; font-size: 15px; font-weight: 600; }
.tl-content { margin-top: 6px; font-size: 13px; line-height: 1.7; }
.tl-image { margin-top: 10px; }
.tl-image img { max-width: 100%; max-height: 300px; border-radius: 12px; border: 1px solid var(--border); }

.module-block { margin-bottom: 20px; }
.link-item { margin-bottom: 14px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; }

/* ---------------- 提示浮层 ---------------- */
.toast {
  position: fixed;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 10px 18px;
  font-size: 14px;
  background: rgba(20, 26, 60, .92);
  border: 1px solid var(--border);
  border-radius: 12px;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------------- 页脚标语 ---------------- */
.site-footer {
  text-align: center;
  padding: 18px 16px 26px;
  margin-top: 20px;
}
.site-footer .tagline {
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--muted);
  margin: 0;
  position: relative;
  display: inline-block;
  padding: 0 22px;
}
.site-footer .tagline::before,
.site-footer .tagline::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.site-footer .tagline::before { left: -28px; }
.site-footer .tagline::after { right: -28px; }

/* 标语通用样式（登录页/星河标题下使用） */
.tagline {
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(143, 168, 255, .45);
  margin: 6px 0;
}

/* ---------------- 账号管理页 ---------------- */
.alert-ok {
  margin-bottom: 14px;
  padding: 10px 14px;
  color: #b6f5cc;
  background: rgba(124, 227, 161, .12);
  border: 1px solid rgba(124, 227, 161, .4);
  border-radius: 10px;
}
.btn-mini {
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text);
  background: rgba(120, 60, 80, .4);
  border: 1px solid rgba(255, 140, 160, .4);
  border-radius: 8px;
  cursor: pointer;
}
.btn-mini:hover { background: rgba(160, 70, 90, .5); }
.user-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.user-table th, .user-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(140, 160, 255, .15);
  font-size: 14px;
}
.user-table th {
  font-size: 12px;
  color: var(--muted);
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.user-table tr:hover td { background: rgba(140, 160, 255, .05); }
.tag-ok {
  color: #b6f5cc;
  border: 1px solid rgba(124, 227, 161, .5);
  background: rgba(124, 227, 161, .08);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}
.tag-off {
  color: #ffc2cd;
  border: 1px solid rgba(255, 140, 160, .5);
  background: rgba(255, 140, 160, .08);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}
.filter-on, .filter-off {
  display: inline-block;
  padding: 3px 12px;
  font-size: 13px;
  border-radius: 999px;
  text-decoration: none;
  margin-right: 4px;
}
.filter-on {
  color: #fff;
  background: rgba(90, 110, 200, .5);
  border: 1px solid rgba(143, 168, 255, .5);
}
.filter-off {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
}
.filter-off:hover { color: var(--text); }

/* 防误删提示框 */
.hint-box {
  padding: 10px 14px;
  font-size: 13px;
  color: #e0d4a8;
  background: rgba(200, 170, 80, .1);
  border: 1px solid rgba(200, 170, 80, .3);
  border-radius: 10px;
  line-height: 1.6;
}
