/* 글로벌 CSS - 캐싱 가능 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #252530;
  --text-primary: #ffffff;
  --text-secondary: #e8e8ea;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --border: #3a3a45;
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* 테이블 전역 스타일 강제 적용 */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 32px 0;
}

table {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  border: 2px solid #4b5563 !important;
}

th, td {
  border: 1px solid #4b5563 !important;
  padding: 12px 16px !important;
  text-align: left !important;
}

th {
  background: rgba(99, 102, 241, 0.15) !important;
  font-weight: 700 !important;
}

tbody tr:hover {
  background: rgba(99, 102, 241, 0.05) !important;
}

/* 이미지 전역 스타일 */
img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
}

/* 포스트 본문 h2 스타일 (포스트 상세 페이지만) */
article.post-detail .post-content h2 {
  border-bottom: 2px solid var(--accent) !important;
  padding-bottom: 12px !important;
  margin-top: 40px !important;
  margin-bottom: 24px !important;
}

/* 리스트 스타일 - 적절한 여백 */
.post-content ul,
.post-content ol {
  list-style-position: outside !important;
  margin-left: 0 !important;
  padding-left: 24px !important;
}

/* 이미지 figure 스타일 */
.post-content figure {
  margin: 32px auto !important;
  padding: 0 !important;
  max-width: 100% !important;
  width: fit-content !important;
  display: block !important;
}

.post-content figure.align-left {
  text-align: left !important;
}

.post-content figure.align-center {
  text-align: center !important;
}

.post-content figure.align-right {
  text-align: right !important;
}

.post-content figure img {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 0 !important;
  margin: 0 auto !important;
}

.post-content figcaption {
  margin-top: 8px !important;
  font-size: 0.9rem !important;
  color: var(--text-secondary) !important;
  font-style: italic !important;
  text-align: center !important;
}
