/* ankieditor 공통 사이트 스타일 — macOS 룩 (index + 정보 페이지) */
/* 편집기 내부 스타일은 index.html <style>에 있음. 여기는 페이지 껍데기만. */

:root {
  --mac-win-border: rgba(0, 0, 0, .18);
  --mac-bar-bg: #e9e7ea;
  --mac-bar-text: #333;
  --mac-page-text: #1d1d1f;
  --mac-body-bg: #ffffff;
}
body.dark {
  --mac-win-border: rgba(0, 0, 0, .55);
  --mac-bar-bg: #3a3a3c;
  --mac-bar-text: #ddd;
  --mac-page-text: #e8e8ea;
  --mac-body-bg: #2a2a2c;
}

/* ── macOS 데스크톱 배경 (이미지 없이 그라데이션 월페이퍼) ── */
body {
  background: linear-gradient(160deg, #a8c0d8 0%, #7f9cc0 35%, #5d7aa8 70%, #4a5f8a 100%);
  background-attachment: fixed;
}
body.dark {
  background: linear-gradient(160deg, #2e3440 0%, #232936 40%, #1a1f2c 75%, #12151f 100%);
  background-attachment: fixed;
}

/* ── 상단 메뉴바 = 사이트 내비게이션 ── */
.menubar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 38px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 18px;
  background: rgba(250, 250, 250, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, .12);
  color: var(--mac-bar-text);
  font-size: 13px;
  overflow-x: auto;
  white-space: nowrap;
}
body.dark .menubar {
  background: rgba(28, 28, 30, .72);
  border-bottom-color: rgba(255, 255, 255, .08);
}
.menubar a {
  color: inherit;
  text-decoration: none;
  opacity: .8;
}
.menubar a:hover { opacity: 1; }
.menubar a.logo { font-weight: 700; opacity: 1; }
.menubar .mb-spacer { flex: 1; }
.menubar button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: inherit;
}

/* ── Mac 창 공통 크롬 ── */
.mac-window {
  border-radius: 12px;
  border: 1px solid var(--mac-win-border);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .38), 0 2px 8px rgba(0, 0, 0, .18);
  overflow: hidden;
}
.mac-titlebar {
  flex: 0 0 auto;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--mac-bar-bg);
  color: var(--mac-bar-text);
  font-size: 12.5px;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
}
.mac-dots { display: inline-flex; gap: 8px; }
.mac-dots i {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.mac-dots i:nth-child(1) { background: #ff5f57; }
.mac-dots i:nth-child(2) { background: #febc2e; }
.mac-dots i:nth-child(3) { background: #28c840; }
.mac-title { font-weight: 600; }

/* ── index: 편집기 창 배치 ── */
.app-window {
  display: flex;
  flex-direction: column;
  width: calc(100% - 36px);
  max-width: 1360px;
  margin: 16px auto 0 auto;
  height: calc(100vh - 92px);
  min-height: 540px;
  background: var(--bg); /* index.html의 기존 변수 사용 */
}

/* ── index 하단 소개/링크 카드 ── */
.below {
  width: calc(100% - 36px);
  max-width: 900px;
  margin: 48px auto 0 auto;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.below h1 { font-size: 22px; margin-bottom: 12px; }
.below p { line-height: 1.75; font-size: 14px; }
.link-cards {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
  text-shadow: none;
}
.link-cards a {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--mac-body-bg);
  color: var(--mac-page-text);
  text-decoration: none;
  border: 1px solid var(--mac-win-border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.link-cards a:hover { transform: translateY(-2px); }
.link-cards a strong { font-size: 15px; }
.link-cards a span { font-size: 12.5px; opacity: .75; line-height: 1.5; }

/* ── 공통 푸터 ── */
.site-footer {
  text-align: center;
  padding: 36px 16px 44px 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.site-footer a { color: inherit; }
.site-footer p { margin-top: 8px; opacity: .8; }

/* ── 정보 페이지: 글 창 + 본문 타이포그래피 ── */
.info-window {
  width: calc(100% - 36px);
  max-width: 780px;
  margin: 60px auto 0 auto;
}
.info-body {
  background: var(--mac-body-bg);
  color: var(--mac-page-text);
  padding: 30px 34px 38px 34px;
  font-size: 14px;
}
.info-body h1 { font-size: 24px; margin-bottom: 6px; }
.info-body > p.lead { opacity: .7; margin-bottom: 8px; }
.info-body article {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--mac-win-border);
}
.info-body article h2 { font-size: 18px; margin-bottom: 10px; }
.info-body article h3 { font-size: 15px; margin: 14px 0 6px 0; }
.info-body article p, .info-body article li { line-height: 1.8; }
.info-body article ol, .info-body article ul { padding-left: 22px; margin: 8px 0; }
.info-body article + article { margin-top: 30px; }
.info-body details { margin: 10px 0; }
.info-body details summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px 0;
}
.info-body details p { padding: 4px 0 8px 16px; line-height: 1.8; }
.info-body code {
  font-family: Consolas, monospace;
  background: rgba(127, 127, 127, .15);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: .92em;
}

@media (max-width: 700px) {
  .app-window { width: calc(100% - 12px); height: calc(100vh - 80px); }
  .info-window { width: calc(100% - 12px); margin-top: 50px; }
  .info-body { padding: 20px 18px 28px 18px; }
}
