/* ====================================================
   당고단 홈 — 메인 스타일시트
   컨셉: 당고(경단) & 노랑빛 라운드 테마
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Jua&family=Gowun+Dodum&family=Gaegu:wght@400;700&display=swap');

:root {
  --bg-deep: #FFF9EC;
  --bg-panel: #FFFFFF;
  --bg-panel-2: #FFF3D6;
  --line: rgba(138, 90, 52, 0.16);
  --violet: #FFD447;        /* 구 violet → 메인 옐로우 포인트 */
  --violet-soft: rgba(255, 212, 71, 0.35);
  --ember: #FF6F6F;         /* 구 ember → 에러/경고 표시용 산호빛 레드 (핑크 포인트와 구분) */
  --gold: #B9781F;          /* 구 gold → 진한 캐러멜 브라운(라벨용) */
  --text-main: #4A3728;
  --text-muted: #A48F79;
  --brown: #8A5A34;
  --pink: #FFB4C6;
  --yellow-deep: #FFB800;
  --live: #35C46B;
  --font-display: 'Jua', sans-serif;
  --font-body: 'Gowun Dodum', sans-serif;
  --font-mono: 'Gaegu', sans-serif;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.7;
  background-image:
    radial-gradient(circle at 10% 6%, rgba(255,212,71,0.22), transparent 40%),
    radial-gradient(circle at 90% 14%, rgba(255,180,198,0.22), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(255,212,71,0.14), transparent 40%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 당고 꼬치 디바이더 (구 sigil-divider, 시그니처 요소) ---------- */
.sigil-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 64px 0 32px;
  color: var(--brown);
}
.sigil-divider::before,
.sigil-divider::after {
  content: "";
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--brown) 25%, var(--brown) 75%, transparent);
  opacity: .3;
}
.sigil-divider svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--pink); }
.sigil-divider .label {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.05em;
  font-size: 14px;
  color: var(--brown);
  white-space: nowrap;
  background: var(--bg-panel);
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(138,90,52,0.08);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 249, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 2px dashed var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brown);
}
.brand .spark { color: var(--pink); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 999px;
  border-bottom: none;
  transition: background .15s, color .15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--brown);
  background: var(--violet);
  font-weight: 700;
}
.social-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
  font-size: 12px;
}
.social-links a {
  padding: 6px 12px;
  border-bottom: none;
  color: var(--text-muted);
  background: var(--bg-panel-2);
  border-radius: 999px;
}
.social-links a:hover { color: var(--brown); background: var(--pink); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links a { margin-left: 0 !important; }
  .social-links { margin-left: 0 !important; gap: 8px !important; }
  .nav-links {
    position: fixed; top: 78px; left: 0; right: 0;
    background: var(--bg-deep);
    flex-direction: column;
    align-items: stretch;
    padding: 18px 24px;
    gap: 10px;
    border-bottom: 2px dashed var(--line);
    transform: translateY(-140%);
    transition: transform .25s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: block; margin-left: auto; background: var(--violet); border: none; color: var(--brown);
    font-size: 20px; cursor: pointer; width: 42px; height: 42px; border-radius: 999px;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,249,236,0.10) 0%, rgba(255,249,236,0.55) 55%, var(--bg-deep) 100%);
}
.hero-inner {
  position: relative; z-index: 2;
  padding-bottom: 56px;
  width: 100%;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--brown);
  background: var(--pink);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4.6vw, 48px);
  margin: 0 0 18px;
  line-height: 1.3;
  color: var(--brown);
  text-shadow: none;
}
.hero p {
  max-width: 560px;
  color: var(--text-main);
  margin-bottom: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  font-size: 14px;
  border-radius: 999px;
  border: none;
  background: var(--violet);
  color: var(--brown);
  cursor: pointer;
  box-shadow: 0 6px 0 var(--yellow-deep);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--yellow-deep); }
.btn.ghost {
  background: var(--bg-panel);
  color: var(--brown);
  box-shadow: 0 6px 0 rgba(138,90,52,0.15);
}
.btn.ghost:hover { box-shadow: 0 4px 0 rgba(138,90,52,0.15); }

/* ---------- Section heading ---------- */
.section-head { margin-bottom: 30px; text-align: center; }
.section-head .eyebrow {
  font-family: var(--font-mono);
  color: var(--pink);
  filter: brightness(.7);
  font-size: 18px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 4px 0 0;
  color: var(--brown);
}

/* ---------- Game cards (home) ---------- */
.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 760px) { .game-grid { grid-template-columns: 1fr; } }

.game-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: none;
  background: var(--bg-panel);
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  box-shadow: 0 8px 24px rgba(138,90,52,0.12);
  transition: transform .2s, box-shadow .2s;
}
.game-card:hover { box-shadow: 0 12px 30px rgba(138,90,52,0.18); transform: translateY(-4px); }
.game-card .bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.70;
}
.game-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(74,55,40,0.85) 100%);
}
.game-card .content { position: relative; z-index: 2; padding: 26px; }
.game-card .tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  background: var(--violet);
  color: var(--brown);
  border-radius: 999px;
  margin-bottom: 12px;
}
.game-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 24px; margin: 0 0 8px; color: #fff; }
.game-card p { color: #FFF3D6; font-size: 14px; margin: 0 0 16px; max-width: 90%; }

/* ---------- Info panels / lists ---------- */
.panel {
  background: var(--bg-panel);
  border: 2px solid rgba(255, 180, 198, 0.25);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 8px 24px rgba(138,90,52,0.10);
}
.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.list-row:last-child { border-bottom: none; }
.list-row .title { color: var(--text-main); }
.list-row .title .badge {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 11px;
  color: var(--brown);
  background: var(--pink);
  border: none;
  border-radius: 999px;
  padding: 2px 10px;
  margin-right: 8px;
}
.list-row .meta { color: var(--text-muted); font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }

/* ---------- Screenshot grid ---------- */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.shot-grid img, .shot-grid a {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: none;
}
.shot-grid img { aspect-ratio: 16/9; object-fit: cover; }

/* ---------- Steam widget ---------- */
.steam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.steam-item {
  background: var(--bg-panel);
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(138,90,52,0.10);
}
.steam-item img { width: 100%; aspect-ratio: 460/215; object-fit: cover; }
.steam-item .info { padding: 12px 14px; }
.steam-item .name { font-size: 14px; margin-bottom: 6px; }
.steam-item .price { font-family: var(--font-mono); font-size: 14px; color: var(--text-muted); }
.steam-item .discount {
  color: #2FAE63; font-weight: 700; margin-right: 8px;
}
.steam-item .orig { text-decoration: line-through; opacity: 0.6; margin-right: 6px; }

/* ---------- Forms / Board ---------- */
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  color: var(--brown);
  margin-bottom: 6px;
}
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-deep);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
}
.form-row textarea { min-height: 220px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus {
  outline: none; border-color: var(--violet);
}

table.board-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.board-table th {
  text-align: left; font-family: var(--font-display); font-weight: 400; font-size: 13px;
  color: var(--brown); letter-spacing: 0.02em;
  border-bottom: 2px dashed var(--line); padding: 10px 8px;
}
table.board-table td { padding: 12px 8px; border-bottom: 1px dashed var(--line); }
table.board-table tr:hover td { background: #FFF3D6; }

.tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tabs a {
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  background: var(--bg-panel);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
  box-shadow: 0 4px 10px rgba(138,90,52,0.08);
}
.tabs a.active { color: var(--brown); background: var(--violet); }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; font-family: var(--font-mono); font-size: 14px; }
.pagination a, .pagination span {
  padding: 6px 14px; border: none; border-radius: 999px; background: var(--bg-panel); color: var(--text-muted);
}
.pagination .current { color: var(--brown); background: var(--violet); }

/* ---------- Side widgets (좌우 여백 활용) ---------- */
.side-widget {
  position: fixed;
  top: 96px;
  width: 240px;
  z-index: 40;
}
.side-widget-left { left: max(24px, calc((100vw - 1180px) / 2 - 264px)); }
.side-widget-right { right: max(24px, calc((100vw - 1180px) / 2 - 264px)); }

.side-widget-inner {
  background: var(--bg-panel);
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(138,90,52,0.18);
}
.side-widget-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 12px;
  color: var(--brown);
  border-bottom: 1px dashed var(--line);
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(53,196,107,0.6);
  animation: live-pulse 1.6s infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(53,196,107,0.55); }
  70% { box-shadow: 0 0 0 7px rgba(53,196,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(53,196,107,0); }
}
.side-widget-frame { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; }
.side-widget-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.side-widget-link {
  display: block;
  text-align: center;
  padding: 9px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px dashed var(--line);
}
.side-widget-link:hover { color: var(--brown); }

/* 위젯이 본문과 겹칠 만큼 화면이 좁아지면 숨김 */
@media (max-width: 1680px) {
  .side-widget { display: none; }
}

/* ---------- Mobile live banner (헤더 아래, 작은 화면 전용) ---------- */
.mobile-live-banner {
  display: none;
  border-bottom: 2px dashed var(--line);
  background: var(--bg-panel-2);
}
@media (max-width: 1680px) {
  .mobile-live-banner { display: block; }
}
.mobile-live-banner summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-main);
}
.mobile-live-banner summary::-webkit-details-marker { display: none; }
.mobile-live-text { flex: 1; }
.mobile-live-arrow { color: var(--text-muted); transition: transform 0.2s; }
.mobile-live-banner[open] .mobile-live-arrow { transform: rotate(180deg); }
.mobile-live-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}
.mobile-live-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mobile-live-link {
  display: block;
  text-align: center;
  padding: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px dashed var(--line);
}
.mobile-live-link:hover { color: var(--brown); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px dashed var(--line);
  margin-top: 90px;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.site-footer .container {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* utility */
.mt-0 { margin-top: 0; }
.muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* badge (공지 등) */
.badge {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 11px;
  color: var(--brown);
  background: var(--pink);
  border-radius: 999px;
  padding: 2px 10px;
  margin-right: 6px;
}
