/* =========================================
   Voxliber — Global Base Styles
   ========================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 디자인 토큰은 variables.css가 단일 진실 공급원(SSOT).
   과거 이 자리에 있던 중복 :root 선언은 제거함 — 값이 모두 variables.css와 동일했고,
   고유했던 --accent-soft / --bg-card-hover 는 variables.css로 이관, 미사용 --radius / --shadow 는 폐기. */

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  font-family: 'Noto Sans KR', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== CONTENT CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 20px;
}

/* ===== BOOK COVERS ===== */
.book-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 0;
  background: var(--bg-card);
}

.cover-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-soft), rgba(59,130,246,0.08));
  border-radius: 0;
  color: var(--text-muted);
  font-size: 1.8rem;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-green  { background: rgba(34,197,94,0.12); color: #16a34a; }
.badge-blue   { background: rgba(59,130,246,0.12); color: #2563eb; }
.badge-yellow { background: rgba(234,179,8,0.12); color: #b45309; }
.badge-red    { background: rgba(239,68,68,0.12); color: #dc2626; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 0;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-tertiary, #f5f5f5);
  color: var(--text-primary);
  border: 1px solid var(--border-color, #e8e8e8);
}
.btn-secondary:hover {
  background: var(--bg-hover, #ebebeb);
}

.btn-ghost {
  background: none;
  color: var(--text-secondary);
  border: 1px solid var(--border-color, #e8e8e8);
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-hover, #bbb);
}

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 13px 28px; font-size: 0.95rem; }

/* ===== FORMS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  background: var(--bg-tertiary, #f5f5f5);
  border: 1px solid var(--border-color, #e8e8e8);
  border-radius: 0;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus {
  border-color: rgba(91, 76, 245, 0.5);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* ===== ALERTS ===== */
.messages-container {
  padding: 12px 24px 0;
}

.alert-msg {
  padding: 10px 16px;
  border-radius: 0;
  font-size: 0.84rem;
  margin-bottom: 8px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.alert-success  { background: rgba(34,197,94,0.1);   color: #16a34a; border: 1px solid rgba(34,197,94,0.25); }
.alert-error,
.alert-danger   { background: rgba(239,68,68,0.1);   color: #dc2626; border: 1px solid rgba(239,68,68,0.25); }
.alert-warning  { background: rgba(234,179,8,0.1);   color: #b45309; border: 1px solid rgba(234,179,8,0.25); }
.alert-info     { background: rgba(59,130,246,0.1);  color: #2563eb; border: 1px solid rgba(59,130,246,0.25); }

/* ===== SECTION HEADERS ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-link {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(91,76,245,0.3); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: rgba(91,76,245,0.5); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.85rem;
}

/* ===== LOADING ===== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(91,76,245,0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== UTILITY ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.fw-700 { font-weight: 700; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* ═══════════════════════════
   GLOBAL FOOTER
═══════════════════════════ */
.vx-footer {
  background: #111;
  margin-top: 10px;
  padding: 56px 0 32px;
  border-top: 1px solid #1a1a1a;
}
.vx-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 48px;
}
.vx-footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.vx-footer-logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .04em;
  margin-bottom: 14px;
}
.vx-footer-desc {
  font-size: .8rem;
  color: rgba(255,255,255,.35);
  line-height: 1.85;
  font-weight: 300;
}
.vx-footer-col h4 {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(255,255,255,.26);
  margin-bottom: 16px;
}
.vx-footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.vx-footer-col a {
  font-size: .8rem;
  color: rgba(255,255,255,.42);
  transition: color .18s;
  text-decoration: none;
  position: relative;
}
/* 글자 높이가 11px 뿐이라 손가락으로 정확히 짚기 어려웠다. 글자 크기와 간격은
   그대로 두고 누를 수 있는 범위만 넓힌다(padding 으로 늘리면 푸터 높이가 바뀐다).
   링크 사이 간격이 11px 이라 22px 이상으로는 못 넓힌다 — 더 키우면 옆 링크와
   겹쳐서 엉뚱한 데가 눌린다. */
.vx-footer-col a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 22px;
}
.vx-footer-col a:hover { color: #a5b4fc; }
.vx-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.vx-footer-copy {
  font-size: .72rem;
  color: rgba(255,255,255,.2);
}
.vx-footer-links {
  display: flex;
  gap: 18px;
}
.vx-footer-links a {
  font-size: .72rem;
  color: rgba(255,255,255,.28);
  text-decoration: none;
  transition: color .18s;
}
.vx-footer-links a:hover { color: rgba(255,255,255,.6); }

@media (max-width: 900px) {
  html { font-size: 13px; }
  .vx-footer-inner { padding: 0 28px; }
  .vx-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  html { font-size: 12px; }
  .vx-footer { padding: 40px 0 24px; margin-top: 56px; }
  .vx-footer-inner { padding: 0 20px; }
  .vx-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .vx-footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}


/* ─────────────────────────────────────────────────────────────
   2026-10-06 정적 이관. 서버가 없다 — 로그인·댓글·북마크는 동작하지 않는다.
   Pages 는 없는 주소에 index.html 을 200 으로 주므로, 버튼을 눌러도 404 가
   아니라 **첫화면으로 조용히 돌아간다**. 404 보다 헷갈려서 아예 감춘다.
   되살리려면 이 블록만 지우면 된다.
   ───────────────────────────────────────────────────────────── */
.sidebar-guest .guest-intro,
.sidebar-guest .oauth-buttons,
.sidebar-guest .terms-of-all,
.cd-unauth-msg,
.cd-bm-empty { display: none !important; }

/* ─────────────────────────────────────────────────────────────
   2026-10-06 사이드바 제거.
   로그인 UI 를 감추고 나니 사이드바에 로고와 「홈」만 남아, 고정 폭만
   차지하고 있었다. 사이드바를 들어내고 **모바일 상단바를 모든 화면에서**
   쓴다 — 거기에 로고(홈)와 검색이 이미 들어 있다. 햄버거는 열 것이
   없으니 같이 감춘다. 레이아웃은 테마가 이미 가진 `no-sidebar` 꼴이다.
   되돌리려면 이 블록만 지운다.
   ───────────────────────────────────────────────────────────── */
.sidebar,
.sidebar-overlay,
.mobile-menu-btn { display: none !important; }

.page-wrapper { margin-left: 0 !important; }

.mobile-topbar {
  display: flex !important;
  gap: 16px;
}
.mobile-topbar-logo { font-weight: 700; letter-spacing: .04em; }

/* ─────────────────────────────────────────────────────────────
   2026-10-06 댓글 숨김.
   서버가 없어 **쓸 수가 없다**. 그런데 "아직 댓글이 없습니다. 첫 댓글을
   남겨보세요!" 가 떠 있어서, 눌러도 아무 일이 안 생기는 자리를 권하고 있었다.
   섹션과 그리로 가는 목차 링크를 같이 감춘다.
   ───────────────────────────────────────────────────────────── */
.cd-comments-section,
#section-comments,
a[href="#section-comments"],
a[href="#cd-section-comments"] { display: none !important; }
