/* ssafari 웹사이트 — 인게임 UI(UITheme/LobbyUI)와 같은 디자인 언어.
   화이트 톤 플랫 팔레트(밝은 배경·흰 패널·검정 잉크 강조), 앰버 하드 섀도 CTA,
   빠른 입장 계열의 코발트 블루 보조 CTA, 사선(skew) 버튼과 굵은 이탤릭 타이포. */

:root {
  /* UITheme.cs 값을 그대로 hex로 옮김 */
  --bg: #f5f5f2;          /* Background (0.96 0.96 0.95) */
  --surface: #ffffff;     /* Surface */
  --surface-alt: #ececeb; /* SurfaceAlt (0.925) */
  --ink: #171719;         /* Ink (0.09 0.09 0.10) */
  --muted: #70757f;       /* Muted (0.44 0.46 0.50) */
  --line: #d9d9d6;        /* Line (0.85 0.85 0.84) */
  --positive: #148c4d;    /* Positive */
  --danger: #c72424;      /* Danger */
  --amber: #b8800a;       /* Amber (0.72 0.50 0.04) */
  /* LobbyUI.cs CTA 계열 */
  --hero-shadow: #d99e0d;      /* HeroShadow (0.85 0.62 0.05) */
  --soft-shadow: #cccccb;      /* SoftShadow */
  --cobalt: #1452b8;           /* QuickJoinBlue (0.08 0.32 0.72) */
  --cobalt-shadow: #06245c;    /* QuickJoinBlueShadow */
  --skew: -8deg;               /* 사선 디자인 언어 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "NanumSquareRound", "NanumSquareRoundB", "Malgun Gothic",
    "맑은 고딕", system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- 상단 내비게이션: 키아트 밤하늘 남색 바 ----------
   로고가 히어로 타이틀과 같은 크림+금빛 조합을 쓰도록 어두운 배경을 깐다. */
.top-nav {
  background: #1a2233;
  border-bottom: 2px solid #10141f;
  position: sticky;
  top: 0;
  z-index: 10;
}
.top-nav .nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
}
.brand {
  font-family: "Lilita One", "Jua", sans-serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #fff6e3;              /* 히어로 타이틀과 같은 크림 */
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
}
.brand .shot { color: #ffc94d; } /* 히어로 타이틀과 같은 노을 금빛 */
/* 탭: 어두운 상단 바 위의 흰 텍스트 링크. 현재 페이지만 금빛으로 표시한다. */
.nav-tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.08s ease;
}
.nav-tab > span { display: inline-block; }
.nav-tab:hover { color: #ffc94d; }
.nav-tab.active { color: #ffc94d; } /* 히어로 fari와 같은 노을 금빛 */

/* ---------- 히어로: 키아트 풀블리드 배너 ----------
   캐릭터들이 그림 왼쪽~중앙에 몰려 있어, 텍스트는 비어 있는 오른쪽
   하늘·원경 위에 컴팩트하게 올리고 그 아래에만 옅은 그라데이션을 깐다. */
.hero {
  position: relative;
  min-height: min(74vh, 700px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: url("key-art.jpg") center 30% / cover no-repeat, #1a2233;
  padding: 96px 24px 64px 6vw;
  overflow: hidden;
}
.hero-media {
  /* 움직이는 키아트: 정적 배경(key-art.jpg) 위에 겹쳐 스크림보다 아래 */
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero::before {
  /* 왼쪽 텍스트 영역만 살짝 어둡게 — 그림 대부분은 그대로 보이게 */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to right,
    rgba(16, 20, 34, 0.62) 0%,
    rgba(16, 20, 34, 0.34) 30%,
    rgba(16, 20, 34, 0) 52%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 440px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero h1 {
  /* 키아트의 둥근 치비 그림체에 맞춘 라운드 디스플레이 서체 */
  font-family: "Lilita One", "Jua", sans-serif;
  font-size: clamp(46px, 6.5vw, 72px);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 1px;
  line-height: 1.0;
  color: #fff6e3; /* 키아트의 크림 톤 */
  text-shadow: 0 3px 22px rgba(12, 16, 28, 0.65); /* 부드러운 글로우만 */
}
.hero h1 .shot { color: #ffc94d; } /* 노을 금빛 */
.hero p.tagline {
  margin-top: 12px;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: clamp(14px, 1.8vw, 18px);
  color: rgba(255, 246, 227, 0.92);
  font-weight: 400;
  text-shadow: 0 2px 14px rgba(12, 16, 28, 0.6);
}

/* CTA: 로비 히어로 버튼(사선 + 하드 섀도) */
.cta-row {
  display: flex;
  gap: 18px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 28px;
}
/* 키아트의 치비 그림체·주아 서체에 맞춘 통통한 사탕 버튼.
   두 버튼이 같은 입체 규격을 쓴다: 높이 54px, 위 12% 밝은 하이라이트,
   아래 엣지 6px, 같은 앰비언트 그림자, 같은 호버(-2px/엣지 8px)와
   클릭(+4px/엣지 2px) 반응. 글자는 플렉스 중앙 + 시각 보정 -1px. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 36px;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  cursor: pointer;
  border: none;
}
.btn > span { display: inline-block; transform: translateY(-1px); }
/* 호버 = 반쯤 눌림(아래로 3px, 엣지 3px), 클릭 = 끝까지 눌림(5px, 엣지 1px) */
.btn:hover { transform: translateY(3px); }
.btn:active { transform: translateY(5px); }
.btn-primary {
  background: linear-gradient(to bottom, #ffd97a 0%, #ffc94d 12%, #ffc035 100%);
  color: #5b3d00;
  box-shadow: 0 6px 0 #d99e0d, 0 12px 20px rgba(12, 16, 28, 0.28);
}
.btn-primary:hover { box-shadow: 0 3px 0 #d99e0d, 0 6px 12px rgba(12, 16, 28, 0.24); }
.btn-primary:active { box-shadow: 0 1px 0 #d99e0d, 0 3px 8px rgba(12, 16, 28, 0.22); }
.btn-cobalt {
  background: linear-gradient(to bottom, #6d9df0 0%, #4a82e2 12%, #3c6fd0 100%);
  color: #ffffff;
  box-shadow: 0 6px 0 var(--cobalt-shadow), 0 12px 20px rgba(12, 16, 28, 0.28);
}
.btn-cobalt:hover { box-shadow: 0 3px 0 var(--cobalt-shadow), 0 6px 12px rgba(12, 16, 28, 0.24); }
.btn-cobalt:active { box-shadow: 0 1px 0 var(--cobalt-shadow), 0 3px 8px rgba(12, 16, 28, 0.22); }
.cta-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.hero .cta-note { color: rgba(255, 255, 255, 0.75); }
.live-status {
  margin-top: 16px;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 14.5px;
  color: #ffc94d;
  text-shadow: 0 2px 10px rgba(12, 16, 28, 0.6);
}

/* ---------- 본문 섹션 공통: 흰 패널 카드 ---------- */
main { flex: 1; }
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 24px;
}
.section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 27px;
  font-weight: 400;
  margin-bottom: 20px;
}
.section h2::before {
  /* 앰버 라운드 마커: 히어로 금빛 톤과 이어지는 포인트 */
  content: "";
  flex: none;
  width: 12px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(#ffd97a, #ffc035);
  box-shadow: 0 2px 0 #d99e0d;
}
.section h2 > span { display: inline-block; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 4px 0 var(--soft-shadow), 0 10px 18px rgba(23, 23, 25, 0.05);
  padding: 22px 22px 20px;
}
.card h3 {
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 8px;
}
.card p { font-size: 13.5px; color: var(--muted); }

/* ---------- 공지사항: 카드와 같은 라운드 규격 ---------- */
.notice-list { display: flex; flex-direction: column; gap: 14px; }
.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 4px 0 var(--soft-shadow), 0 10px 18px rgba(23, 23, 25, 0.05);
  overflow: hidden; /* 라운드 모서리 밖으로 hover 배경이 새지 않게 */
}
.notice summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
}
.notice summary::-webkit-details-marker { display: none; }
.notice summary:hover { background: var(--surface-alt); }
.notice .badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 14px;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  color: var(--surface);
  background: var(--ink);
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(23, 23, 25, 0.35);
}
.notice .badge > span { display: inline-block; transform: translateY(-1px); }
.notice .badge.update { background: var(--cobalt); box-shadow: 0 2px 0 var(--cobalt-shadow); }
.notice .badge.event { background: var(--positive); box-shadow: 0 2px 0 #0a5e33; }
.notice .badge.maintenance { background: var(--danger); box-shadow: 0 2px 0 #7e1414; }
.notice .title {
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 16px;
}
.notice .date { margin-left: auto; flex: none; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.notice .body {
  border-top: 1px solid var(--line);
  padding: 16px 24px 20px;
  font-size: 14px;
  color: #3a3d44;
}
.notice .body ul { margin: 6px 0 6px 20px; }
.notice .body li { margin: 3px 0; }
.notice[open] summary { background: var(--surface-alt); }
.notice-empty { color: var(--muted); text-align: center; padding: 48px 0; }

/* ---------- 이벤트·대회 상태 배지: 미니 사탕 필 ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 14px;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  color: var(--surface);
  background: var(--ink);
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(23, 23, 25, 0.35);
  margin-bottom: 10px;
}
.status-badge > span { display: inline-block; transform: translateY(-1px); }
.status-badge.live { background: var(--positive); box-shadow: 0 2px 0 #0a5e33; }
.status-badge.open { background: var(--cobalt); box-shadow: 0 2px 0 var(--cobalt-shadow); }
.status-badge.done { background: var(--muted); box-shadow: 0 2px 0 #55585f; }

.card .period {
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 12.5px;
  color: var(--amber);
  margin-bottom: 6px;
}
.card.done { opacity: 0.62; }
.card.done .period { color: var(--muted); }

/* 대회 일정: 카드와 같은 라운드 규격의 행 */
.schedule-list { display: flex; flex-direction: column; gap: 12px; }
.schedule-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 4px 0 var(--soft-shadow), 0 10px 18px rgba(23, 23, 25, 0.05);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
}
.schedule-row .status-badge { flex: none; margin-bottom: 0; }
.schedule-row.done { opacity: 0.62; }
.schedule-main { min-width: 0; }
.schedule-title {
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 17px;
  font-weight: 400;
}
.schedule-format { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.schedule-date {
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 18px;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  background: var(--surface-alt);
  border-radius: 999px;
  box-shadow: 0 2px 0 var(--soft-shadow);
}
@media (max-width: 560px) {
  .schedule-row { flex-wrap: wrap; }
  .schedule-date { margin-left: 0; }
}

/* ---------- 게시판 ---------- */
.btn-small { height: 40px; padding: 0 22px; font-size: 15px; }
.btn-small:hover { transform: translateY(2px); }
.btn-small:active { transform: translateY(3px); }

/* display:flex가 hidden 속성(UA display:none)을 덮지 않게 명시한다. */
.board-form[hidden] { display: none; }
.board-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 4px 0 var(--soft-shadow), 0 10px 18px rgba(23, 23, 25, 0.05);
  padding: 20px 22px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.board-form input,
.board-form textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  outline: none;
  resize: vertical;
}
.board-form input:focus,
.board-form textarea:focus { border-color: #ffc94d; box-shadow: 0 0 0 3px rgba(255, 201, 77, 0.25); }
.board-form .form-row { display: flex; gap: 12px; }
.board-form .form-row input { flex: 1; min-width: 0; }
.board-form .form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}
.form-error { font-size: 13px; color: var(--danger); }

.board-list { display: flex; flex-direction: column; gap: 12px; }
.board-post .post-content {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  color: #3a3d44;
}
.board-post .post-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}
.btn-plain {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
}
.btn-plain.danger:hover { color: var(--danger); }

.board-pager { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.pager-btn {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 0 var(--soft-shadow);
}
.pager-btn.active { background: #ffc94d; color: #553a00; box-shadow: 0 2px 0 #d99e0d; }

/* ---------- 좋아요·싫어요 ---------- */
.reaction-bar {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 16px 0 4px;
}
.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  padding: 0 20px;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--soft-shadow);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.reaction-btn:hover:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--soft-shadow);
}
.reaction-btn:disabled { cursor: default; opacity: 0.75; }
.reaction-btn.chosen {
  background: #ffc94d;
  color: #553a00;
  box-shadow: 0 3px 0 #d99e0d;
  opacity: 1;
}
.reaction-btn .count { font-weight: 700; }

/* ---------- 댓글 ---------- */
.comments { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.comments-heading {
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 15px;
  margin-bottom: 10px;
}
.comment-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.comment {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.comment-nick {
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 13.5px;
}
.comment-date { font-size: 11.5px; color: var(--muted); margin-right: auto; }
.comment-content {
  font-size: 13.5px;
  color: #3a3d44;
  white-space: pre-wrap;
  word-break: break-word;
}
.comment-form { display: flex; flex-direction: column; gap: 10px; }
.comment-form input {
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  outline: none;
}
.comment-form input:focus { border-color: #ffc94d; box-shadow: 0 0 0 3px rgba(255, 201, 77, 0.25); }
.comment-form .form-row { display: flex; gap: 10px; }
.comment-form .form-row input { flex: 1; min-width: 0; }
.notice-empty.small { padding: 14px 0; font-size: 13px; }

/* ---------- 홈: 게시판 최신 글 ---------- */
.home-board { display: flex; flex-direction: column; gap: 10px; }
.home-board-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 3px 0 var(--soft-shadow);
  padding: 12px 18px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.home-board-row:hover { transform: translateY(2px); box-shadow: 0 1px 0 var(--soft-shadow); }
.home-board-title {
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-board-meta { margin-left: auto; flex: none; font-size: 12px; color: var(--muted); }

/* ---------- 푸터 ---------- */
footer {
  border-top: 2px solid var(--line);
  background: var(--surface);
  margin-top: 40px;
}
footer .foot-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
footer .foot-inner > span:first-child {
  font-family: "Lilita One", "Jua", sans-serif;
  font-size: 15px;
  color: var(--ink);
}
footer a { color: var(--muted); }

@media (max-width: 560px) {
  .top-nav .nav-inner { padding: 0 14px; }
  .brand { font-size: 18px; }
  .nav-tab { padding: 8px 14px; font-size: 13px; }
  /* 좁은 화면: 텍스트를 아래 중앙으로 내리고 하단만 살짝 어둡게 */
  .hero {
    min-height: 64vh;
    align-items: flex-end;
    justify-content: center;
    padding: 140px 20px 44px;
  }
  .hero::before {
    background: linear-gradient(to bottom,
      rgba(16, 20, 34, 0) 45%, rgba(16, 20, 34, 0.66) 100%);
  }
  .hero-inner { text-align: center; align-items: center; }
  .cta-row { justify-content: center; }
  .notice .date { display: none; }
}
