/* ===== Ameme咩咩 应援站 全局样式（亮色主题） ===== */
:root {
  --primary: #e34f93;
  --primary-light: #f07ab2;
  --primary-dark: #c53c7c;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --gold: #c2871f;
  --bg-deep: #fdf3e7;
  --bg-card: rgba(255, 248, 239, 0.88);
  --bg-card-solid: #ffffff;
  --border-glow: rgba(227, 79, 147, 0.25);
  --text-main: #1f2430;
  --text-sub: #4b5165;
  --text-dim: #8a90a2;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(35, 45, 70, 0.07);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-playful: "Yuanti SC", "STYuanti", "YouYuan", "幼圆", "Comic Sans MS", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html { scroll-behavior: smooth; }

/* ===== 文字左侧小图标（logo 图片替换 emoji） ===== */
.nav-links a img.n-ico { width: 18px; height: 18px; object-fit: contain; vertical-align: -2px; margin-right: 5px; }
.pt-badge img { width: 100%; height: 100%; object-fit: contain; }
.section-title .t-icon img { width: 100%; height: 100%; object-fit: contain; }
.info-item .i-icon img { width: 24px; height: 24px; object-fit: contain; }
.btn img.b-ico { width: 20px; height: 20px; object-fit: contain; }
.hero-sub img.hero-cat { width: 20px; height: 20px; object-fit: contain; vertical-align: -3px; margin-right: 6px; display: inline; }
.sidebar .sb-item img.sb-ico { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }

body {
  font-family: var(--font);
  color: var(--text-main);
  background:
    radial-gradient(1000px 520px at 88% -12%, rgba(247, 158, 74, 0.14), transparent 60%),
    radial-gradient(900px 500px at 4% 8%, rgba(247, 158, 74, 0.09), transparent 60%),
    var(--bg-deep);
  min-height: 100vh;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* 前台文字风格：整体俏皮（后台除外） */
body[data-page="home"],
body[data-page="songs"],
body[data-page="schedule"],
body[data-page="welfare"],
body[data-page="messages"] {
  font-family: var(--font-playful);
}

/* 后台保持原底色 */
body[data-page="admin"] { background: #fdf3e7; }

/* 全站静态背景（后台可自定义上传一张图） */
body.has-page-bg {
  background:
    linear-gradient(rgba(255, 243, 230, 0.88), rgba(255, 243, 230, 0.94)),
    var(--page-bg, none) center/cover no-repeat fixed;
}
.stars { display: none; }

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  height: 64px;
  background: rgba(255, 243, 230, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #ecedf4;
  box-shadow: 0 2px 14px rgba(35, 45, 70, 0.05);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 16px;
  color: var(--text-sub);
  text-decoration: none;
  font-size: 16px;
  border-radius: 999px;
  transition: all 0.22s;
  position: relative;
}
.nav-links a:hover { color: #b4621e; background: rgba(247, 158, 74, 0.14); }
.nav-links a.active {
  color: #b4621e;
  background: rgba(247, 158, 74, 0.22);
  box-shadow: none;
}
.nav-admin-link a {
  color: var(--gold);
  border: 1px solid rgba(194, 135, 31, 0.35);
  background: rgba(194, 135, 31, 0.07);
  margin-left: 8px;
}
.nav-admin-link a:hover { background: rgba(194, 135, 31, 0.14); color: var(--gold); }

.nav-toggle {
  display: none;
  background: none; border: none;
  color: var(--text-main);
  font-size: 26px;
  cursor: pointer;
  padding: 4px 8px;
}

/* ===== 布局容器 ===== */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 84px 20px 60px;
}

.page-title {
  text-align: center;
  margin-bottom: 34px;
}
.page-title .pt-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.page-title .pt-badge {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.page-title h1 {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 1px;
}
.page-title p { color: var(--text-dim); margin-top: 6px; font-size: 15px; }

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card);
  border: 1px solid #eceef5;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(227, 79, 147, 0.22);
  box-shadow: 0 14px 34px rgba(35, 45, 70, 0.09);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text-main);
}
.section-title .t-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.section-title .t-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, #e6e9f2, transparent);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.22s;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 6px 18px rgba(227, 79, 147, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(227, 79, 147, 0.36); }
.btn-accent {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.26);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99, 102, 241, 0.34); }
.btn-gold {
  background: linear-gradient(135deg, #e2ad4b, #c2871f);
  color: #fff;
  box-shadow: 0 6px 18px rgba(194, 135, 31, 0.25);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(194, 135, 31, 0.33); }
.btn-ghost {
  background: #f3f5f9;
  color: var(--text-sub);
  border: 1px solid #e2e6ef;
}
.btn-ghost:hover { background: #eaedf4; color: var(--text-main); }
.btn-sm { padding: 6px 14px; font-size: 14px; }
.btn-danger {
  background: rgba(225, 29, 72, 0.08);
  color: #d81b4a;
  border: 1px solid rgba(225, 29, 72, 0.28);
}
.btn-danger:hover { background: rgba(225, 29, 72, 0.16); color: #b0123b; }

/* ===== 轮播 ===== */
.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-slide { min-width: 100%; }
.carousel-slide img, .carousel-slide video {
  width: 100%;
  display: block;
  object-fit: cover;
}
.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.carousel-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}
.carousel-dots button.active {
  background: var(--primary);
  width: 22px;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(227, 79, 147, 0.5);
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-main);
  font-size: 17px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: all 0.3s;
  z-index: 5;
  box-shadow: 0 2px 10px rgba(35, 45, 70, 0.15);
}
.carousel:hover .carousel-arrow { opacity: 1; }
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.carousel-arrow:hover { background: #fff; color: var(--primary); }

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
}
.form-group label .required { color: var(--primary); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #dfe3ec;
  background: #fbfbfd;
  color: var(--text-main);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(227, 79, 147, 0.12);
  background: #fff;
}
.textarea { resize: vertical; min-height: 90px; }
.select option { background: #fff; color: var(--text-main); }
.input::placeholder, .textarea::placeholder { color: #a7adbb; }

.radio-group { display: flex; gap: 14px; flex-wrap: wrap; }
.radio-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #e2e6ef;
  background: #f7f8fc;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.22s;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.radio-pill img { width: 18px; height: 18px; object-fit: contain; display: block; }
.radio-pill:hover { border-color: var(--primary); color: var(--primary-dark); }
.radio-pill.selected {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(227, 79, 147, 0.28);
}

/* ===== 消息提示 ===== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(35, 45, 70, 0.18);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: linear-gradient(135deg, #22c55e, #16a34a); }
.toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); }
.toast.info { background: linear-gradient(135deg, #6366f1, #4f46e5); }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(24, 28, 42, 0.42);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px;
  overflow-y: auto;
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border: 1px solid #eceef5;
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(35, 45, 70, 0.2);
  padding: 28px;
  animation: modalIn 0.28s ease;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
@keyframes modalIn {
  from { transform: translateY(20px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-close {
  background: none; border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text-main); }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-sub);
  font-weight: 600;
  border-bottom: 1px solid #eef0f6;
  white-space: nowrap;
  background: #fafbfd;
}
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f3f8;
  vertical-align: middle;
}
.table tr:hover td { background: #fafbfe; }
.table .thumb {
  width: 52px; height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f5f9;
}
.table .actions { display: flex; gap: 8px; white-space: nowrap; }

/* ===== 后台表格分页 ===== */
.table-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}
.pg-btn-a {
  min-width: 32px; height: 30px; padding: 0 8px;
  border: 1px solid #e2e6ef; border-radius: 8px;
  background: #fff; color: var(--text-sub);
  font-size: 14px; cursor: pointer; transition: all .18s; user-select: none;
}
.pg-btn-a:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pg-btn-a.pg-cur-a { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pg-btn-a:disabled { opacity: .4; cursor: not-allowed; }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}
.empty-state .empty-icon { font-size: 42px; margin-bottom: 10px; }
.empty-state p { font-size: 15px; }

/* ===== 页脚 ===== */
.footer {
  text-align: center;
  padding: 26px 16px 30px;
  color: var(--text-dim);
  font-size: 14px;
  border-top: 1px solid #eef0f6;
  margin-top: 20px;
}
.footer .heart { color: var(--primary); }

/* ===== 徽章 ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-pink { background: rgba(227, 79, 147, 0.10); color: var(--primary-dark); }
.badge-purple { background: rgba(99, 102, 241, 0.10); color: #4f46e5; }
.badge-gold { background: rgba(194, 135, 31, 0.12); color: #9a6a12; }
.badge-green { background: rgba(16, 185, 129, 0.12); color: #047857; }

/* ===== 尊重系统减弱动效设置 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .navbar { padding: 0 8px; }
  .nav-toggle { display: none; }
  .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    justify-content: safe center;
    gap: 0;
    width: 100%;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links li { flex: 0 0 auto; }
  .nav-links a { padding: 7px 6px; font-size: 13px; white-space: nowrap; border-radius: 999px; }
  .nav-links a img.n-ico { width: 15px; height: 15px; margin-right: 4px; vertical-align: -2px; }
  .nav-admin-link a { margin-left: 0; margin-top: 0; text-align: center; }
  .container { padding: 76px 14px 40px; }
  .page-title h1 { font-size: 26px; }
  .card { padding: 18px; }
  .section-title { font-size: 19px; }
  .name-story { font-size: 16px; }
  .msg-content, .activity-body .a-desc, .welfare-activity .wa-desc { font-size: 15px; }
}
@media (min-width: 400px) and (max-width: 860px) {
  .nav-links a { padding: 8px 8px; font-size: 14px; }
}
