/* =============================================
   하츠 팬페이지 — 공통 디자인 시스템
   화이트 + 아이스블루 (청초)
   ============================================= */

:root {
  --ice:        #5b9fe0;   /* 메인 포인트 (캐릭터 눈색) */
  --ice-deep:   #2f6bb3;   /* 진한 포인트 */
  --ice-ink:    #1e3a5f;   /* 제목 텍스트 */
  --ice-soft:   #eaf3fc;   /* 아주 옅은 블루 채움 */
  --ice-light:  #d3e6f7;   /* 보더/태그 */
  --ice-bg:     #eef5fc;   /* 페이지 배경 */
  --ice-card:   #ffffff;   /* 카드 */
  --silver:     #8aa0b8;   /* 보조 텍스트 */
  --silver-lt:  #aebccc;
  --text:       #2a3a4d;
  --text-mid:   #5b6a7d;
  --white:      #ffffff;

  --radius-lg:  22px;
  --radius-md:  14px;
  --radius-sm:  10px;
  --shadow:     0 6px 28px rgba(91, 159, 224, 0.10);
  --shadow-hover:0 12px 40px rgba(91, 159, 224, 0.20);
  --transition: 0.2s ease;

  --serif: 'Gowun Dodum', sans-serif;
  --hand:  'Gaegu', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  background:
    radial-gradient(circle at 12% 8%, #ffffff 0%, transparent 42%),
    radial-gradient(circle at 88% 4%, #e3f0fc 0%, transparent 38%),
    var(--ice-bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
}

/* ── 배경 별/눈송이 장식 ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle, rgba(91,159,224,0.18) 1.5px, transparent 1.6px),
    radial-gradient(circle, rgba(91,159,224,0.10) 1px, transparent 1.1px);
  background-size: 90px 90px, 50px 50px;
  background-position: 0 0, 25px 25px;
  opacity: 0.6;
}

/* ── 상단 네비게이션 ── */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ice-light);
  display: flex; justify-content: center;
}
.nav-inner {
  display: flex; align-items: center;
  max-width: 900px; width: 100%;
  padding: 0 14px;
}
a.nav-logo {
  font-family: var(--serif);
  font-size: 27px; font-weight: 700;
  color: var(--ice-deep);
  margin-right: auto;
  padding: 14px 6px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
  letter-spacing: -0.5px;
}
a.nav-logo .star { color: var(--ice); }
.nav a {
  padding: 18px 15px;
  font-size: 15px; font-weight: 500;
  color: var(--silver);
  text-decoration: none;
  border-bottom: 2.5px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.nav a:hover { color: var(--ice-deep); }
.nav a.active {
  color: var(--ice-deep);
  border-bottom-color: var(--ice);
}

/* ── 본문 컨테이너 ── */
.container {
  position: relative; z-index: 1;
  max-width: 900px; margin: 0 auto;
  padding: 30px 16px 90px;
  display: flex; flex-direction: column; gap: 16px;
}

/* ── 공통 카드 ── */
.card {
  background: var(--ice-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--ice-light);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-hover); }

.card-title {
  font-family: var(--serif);
  font-size: 18px; font-weight: 700;
  color: var(--ice-ink);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 9px;
}
.card-title .ic { color: var(--ice); font-size: 17px; }
.card-sub {
  font-family: var(--hand);
  font-size: 19px; color: var(--ice-deep);
  margin-left: 6px; font-weight: 400;
}

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ice); color: #fff; }
.btn-primary:hover { background: var(--ice-deep); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; border: 1.5px solid var(--ice-light); color: var(--ice-deep); }
.btn-outline:hover { background: var(--ice-soft); }

/* ── 배지/태그 ── */
.badge { display: inline-block; padding: 3px 13px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-ice { background: var(--ice-soft); color: var(--ice-deep); }
.tag {
  background: var(--ice-soft); color: var(--ice-deep);
  border-radius: 999px; padding: 4px 14px;
  font-size: 13px; font-weight: 500;
}

/* ── 테이블 ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  padding: 11px 12px; background: var(--ice-soft);
  color: var(--ice-deep); font-weight: 700;
  text-align: left; font-size: 12px;
}
th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
th:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
td { padding: 12px; border-bottom: 1px solid var(--ice-light); color: var(--text-mid); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f6fafe; }

/* ── 폼 ── */
.input {
  width: 100%; padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--ice-light);
  font-size: 14px; font-family: inherit;
  outline: none; background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus { border-color: var(--ice); box-shadow: 0 0 0 3px rgba(91,159,224,0.15); }
.input-label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--ice); letter-spacing: 0.06em;
  margin-bottom: 6px; text-transform: uppercase;
}
.form-field { margin-bottom: 13px; }

/* ── 토스트 ── */
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ice-ink); color: #fff;
  padding: 12px 28px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  opacity: 0; transition: all 0.3s;
  pointer-events: none; z-index: 999; white-space: nowrap;
  box-shadow: var(--shadow-hover);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 빈 상태 ── */
.empty { text-align: center; padding: 44px 20px; color: var(--silver); font-size: 14px; }
.empty-icon { font-size: 34px; margin-bottom: 10px; opacity: 0.6; }

/* ── 페이지 타이틀 ── */
.page-title {
  font-family: var(--serif);
  font-size: 30px; font-weight: 700; color: var(--ice-ink);
  text-align: center; margin-bottom: 4px; letter-spacing: -0.5px;
}
.page-subtitle { font-size: 13px; color: var(--silver); text-align: center; margin-bottom: 10px; }

/* ── 스피너 ── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--ice-light); border-top-color: var(--ice);
  border-radius: 50%; animation: spin 0.8s linear infinite; margin: 30px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 페이지네이션 ── */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.page-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--ice-light); background: #fff; color: var(--text-mid);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.page-btn:hover, .page-btn.active { background: var(--ice); color: #fff; border-color: var(--ice); }

/* ── 푸터 ── */
footer { text-align: center; padding: 26px; font-size: 12px; color: var(--silver-lt); position: relative; z-index: 1; }

/* ── 공통 게시물 이미지 ── */
.post-img { display: block; max-width: 100%; border-radius: var(--radius-md); margin-bottom: 12px; border: 1px solid var(--ice-light); }

/* ── 반응형 ── */
@media (max-width: 560px) {
  a.nav-logo { font-size: 22px; padding: 14px 4px; }
  .nav a { padding: 14px 9px; font-size: 13px; }
  .container { padding: 22px 12px 70px; }
  .card { padding: 18px 16px; }
  .page-title { font-size: 26px; }
}
@media (max-width: 400px) {
  a.nav-logo { font-size: 19px; }
  .nav a { padding: 13px 6px; font-size: 12px; }
}
