/* ===================== */
/* CSS 변수 정의         */
/* ===================== */
:root {
  --bg-color: #f5f5f5;
  --text-color: #333333;
  --card-bg: #ffffff;
  --btn-bg: #ff6b6b;
  --btn-text: #ffffff;
  --btn-hover: #ee5a5a;
  --btn-secondary-bg: #4ecdc4;
  --btn-secondary-hover: #45b7aa;
  --toggle-bg: #e0e0e0;
  --toggle-circle: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
  --border-color: #e0e0e0;
  --accent-color: #6c5ce7;
  --accent-hover: #5b4cdb;
  --tag-bg: #e8e5ff;
  --tag-text: #6c5ce7;
}

[data-theme="dark"] {
  --bg-color: #1a1a2e;
  --text-color: #f5f5f5;
  --card-bg: #16213e;
  --btn-bg: #ff6b6b;
  --btn-text: #ffffff;
  --btn-hover: #ee5a5a;
  --btn-secondary-bg: #00e5c9;
  --btn-secondary-hover: #00ccb3;
  --toggle-bg: #4a4a6a;
  --toggle-circle: #1a1a2e;
  --shadow: rgba(0, 0, 0, 0.3);
  --border-color: #2a2a4e;
  --accent-color: #a29bfe;
  --accent-hover: #8c83f7;
  --tag-bg: #2a2a4e;
  --tag-text: #a29bfe;
}

/* ===================== */
/* 리셋 & 기본           */
/* ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  padding: 20px;
  padding-top: 70px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

/* ===================== */
/* 내비게이션             */
/* ===================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background-color: var(--card-bg);
  box-shadow: 0 2px 10px var(--shadow);
  padding: 0 20px;
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: var(--tag-bg);
  color: var(--accent-color);
}

.nav-link.active {
  background-color: var(--accent-color);
  color: #fff;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 언어 선택 드롭다운 */
.lang-selector {
  position: relative;
}

.lang-btn {
  background: none;
  border: 2px solid var(--border-color);
  color: var(--text-color);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lang-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px var(--shadow);
  overflow: hidden;
  z-index: 300;
  min-width: 120px;
}

.lang-dropdown.open {
  display: block;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-color);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease;
}

.lang-option:hover {
  background-color: var(--tag-bg);
}

.lang-option.active {
  color: var(--accent-color);
  font-weight: 700;
}

/* 햄버거 메뉴 */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background-color: var(--card-bg);
  box-shadow: 0 4px 15px var(--shadow);
  padding: 10px 20px;
  z-index: 199;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu .nav-link {
  display: block;
  padding: 12px 16px;
  font-size: 0.95rem;
  border-radius: 8px;
}

/* ===================== */
/* 테마 토글              */
/* ===================== */
.theme-toggle {
  width: 50px;
  height: 26px;
  background-color: var(--toggle-bg);
  border-radius: 13px;
  border: none;
  cursor: pointer;
  position: relative;
  outline: none;
  box-shadow: 0 2px 5px var(--shadow);
  flex-shrink: 0;
}

.theme-toggle::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--toggle-circle);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .theme-toggle::before {
  transform: translateX(24px);
  background-color: #ffd700;
}

/* ===================== */
/* 헤딩                   */
/* ===================== */
h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 40px;
}

/* ===================== */
/* 공통 애니메이션        */
/* ===================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================== */
/* 댓글 섹션              */
/* ===================== */
.comments-section {
  max-width: 700px;
  margin: 60px auto 0;
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.comments-section h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.comments-subtitle {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 30px;
}

#disqus_thread {
  text-align: left;
}

/* ===================== */
/* 연락 폼               */
/* ===================== */
.contact-section {
  max-width: 600px;
  margin: 60px auto 0;
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.contact-section h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.contact-subtitle {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 30px;
}

.contact-form {
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: inherit;
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--btn-secondary-bg);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-color);
  opacity: 0.5;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  font-weight: 600;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background-color: var(--btn-hover);
  transform: translateY(-2px);
}

/* ===================== */
/* 푸터                   */
/* ===================== */
.site-footer {
  max-width: 800px;
  margin: 60px auto 0;
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
  list-style: none;
}

.footer-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.footer-copy {
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ===================== */
/* SEO 정보 섹션          */
/* ===================== */
.seo-info-section {
  max-width: 700px;
  margin: 20px auto 30px;
  text-align: left;
}

.seo-info-section details {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.seo-info-section summary {
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-color);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.seo-info-section summary::-webkit-details-marker {
  display: none;
}

.seo-info-section summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-color);
  transition: transform 0.2s ease;
}

.seo-info-section details[open] summary::after {
  content: '-';
}

.seo-info-section .seo-info-content {
  padding: 0 20px 20px;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-color);
  opacity: 0.85;
}

.seo-info-section .seo-info-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 18px 0 8px;
  color: var(--accent-color);
  opacity: 1;
}

.seo-info-section .seo-info-content h3:first-child {
  margin-top: 0;
}

.seo-info-section .seo-info-content p {
  margin: 8px 0;
}

.seo-info-section .seo-info-content ul,
.seo-info-section .seo-info-content ol {
  margin: 8px 0;
  padding-left: 20px;
}

.seo-info-section .seo-info-content li {
  margin-bottom: 4px;
}

.seo-info-section .seo-info-content strong {
  color: var(--text-color);
  opacity: 1;
}

/* ===================== */
/* 페이지 본문 콘텐츠       */
/* ===================== */
.page-content {
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.9;
  font-size: 1rem;
  text-align: left;
}

.page-content h2 {
  font-size: 1.3rem;
  margin: 30px 0 12px;
  color: var(--accent-color);
}

.page-content p {
  margin: 8px 0;
}

.page-content ul,
.page-content ol {
  margin: 10px 0 10px 20px;
}

.page-content li {
  margin-bottom: 6px;
}

.page-content a {
  color: var(--accent-color);
  text-decoration: underline;
}

.page-content .feature-list {
  list-style: none;
  padding: 0;
}

.page-content .feature-list li {
  margin-bottom: 12px;
}

/* ===================== */
/* 반응형                 */
/* ===================== */
@media (max-width: 768px) {
  body {
    padding-top: 60px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  /* 내비게이션: 햄버거 */
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .lang-btn {
    font-size: 0.75rem;
    padding: 3px 8px;
  }

  /* SEO 정보 */
  .seo-info-section {
    margin: 15px auto 25px;
  }

  .seo-info-section summary {
    padding: 14px 16px;
    font-size: 0.9rem;
  }

  .seo-info-section .seo-info-content {
    padding: 0 16px 16px;
    font-size: 0.88rem;
  }

  /* 페이지 본문 */
  .page-content {
    font-size: 0.95rem;
  }

  .page-content h2 {
    font-size: 1.2rem;
  }

  /* 댓글/연락 */
  .comments-section,
  .contact-section {
    margin-top: 40px;
    padding: 30px 15px;
  }

  .comments-section h2,
  .contact-section h2 {
    font-size: 1.5rem;
  }
}
