/* ==========================================================================
   砂狼白子服务器社区 — Shiroko Community
   浅蓝活力主题
   ========================================================================== */

:root {
  --bg: #eaf4ff;
  --surface: #ffffff;
  --surface-soft: #f4f9ff;
  --border: #dbe8f8;
  --border-strong: #c6dcf4;
  --text: #17293f;
  --text-2: #5c7794;
  --text-3: #93a9c2;
  --primary: #2f7ee6;
  --primary-dark: #1f66c9;
  --primary-soft: #e4efff;
  --danger: #e5484d;
  --danger-soft: #fdeceb;
  --green: #1aa564;
  --shadow-xs: 0 1px 2px rgba(23, 58, 102, 0.06);
  --shadow-sm: 0 2px 10px rgba(23, 58, 102, 0.08);
  --shadow-md: 0 8px 24px rgba(23, 58, 102, 0.12);
  --shadow-lg: 0 18px 44px rgba(23, 58, 102, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: linear-gradient(180deg, #eff7ff 0%, #dbeafb 55%, #e9f3fd 100%);
  background-repeat: no-repeat;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #bfdcff; color: #16283f; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #e6f1fd; }
::-webkit-scrollbar-thumb {
  background: #b9d5f2;
  border-radius: 6px;
  border: 2px solid #e6f1fd;
}
::-webkit-scrollbar-thumb:hover { background: #9cc3ec; }

/* ---------- Preloader ---------- */
#preloader { transition: opacity 0.5s ease, visibility 0.5s ease; }
#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader-logo { animation: logoPulse 1.4s ease-in-out infinite; }
@keyframes logoPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%      { transform: scale(1.07); opacity: 1; }
}

/* ---------- Navbar ---------- */
.navbar-glass {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.navbar-glass.scrolled {
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(23, 58, 102, 0.09);
}
.logo-badge { transition: border-color 0.25s ease, transform 0.25s ease; }
.logo-badge img { display: block; width: 100%; height: 100%; object-fit: cover; }
a:hover > .logo-badge { transform: translateY(-1px); }

.nav-item {
  display: inline-block;
  padding: 8px 14px;
  font-weight: 500;
  font-size: 15px;
  color: var(--text-2);
  border-radius: 10px;
  transition: color 0.22s ease, background 0.22s ease;
}
.nav-item:hover { color: var(--primary); background: var(--primary-soft); }
.nav-item.active { color: var(--primary); background: var(--primary-soft); font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  transition: transform 0.22s var(--ease), box-shadow 0.25s ease,
              background 0.25s ease, border-color 0.25s ease;
}
.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #3b8bee, #2f7ee6);
  box-shadow: 0 6px 18px rgba(47, 126, 230, 0.28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(47, 126, 230, 0.4);
}
.btn-ghost {
  color: var(--primary);
  background: #ffffff;
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* ---------- Hero ---------- */
.hero { position: relative; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-2);
  font-weight: 500;
}
.chip::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
}

.stat-cell {
  padding: 16px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  text-align: center;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease;
}
.stat-cell:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.stat-num {
  display: block;
  font-size: 26px; font-weight: 900;
  line-height: 1.2;
  color: var(--primary);
}
.stat-label { display: block; margin-top: 4px; font-size: 12px; color: var(--text-2); }

.scroll-cue { transition: opacity 0.25s ease; }
.scroll-cue:hover { opacity: 0.6; }

/* ---------- Section ---------- */
.section { position: relative; }
.page-body { min-height: 100vh; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto; }
.section-title {
  font-size: clamp(24px, 3.6vw, 36px);
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.01em;
}
.section-sub { margin-top: 12px; color: var(--text-2); font-size: 16px; line-height: 1.8; }

/* ---------- Shared card surface ---------- */
.card,
.staff-card,
.feature-card,
.rule-item,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.card {
  padding: 26px 22px;
  border-radius: 18px;
  transition: transform 0.28s var(--ease), box-shadow 0.28s ease, border-color 0.28s ease;
}
.card.hov:hover {
  transform: translateY(-6px);
  border-color: #b9d8f7;
  box-shadow: var(--shadow-md);
}
.card-icon {
  display: inline-grid; place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--primary-soft);
  font-size: 26px;
}
.card-title { font-size: 19px; font-weight: 700; color: var(--text); }
.card-desc { margin-top: 8px; color: var(--text-2); font-size: 14px; line-height: 1.8; }

/* ---------- Staff ---------- */
.staff-card {
  padding: 28px 16px 22px;
  border-radius: 18px;
  text-align: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease, border-color 0.3s ease;
}
.staff-card:hover {
  transform: translateY(-7px);
  border-color: #b9d8f7;
  box-shadow: var(--shadow-md);
}
.staff-avatar {
  width: 84px; height: 84px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid; place-items: center;
  overflow: hidden;
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px #cfe3fa;
  transition: transform 0.35s var(--ease), box-shadow 0.3s ease;
}
.staff-card:hover .staff-avatar {
  transform: scale(1.06) rotate(-2deg);
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px var(--primary);
}
.staff-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.staff-avatar span { font-size: 28px; font-weight: 700; color: var(--primary); }

.staff-name { margin-top: 16px; font-size: 19px; font-weight: 700; color: var(--text); }
.staff-role {
  display: inline-block; margin-top: 8px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-soft);
}
.staff-bio { margin-top: 10px; color: var(--text-2); font-size: 13px; line-height: 1.7; }

/* ---------- Rules ---------- */
.warning-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px;
  border-radius: 16px;
  border: 1px solid #f6c7c7;
  background: var(--danger-soft);
}
.warning-icon {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  font-size: 22px;
  background: #ffffff;
  border: 1px solid #f6c7c7;
}

.rule-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, border-color 0.25s ease;
}
.rule-item:hover {
  transform: translateX(5px);
  border-color: #b9d8f7;
  box-shadow: var(--shadow-sm);
}
.rule-num {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  font-size: 16px; font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #4b96f0, #2f7ee6);
}
.rule-text { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.6; }
.rule-body { flex: 1; min-width: 0; }
.rule-notes { margin-top: 9px; display: grid; gap: 5px; }
.rule-notes li {
  position: relative;
  padding-left: 15px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.7;
}
.rule-notes li::before {
  content: "";
  position: absolute; left: 2px; top: 8px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #a9cdf2;
}

/* ---------- Rules: info & cooperation ---------- */
.info-card {
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.info-title { font-size: 16px; font-weight: 700; color: var(--text); }
.info-text { margin-top: 10px; font-size: 13.5px; color: var(--text-2); line-height: 1.8; }
.info-warn { color: #c73b3f; }

.coop-grid { margin-top: 14px; display: grid; gap: 12px; }
@media (min-width: 640px) {
  .coop-grid { grid-template-columns: 1fr 1fr; }
}
.coop-box { padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border); }
.coop-allow { background: #f0fbf5; border-color: #c7ecd9; }
.coop-deny { background: #fdf2f2; border-color: #f6d4d4; }
.coop-title { font-weight: 700; font-size: 15px; }
.coop-allow .coop-title { color: #178a55; }
.coop-deny .coop-title { color: #c73b3f; }
.coop-desc { margin-top: 8px; font-size: 13.5px; color: var(--text-2); line-height: 1.75; }

/* ---------- Features ---------- */
.feature-card {
  padding: 24px 20px;
  border-radius: 18px;
  transition: transform 0.28s var(--ease), box-shadow 0.28s ease, border-color 0.28s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: #b9d8f7;
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  margin-bottom: 16px;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  transition: background 0.25s ease, color 0.25s ease;
}
.feature-card:hover .feature-icon { background: var(--primary); color: #ffffff; }
.feature-icon svg { width: 24px; height: 24px; }
.feature-title { font-size: 17px; font-weight: 700; color: var(--text); }
.feature-desc { margin-top: 8px; color: var(--text-2); font-size: 14px; line-height: 1.7; }

/* ---------- Donate ---------- */
.donate-btn {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 22px 24px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #2bbd7c, #1aa564);
  box-shadow: 0 8px 22px rgba(26, 165, 100, 0.3);
  font-weight: 700;
  transition: transform 0.25s var(--ease), box-shadow 0.3s ease, filter 0.25s ease;
}
.donate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(26, 165, 100, 0.42);
  filter: brightness(1.03);
}
.donate-btn-icon {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
}
.donate-btn-icon svg { width: 24px; height: 24px; }

.glass { background: var(--surface); box-shadow: var(--shadow-xs); }

.sponsor-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 14px 20px;
  font-size: 14px;
  transition: background 0.2s ease;
}
@media (min-width: 640px) {
  .sponsor-row { grid-template-columns: 1fr 1fr auto; }
}
.sponsor-row:hover { background: var(--surface-soft); }
.sponsor-name { color: var(--text); font-weight: 500; }
.sponsor-amt { color: var(--green); font-weight: 700; }
.sponsor-date { color: var(--text-2); }

/* ---------- Contact ---------- */
.contact-card {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  padding: 20px;
  border-radius: 16px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, border-color 0.25s ease;
}
.contact-card:hover {
  transform: translateY(-5px);
  border-color: #b9d8f7;
  box-shadow: var(--shadow-md);
}
.contact-icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}
.contact-icon svg { width: 24px; height: 24px; }
.contact-title { font-size: 17px; font-weight: 700; color: var(--text); }
.contact-desc { margin-top: 3px; color: var(--text-2); font-size: 13px; }
.contact-arrow { margin-left: auto; color: var(--primary); font-size: 18px; transition: transform 0.25s ease; }
.contact-card:hover .contact-arrow { transform: translateX(4px); }

/* ---------- Footer ---------- */
footer { background: rgba(255, 255, 255, 0.72); }
.footer-bar { opacity: 1; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(23, 41, 63, 0.4); }
.modal-panel {
  position: relative;
  width: 100%; max-width: 420px;
  padding: 30px 26px;
  border-radius: 20px;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s var(--ease);
}
.modal.open .modal-panel { transform: translateY(0) scale(1); }
.glass-strong {
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: all 0.22s ease;
}
.modal-close:hover { color: var(--danger); border-color: #f6c7c7; background: var(--danger-soft); }

.qr-frame {
  width: 260px;
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.qr-frame img { display: block; width: 100%; height: auto; }

/* ---------- Hamburger ---------- */
.hamburger { display: flex; flex-direction: column; gap: 5px; }
.hamburger i {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, width 0.25s ease;
}
#menu-btn[aria-expanded="true"] .hamburger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#menu-btn[aria-expanded="true"] .hamburger i:nth-child(2) { opacity: 0; width: 0; }
#menu-btn[aria-expanded="true"] .hamburger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.mobile-menu { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.mobile-menu.open { pointer-events: auto; }
.mobile-menu-backdrop {
  position: absolute; inset: 0;
  background: rgba(23, 41, 63, 0.35);
  opacity: 0; transition: opacity 0.28s ease;
}
.mobile-menu.open .mobile-menu-backdrop { opacity: 1; }
.mobile-menu-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(320px, 84vw);
  background: #ffffff;
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.3s var(--ease);
  overflow-y: auto;
}
.mobile-menu.open .mobile-menu-panel { transform: translateX(0); }
.mobile-nav-link {
  display: block;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 17px; font-weight: 500;
  color: var(--text-2);
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateX(4px);
}

/* ---------- Page transitions ---------- */
.page { display: none; opacity: 0; transform: translateY(10px); }
.page.is-active { display: block; animation: pageIn 0.45s var(--ease) forwards; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .btn { padding: 13px 22px; font-size: 15px; }
  .stat-num { font-size: 22px; }
  .staff-avatar { width: 72px; height: 72px; }
  .rule-text { font-size: 15px; }
}
