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

:root {
  --green-dark: #04342C;
  --green-mid: #0F6E56;
  --green-main: #1D9E75;
  --green-light: #5DCAA5;
  --green-pale: #E1F5EE;
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* 본문(공지·패치노트·위키) 속 링크 — 색상만으로 구분하지 않도록 밑줄 표시 */
.body-link {
  color: #3182f6; font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(49, 130, 246, 0.4);
  text-underline-offset: 3px;
}
.body-link:hover { text-decoration-color: #3182f6; }

/* ── 네비게이션 ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #f2f4f6;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-size: 32px;
  font-weight: 700;
  color: var(--green-main);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex: 1;
}

.nav-links a {
  font-size: 15px;
  font-weight: 700;
  color: #4e5968;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
  background: #f2f4f6;
  color: #191f28;
}

.btn-nav {
  background: #00c73c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-nav:hover { background: #00b536; }

/* ── 헤더 로그인 영역 (nav-auth.js가 채움) ── */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #5865F2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s;
}
.btn-login:hover { filter: brightness(1.08); }
.btn-login svg { width: 18px; height: 18px; }

.nav-user {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-admin {
  background: var(--green-main);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-admin:hover { background: var(--green-mid); }

.btn-logout {
  background: #f2f4f6;
  color: #4e5968;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-logout:hover { background: #e5e8eb; }

/* 모바일 메뉴 안 로그인 영역 구분선 */
.mobile-auth {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ── 서버 정보 드롭다운 ── */
.nav-drop { position: relative; }
.nav-drop .caret { font-size: 10px; color: var(--text-muted); }
.drop-menu {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 60;
}
.nav-drop:hover .drop-menu { opacity: 1; visibility: visible; }
.drop-inner {
  width: 160px;
  background: #fff;
  border: 1px solid #f2f4f6;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  padding: 4px 0;
}
.nav-links .drop-inner a {
  display: block;
  font-size: 14px;
  font-weight: 400;
  padding: 10px 16px;
  border-radius: 0;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-primary);
  margin-left: auto;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 24px 16px;
  border-top: 1px solid var(--border);
  gap: 4px;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-size: 15px;
  color: var(--text-secondary);
  padding: 8px 0;
}

/* ── 히어로 ── */
.hero {
  background:
    linear-gradient(rgba(8, 18, 12, 0.45), rgba(8, 18, 12, 0.6)),
    url("hero.jpg") center / cover no-repeat;
  color: #fff;
  padding: 80px 24px 72px;
  text-align: center;
}

.hero-inner { max-width: 640px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 12px;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

.hero-title {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-ip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 22px;
  margin-bottom: 28px;
  cursor: pointer;
  transition: background 0.15s;
}

.hero-ip:hover { background: rgba(0, 0, 0, 0.35); }

.hero-ip i { font-size: 18px; }

.ip-text {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.ip-hint {
  font-size: 12px;
  opacity: 0.6;
}

.copy-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--green-dark);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 999;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: #fff;
  color: var(--green-mid);
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.9; }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-md);
  padding: 12px 28px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-outline:hover { background: rgba(255, 255, 255, 0.1); }

/* ── 통계 바 ── */
.stats-bar {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.stat-item {
  flex: 1;
  max-width: 200px;
  text-align: center;
  padding: 20px 16px;
  border-right: 1px solid var(--border);
}

.stat-item:last-child { border-right: none; }

.stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--green-main);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.stat-num.stat-offline { color: #f87171; }

/* ── 섹션 공통 ── */
.section { padding: 64px 24px; }
.section-alt { background: var(--bg-alt); }

.section-inner { max-width: 1100px; margin: 0 auto; }

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.section-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ── 기능 카드 (말랑 블롭) ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feat-card {
  background: linear-gradient(160deg, #ffffff 60%, #f0faf5 100%);
  border: 1px solid #e3f0ea;
  border-radius: 28px;
  padding: 28px 22px;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}

.feat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 34px rgba(29, 158, 117, 0.14);
}

.feat-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  background: linear-gradient(135deg, #d7f5e8, #bfe9d6);
  border-radius: 53% 47% 55% 45% / 48% 55% 45% 52%;
  animation: blob-bob 3.2s ease-in-out infinite;
}
.feat-card:nth-child(2n) .feat-icon {
  animation-delay: 0.6s;
  background: linear-gradient(135deg, #ffe9d1, #ffd9b3);
  border-radius: 45% 55% 48% 52% / 55% 45% 55% 45%;
}
.feat-card:nth-child(3n) .feat-icon {
  animation-delay: 1.1s;
  background: linear-gradient(135deg, #dbeafe, #c7dcff);
  border-radius: 55% 45% 45% 55% / 45% 52% 48% 55%;
}
@keyframes blob-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.feat-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
}

.feat-desc {
  font-size: 13.5px;
  color: #666;
  line-height: 1.7;
}

/* ── 플러그인 목록 ── */
.plugin-list { display: flex; flex-direction: column; gap: 8px; }

.plugin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: border-color 0.15s;
}

.plugin-row:hover { border-color: var(--green-light); }

.plugin-name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.plugin-name i { color: var(--green-main); font-size: 16px; }

.plugin-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.plugin-ver {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* ── 커뮤니티 ── */
/* 카드가 1개라 기존 2열 폭(543px)을 유지한 채 좌측 정렬 (섹션 제목과 왼쪽 모서리 정렬) */
.community-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 543px;
}

.comm-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.comm-card:hover {
  border-color: var(--green-light);
  box-shadow: 0 2px 12px rgba(29, 158, 117, 0.08);
}

.comm-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}

.comm-icon.discord { background: #5865F2; }
.comm-icon.naver { background: #03C75A; }

.comm-title {
  font-size: 15px;
  font-weight: 600;
}

.comm-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.comm-arrow {
  margin-left: auto;
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── 후원 배너 ── */
.donate-banner {
  background: linear-gradient(135deg, #7c3a00, #e8811a);
  color: #fff;
  padding: 40px 24px;
}

.donate-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.donate-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.donate-desc {
  font-size: 14px;
  opacity: 0.8;
}

.btn-donate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #d97110;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.btn-donate:hover { opacity: 0.9; }

/* ── 푸터 ── */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid #f2f4f6;
  padding: 40px 16px;
}

.footer-inner { max-width: 1280px; margin: 0 auto; }

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

/* 통합 푸터: 로고 + 브랜드 문구 (원래 좌측 정렬 유지) */
.footer-brand {
  margin-bottom: 16px;
}

.footer-logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--green-main);
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 14px;
  color: #4e5968;
  line-height: 1.7;
  max-width: 320px;
}

.footer-links-wrap {
  display: flex;
  gap: 48px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col-title {
  font-size: 16px;
  font-weight: 700;
  color: #191f28;
  margin-bottom: 16px;
}

.footer-col a {
  font-size: 14px;
  color: #6b7684;
  transition: color 0.15s;
}

.footer-col a:hover { color: #191f28; }

.footer-bottom {
  font-size: 11px;
  color: #6b7684;
  padding-top: 16px;
  line-height: 1.7;
}

.footer-disclaimer { margin-top: 8px; }

.footer-copy { margin-top: 32px; text-align: center; font-size: 10px; }

.logo-img {
  width: 1.25em;
  height: 1.25em;
  border-radius: 22%;
  vertical-align: -0.2em;
}

.logo-full { aspect-ratio: 1240 / 380; object-fit: contain; }

.nav-logo .logo-full { height: 52px; width: auto; display: block; }

.footer-logo .logo-full { height: 46px; width: auto; display: block; }

/* ── 반응형 ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .btn-nav { display: none; }
  .nav-auth { display: none; }
  .hamburger { display: flex; }

  .hero-title { font-size: 28px; }
  .stats-bar { flex-wrap: wrap; }
  .stat-item { min-width: 50%; border-right: none; border-bottom: 1px solid var(--border); }

  .features-grid { grid-template-columns: 1fr 1fr; }
  .community-grid { grid-template-columns: 1fr; }

  .footer-top { flex-direction: column; }
  .footer-links-wrap { gap: 32px; }

  .donate-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 24px; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; align-items: center; }
}

/* ── 메인 새소식·패치노트 섹션 ── */
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.news-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}

.news-title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  transition: color 0.15s;
}
.news-title:hover { color: var(--green-main); }
.news-title i { font-size: 16px; color: var(--text-muted); }

.news-list { display: flex; flex-direction: column; }
.news-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 2px;
  border-top: 1px solid var(--border-light);
  font-size: 14px;
}
.news-row:first-child { border-top: none; }
.news-row:hover .news-t { color: var(--green-main); }

.news-badge {
  flex-shrink: 0;
  font-size: 11px; font-weight: 700;
  border-radius: 20px; padding: 3px 10px;
  background: var(--green-pale); color: var(--green-mid);
}
.news-badge.maint { background: #fff7ed; color: #c2410c; }

.news-t {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
  font-weight: 600;
}
.news-d { flex-shrink: 0; font-size: 12px; color: var(--text-muted); }
.news-empty { padding: 24px 0; text-align: center; color: var(--text-muted); font-size: 13px; }

@media (max-width: 768px) {
  .news-grid { grid-template-columns: 1fr; }
}

/* ── 서버 갤러리 (필름 스트립) ── */
.gallery-wrap { overflow: hidden; }

.gallery-strip {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: gallery-roll 42s linear infinite;
}
.gallery-strip:hover { animation-play-state: paused; }

@keyframes gallery-roll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.gallery-ph { width: 520px; }
.gallery-ph img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
}
.gallery-cap {
  font-size: 12.5px;
  font-weight: 600;
  color: #4e5968;
  margin-top: 7px;
  text-align: center;
}

@media (max-width: 768px) {
  .gallery-ph { width: 320px; }
}


/* ── 함께해요 (디스코드 + 후원 반반 배너) ── */
.duo-band {
  display: flex;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
}
.duo-half {
  flex: 1;
  color: #fff;
  padding: 38px 32px;
  text-align: center;
  transition: flex 0.3s;
}
.duo-half:hover { flex: 1.25; }
.duo-disc { background: linear-gradient(135deg, #4752c4, #5865F2); }
.duo-dona { background: linear-gradient(135deg, #7c3a00, #e8811a); }
.duo-ic { font-size: 38px; margin-bottom: 10px; }
.duo-t1 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.duo-t2 { font-size: 13.5px; opacity: 0.85; line-height: 1.6; margin-bottom: 14px; }
.duo-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 4px 12px;
}
.duo-online::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #57F287;
  animation: duo-blink 1.6s infinite;
}
.duo-online.heart::before { background: #ffd6e5; }
@keyframes duo-blink { 50% { opacity: 0.35; } }
.duo-btnrow { margin-top: 14px; }
.duo-btn {
  display: inline-block;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  border-radius: 11px;
  padding: 12px 24px;
  transition: filter 0.15s;
}
.duo-btn:hover { filter: brightness(0.94); }
.duo-disc .duo-btn { color: #4752c4; }
.duo-dona .duo-btn { color: #d97110; }

@media (max-width: 768px) {
  .duo-band { flex-direction: column; }
}
