/* ============================================================
   MCAMX 社团 · 共享样式（像素风 + 毛玻璃卡片）
   ============================================================ */

/* ===== 全局重置 & 字体 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 确保 hidden 属性始终生效（不被 display 规则覆盖） */
[hidden] { display: none !important; }

:root {
  --mc-green: #4c8b3c;
  --mc-dark: #1e2b1a;
  --mc-gold: #d4a017;
  --mc-white: #f0f0f0;
  --shadow-pixel: 4px 4px 0 rgba(0, 0, 0, 0.3);
  /* 中文回退使用无衬线字体（避免落入系统默认宋体） */
  --font-pixel: 'Courier New', 'Microsoft YaHei', 'PingFang SC', monospace;

  /* 毛玻璃（普通样式：无渐变，仅一层浅浅的绿色 + 背景模糊 + 顶部内高光） */
  --glass-bg: rgba(76, 139, 60, 0.15);
  --glass-bg-solid: rgba(28, 42, 24, 0.55);
  --glass-border: 1px solid rgba(124, 199, 106, 0.28);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --glass-blur: blur(14px) saturate(160%);
  --radius: 16px;
}

body {
  font-family: -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Microsoft YaHei UI', 'Noto Sans SC', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #0f1a0d;
  color: #e8e8e8;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* ===== 动态深绿方格背景 ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(40, 80, 30, 0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 80, 30, 0.6) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: 0 0;
  animation: moveGrid 12s linear infinite;
  pointer-events: none;
}

@keyframes moveGrid {
  0% { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

.content-wrapper { position: relative; z-index: 1; }

/* ===== 像素风格辅助 ===== */
.pixel-border { border: 3px solid #2d3d2a; box-shadow: var(--shadow-pixel); image-rendering: pixelated; }
.pixel-text { font-family: var(--font-pixel); letter-spacing: 1px; }

/* ===== 毛玻璃通用类 ===== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0f1a0d; }
::-webkit-scrollbar-thumb { background: var(--mc-green); border: 2px solid #1e2b1a; border-radius: 0; }

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: rgba(15, 26, 13, 0.72);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border-bottom: 1px solid rgba(76, 139, 60, 0.45);
  padding: 0.6rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  transition: background 0.3s;
}

.navbar .logo { display: flex; align-items: center; gap: 0.6rem; font-size: 1.5rem; font-weight: 700; color: var(--mc-white); text-decoration: none; }
.navbar .logo i { color: var(--mc-gold); font-size: 2rem; filter: drop-shadow(0 0 6px rgba(212, 160, 23, 0.4)); }
.navbar .logo span {
  background: linear-gradient(135deg, #7cc76a, #3d7a33);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-family: var(--font-pixel);
  letter-spacing: 2px;
}

.nav-links { display: flex; gap: 1.8rem; list-style: none; flex-wrap: wrap; }
.nav-links a {
  color: #ccc; text-decoration: none; font-weight: 500; font-size: 1rem;
  padding: 0.3rem 0.2rem; border-bottom: 2px solid transparent; transition: 0.25s; letter-spacing: 0.5px;
}
.nav-links a:hover, .nav-links a.active { color: var(--mc-green); border-bottom-color: var(--mc-green); }
.nav-links a i { margin-right: 6px; }

.hamburger { display: none; font-size: 1.8rem; color: #ccc; cursor: pointer; background: none; border: none; }

/* ===== Hero 区域 ===== */
.hero {
  margin-top: 72px; min-height: 88vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 2rem 1.5rem; position: relative; border-bottom: 6px solid var(--mc-green);
}
.hero-content { max-width: 880px; position: relative; z-index: 2; }
.hero-content .badge {
  display: inline-block; background: var(--mc-dark); padding: 0.3rem 1.2rem; border: 2px solid var(--mc-green);
  font-family: var(--font-pixel); font-size: 0.85rem; color: var(--mc-green); letter-spacing: 2px;
  margin-bottom: 1.2rem; box-shadow: var(--shadow-pixel);
}
.hero-content .title-wrapper { display: flex; justify-content: center; align-items: center; min-height: 5rem; margin-bottom: 0.5rem; }
.hero-content h1 {
  font-size: 4.2rem; font-weight: 800; line-height: 1.2; font-family: var(--font-pixel);
  background: linear-gradient(135deg, #f0f0f0 0%, #a8d6a0 80%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 4px 12px rgba(76, 139, 60, 0.3)); letter-spacing: 4px; position: relative; display: inline-block;
}
.hero-content h1::after {
  content: '|'; -webkit-text-fill-color: initial; color: var(--mc-green); font-weight: 400;
  animation: blink 0.7s step-end infinite; margin-left: 2px; display: inline-block;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-content h1.done::after { opacity: 0; animation: none; }
.hero-content h1 i { -webkit-text-fill-color: initial; color: var(--mc-gold); filter: drop-shadow(0 0 10px rgba(212, 160, 23, 0.3)); margin-right: 6px; }
.hero-content .subtitle { font-size: 1.3rem; color: #b8b8b8; margin: 0.8rem 0 1.8rem; font-weight: 300; letter-spacing: 1px; }
.hero-content .subtitle strong { color: var(--mc-green); font-weight: 600; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block; padding: 0.85rem 2.4rem; font-weight: 600; text-decoration: none;
  border: 2px solid transparent; transition: 0.25s; font-size: 1rem; cursor: pointer;
  box-shadow: var(--shadow-pixel); letter-spacing: 0.5px; background: var(--mc-dark); color: #eee; border-color: #3a4a37;
  font-family: inherit;
}
.btn-primary { background: var(--mc-green); color: #111; border-color: var(--mc-green); box-shadow: 0 4px 0 #1e3a17; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #1e3a17; background: #5caa4a; }
.btn-outline { background: transparent; border-color: var(--mc-green); color: var(--mc-green); }
.btn-outline:hover { background: var(--mc-green); color: #111; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.85rem; box-shadow: none; border-width: 1px; }

/* ===== 通用 section ===== */
section { padding: 4.5rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 2.6rem; font-weight: 700; text-align: center; margin-bottom: 1rem; letter-spacing: -0.5px; font-family: var(--font-pixel); }
.section-title i { color: var(--mc-gold); margin-right: 10px; }
.section-sub { text-align: center; color: #aaa; max-width: 640px; margin: 0 auto 3.5rem; font-size: 1.1rem; border-left: 4px solid var(--mc-green); padding-left: 1.2rem; }
.section-sub strong { color: #ddd; }

/* ===== 关于我们 ===== */
#about { background: rgba(20, 30, 18, 0.55); border-top: 3px solid #2d3d2a; border-bottom: 3px solid #2d3d2a; backdrop-filter: blur(2px); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-text p { margin-bottom: 1.2rem; color: #d0d0d0; font-size: 1.05rem; }
.about-text p i { color: var(--mc-green); width: 1.8rem; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }

/* ===== 项目展示 ===== */
#projects { background: rgba(15, 26, 13, 0.4); backdrop-filter: blur(2px); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.project-body { padding: 1.4rem 1.6rem 1.8rem; flex: 1; display: flex; flex-direction: column; }
.project-body h3 { font-size: 1.3rem; margin-bottom: 0.5rem; color: #eee; }
.project-body h3 i { color: var(--mc-gold); margin-right: 6px; font-size: 0.9rem; }
.project-body p { color: #b0b0b0; font-size: 0.95rem; flex: 1; margin-bottom: 0.8rem; }
.project-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.4rem; }
.project-tags span { background: rgba(26, 42, 23, 0.7); border: 1px solid #2d3d2a; padding: 0.15rem 0.8rem; font-size: 0.7rem; font-family: var(--font-pixel); color: #aaa; letter-spacing: 0.5px; }

.project-img {
  height: 170px; background: #142011; display: flex; align-items: center; justify-content: center;
  font-size: 3.6rem; color: var(--mc-green); border-bottom: 1px solid rgba(124, 199, 106, 0.25); position: relative; overflow: hidden;
}
.project-img .pixel-overlay {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.15) 0px, rgba(0, 0, 0, 0.15) 4px, transparent 4px, transparent 8px);
  pointer-events: none;
}
.project-img i { filter: drop-shadow(0 0 20px rgba(76, 139, 60, 0.25)); z-index: 1; }

/* ===== 成员 ===== */
#members { background: rgba(20, 30, 18, 0.55); border-top: 3px solid #2d3d2a; border-bottom: 3px solid #2d3d2a; backdrop-filter: blur(2px); }
.members-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; justify-items: center; }
.member-avatar {
  width: 80px; height: 80px; border-radius: 0; background: rgba(20, 32, 17, 0.7); border: 2px solid rgba(124, 199, 106, 0.35);
  margin: 0 auto 0.8rem; display: flex; align-items: center; justify-content: center; font-size: 2.8rem; color: var(--mc-green);
  box-shadow: var(--shadow-pixel); border-radius: 12px;
}
.member-card h4 { font-size: 1.1rem; color: #eee; }
.member-card .role {
  font-size: 0.8rem; color: var(--mc-gold); font-family: var(--font-pixel); letter-spacing: 0.5px;
  background: rgba(26, 42, 23, 0.7); display: inline-block; padding: 0.1rem 0.8rem; margin-top: 0.2rem; border: 1px solid #2d3d2a;
}

/* ===== 加入我们 ===== */
#join { background: rgba(15, 26, 13, 0.4); backdrop-filter: blur(2px); }
.join-info h3 { font-size: 1.8rem; margin-bottom: 0.8rem; color: #eee; }
.join-info h3 i { color: var(--mc-gold); }
.join-info p { color: #c0c0c0; margin-bottom: 1.2rem; font-size: 1rem; }
.join-info ul { list-style: none; padding: 0; }
.join-info ul li { padding: 0.4rem 0; color: #ccc; display: flex; align-items: center; gap: 0.8rem; }
.join-info ul li i { color: var(--mc-green); width: 1.4rem; font-size: 1.1rem; }

.join-form { display: flex; flex-direction: column; gap: 1rem; }
.join-form input, .join-form textarea {
  background: rgba(20, 32, 17, 0.7); border: 1px solid rgba(124, 199, 106, 0.28); padding: 0.8rem 1.2rem;
  font-size: 1rem; color: #eee; font-family: inherit; outline: none; transition: 0.2s; box-shadow: none; width: 100%; border-radius: 10px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.join-form input:focus, .join-form textarea:focus { border-color: var(--mc-green); box-shadow: 0 0 0 3px rgba(76, 139, 60, 0.2); }
.join-form textarea { min-height: 100px; resize: vertical; }
.join-form .btn { align-self: flex-start; border: none; padding: 0.8rem 2.8rem; }
.form-tip { font-size: 0.8rem; color: #777; margin-top: 0.2rem; }

/* ===== 毛玻璃卡片（覆盖原有实体卡片） ===== */
.stat-card, .project-card, .member-card, .join-wrapper {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  transition: 0.25s;
}
.stat-card { padding: 1.6rem 1rem; text-align: center; }
.stat-card:hover { border-color: var(--mc-green); transform: translateY(-4px) scale(1.02); }
.stat-card .number { font-size: 2.8rem; font-weight: 800; color: var(--mc-gold); font-family: var(--font-pixel); display: block; }
.stat-card .label { color: #bbb; font-size: 0.95rem; margin-top: 0.2rem; }
.project-card { overflow: hidden; display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-6px); border-color: var(--mc-green); }
.member-card { padding: 1.8rem 1.2rem 1.6rem; text-align: center; width: 100%; max-width: 220px; }
.member-card:hover { border-color: var(--mc-green); transform: translateY(-4px) scale(1.03); }
.join-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 2.8rem 3rem; }

/* ===== 子页面（留言 / 后台） ===== */
.page-hero { margin-top: 72px; padding: 3.5rem 1.5rem 1.5rem; text-align: center; }
.page-hero h1 { font-size: 2.8rem; font-family: var(--font-pixel); letter-spacing: 2px; color: var(--mc-white); }
.page-hero h1 i { color: var(--mc-gold); }
.page-hero p { color: #aaa; margin-top: 0.6rem; }
.page-wrap { max-width: 860px; margin: 0 auto; padding: 1rem 1.5rem 4rem; position: relative; z-index: 1; }

.panel { padding: 1.8rem 1.8rem; margin-bottom: 2rem; }
.panel-title { font-size: 1.2rem; margin-bottom: 1rem; color: #eee; }
.panel-title i { color: var(--mc-gold); margin-right: 8px; }

/* 表单组件 */
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.field label { font-size: 0.9rem; color: #bbb; }
.input, .textarea, select.input {
  background: rgba(20, 32, 17, 0.7); border: 1px solid rgba(124, 199, 106, 0.28); padding: 0.7rem 1rem;
  font-size: 1rem; color: #eee; font-family: inherit; outline: none; border-radius: 10px; width: 100%;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: 0.2s;
}
.input:focus, .textarea:focus { border-color: var(--mc-green); box-shadow: 0 0 0 3px rgba(76, 139, 60, 0.2); }
.textarea { min-height: 96px; resize: vertical; }
.form-row { display: flex; gap: 1rem; }
.form-row .field { flex: 1; }

.cm-status { padding: 0.7rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: 0.92rem; display: block; }
.cm-status.ok { background: rgba(76, 139, 60, 0.2); border: 1px solid var(--mc-green); color: #bfe3b4; }
.cm-status.warn { background: rgba(200, 80, 60, 0.18); border: 1px solid #c85a46; color: #f0b7ad; }

/* 留言列表 */
.cm-list { display: flex; flex-direction: column; gap: 1rem; }
.cm-item { padding: 1.1rem 1.2rem; }
.cm-item-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cm-name { font-weight: 600; color: #eaeaea; }
.cm-badge { margin-left: 8px; font-size: 0.7rem; background: var(--mc-gold); color: #222; padding: 0.05rem 0.5rem; border-radius: 6px; }
.cm-time { font-size: 0.78rem; color: #888; }
.cm-text { margin-top: 0.6rem; color: #cfcfcf; white-space: pre-wrap; word-break: break-word; }
.cm-actions { display: flex; gap: 0.6rem; margin-top: 0.7rem; }
.cm-act {
  background: transparent; border: 1px solid #3a4a37; color: #aaa; font-size: 0.78rem;
  padding: 0.15rem 0.7rem; border-radius: 8px; cursor: pointer; transition: 0.2s; font-family: inherit;
}
.cm-act:hover { border-color: var(--mc-green); color: var(--mc-green); }
.cm-item.is-owner { border-color: rgba(212, 160, 23, 0.5); }
.cm-item.is-reply { border-left: 3px solid var(--mc-green); }
.cm-replies { margin-left: 1.5rem; margin-top: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.cm-empty { color: #888; text-align: center; padding: 1.5rem; }

/* 回复提示 */
.cm-reply-hint {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem;
  padding: 0.5rem 0.9rem; border-radius: 10px; font-size: 0.85rem;
  background: rgba(76, 139, 60, 0.12); border: 1px solid rgba(124, 199, 106, 0.28); color: #ccc;
}
.cm-reply-hint b { color: var(--mc-green); }
.cm-cancel {
  margin-left: auto; border: none; background: none; color: var(--mc-green);
  cursor: pointer; font-size: 0.85rem; font-family: inherit;
}
.cm-cancel:hover { text-decoration: underline; }

/* 人机验证 */
.cm-turnstile { margin: 0.2rem 0 0.9rem; min-height: 0; }

.ad-replybox { margin-top: 0.8rem; }
.ad-replybox .cm-textarea { margin-bottom: 0.5rem; }

/* 后台 */
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.admin-who { color: #bbb; font-size: 0.9rem; }
.admin-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.admin-tab {
  background: rgba(20, 32, 17, 0.6); border: 1px solid #2d3d2a; color: #bbb; padding: 0.45rem 1.1rem;
  border-radius: 10px; cursor: pointer; font-family: inherit; transition: 0.2s;
}
.admin-tab.active { background: var(--mc-green); color: #111; border-color: var(--mc-green); }
.admin-group-title { font-size: 1rem; color: #ddd; margin: 1.2rem 0 0.8rem; }
.admin-count { font-size: 0.75rem; background: #1a2a17; border: 1px solid #2d3d2a; padding: 0.05rem 0.55rem; border-radius: 8px; color: #aaa; }
.contact-item .cm-text { margin-top: 0.4rem; }
.contact-email { color: var(--mc-green); font-size: 0.85rem; }
.contact-handled { opacity: 0.55; }

/* ===== 页脚 ===== */
footer { border-top: 3px solid var(--mc-green); background: rgba(10, 18, 8, 0.95); padding: 2.5rem 2rem 1.8rem; text-align: center; color: #888; position: relative; z-index: 1; }
footer .socials { display: flex; justify-content: center; gap: 2rem; font-size: 1.6rem; margin-bottom: 1.2rem; }
footer .socials a { color: #666; transition: 0.2s; }
footer .socials a:hover { color: var(--mc-green); transform: translateY(-3px); }
footer .footer-text { font-size: 0.9rem; letter-spacing: 0.5px; }
footer .footer-text i { color: var(--mc-gold); }

/* ===== 响应式 ===== */
@media (max-width: 820px) {
  .navbar { padding: 0.6rem 1.2rem; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; align-items: center; gap: 0.6rem;
    padding: 1rem 0 0.4rem; border-top: 2px solid #2d3d2a; margin-top: 0.6rem;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
  .hero-content h1 { font-size: 2.8rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .join-wrapper { grid-template-columns: 1fr; padding: 2rem 1.2rem; }
  .join-form .btn { align-self: stretch; text-align: center; }
  section { padding: 3rem 1.2rem; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .form-row { flex-direction: column; gap: 0; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 2rem; letter-spacing: 2px; }
  .hero-content .subtitle { font-size: 1rem; }
  .section-title { font-size: 2rem; }
  .page-hero h1 { font-size: 2rem; }
  .stat-card .number { font-size: 2rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .members-grid { grid-template-columns: 1fr 1fr; }
}
