/**
 * Custom Styles
 * Zyss Theme
 */

/* ===================================
   Header
   =================================== */

.site-header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.site-branding .site-title {
  margin: 0;
  font-size: 1.5em;
  font-weight: 700;
}

.site-branding .site-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.site-description {
  margin: 0;
  font-size: 0.9em;
  color: var(--text-secondary);
}

/* ===================================
   Sidebar Search
   =================================== */

.sidebar-search {
  margin-bottom: 30px;
}

.sidebar-search form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-search input[type="search"] {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
}

.sidebar-search input[type="submit"] {
  width: 100%;
  padding: 10px 20px;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.sidebar-search input[type="submit"]:hover {
  background-color: var(--bg-secondary);
  border-color: var(--text-tertiary);
}

/* ===================================
   Navigation
   =================================== */

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 30px;
}

.main-navigation a {
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 0;
  display: block;
  transition: color 0.2s ease;
}

.main-navigation a:hover {
  color: var(--link-color);
}

.main-navigation .current-menu-item a {
  color: var(--link-color);
  font-weight: 600;
}

/* ===================================
   Header Controls
   =================================== */

.header-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.font-size-controls {
  display: flex;
  gap: 5px;
}

.font-btn {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.font-btn:hover {
  background-color: var(--bg-tertiary);
}

.theme-toggle-btn {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 18px;
}

.theme-toggle-btn:hover {
  background-color: var(--bg-tertiary);
}

.light-icon, .dark-icon {
  display: inline-block;
}

/* ===================================
   Mobile Header Actions
   =================================== */

.mobile-header-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.mobile-search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.mobile-search-toggle:hover {
  color: var(--link-color);
}

.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===================================
   Mobile Slide Menu
   =================================== */

.mobile-slide-menu {
  display: none;
}

.mobile-menu-overlay {
  display: none;
}

@media (max-width: 768px) {
  .mobile-slide-menu {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: var(--bg-primary);
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .mobile-slide-menu.active {
    transform: translateX(0);
  }

  .mobile-slide-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
  }

  .mobile-slide-menu-title {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-primary);
  }

  .mobile-slide-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
  }

  .mobile-slide-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
  }

  .mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .mobile-nav-list li {
    border-bottom: 1px solid var(--border-color);
  }

  .mobile-nav-list li:last-child {
    border-bottom: none;
  }

  .mobile-nav-list a {
    display: block;
    padding: 14px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95em;
    transition: background-color 0.2s ease;
  }

  .mobile-nav-list a:hover {
    background-color: var(--bg-secondary);
  }

  .mobile-nav-list .current-menu-item > a {
    color: var(--link-color);
    font-weight: 600;
    background-color: var(--bg-secondary);
  }

  /* 서브메뉴 */
  .mobile-nav-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .mobile-nav-list .sub-menu a {
    padding-left: 40px;
    font-size: 0.9em;
    color: var(--text-secondary);
  }

  .mobile-nav-list .sub-menu a:hover {
    color: var(--text-primary);
  }

  .mobile-slide-menu-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
  }

  .mobile-theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9em;
  }

  .mobile-theme-toggle-btn .toggle-label {
    flex: 1;
    text-align: left;
  }

  .mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

/* 다크모드 모바일 슬라이드 메뉴 */
[data-theme="dark"] .mobile-slide-menu {
  background-color: #1a1a1a;
}

[data-theme="dark"] .mobile-nav-list a:hover,
[data-theme="dark"] .mobile-nav-list .current-menu-item > a {
  background-color: #2d2d2d;
}

[data-theme="dark"] .mobile-theme-toggle-btn {
  background-color: #2d2d2d;
  border-color: #404040;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mobile-slide-menu {
    background-color: #1a1a1a;
  }

  :root:not([data-theme="light"]) .mobile-nav-list a:hover,
  :root:not([data-theme="light"]) .mobile-nav-list .current-menu-item > a {
    background-color: #2d2d2d;
  }

  :root:not([data-theme="light"]) .mobile-theme-toggle-btn {
    background-color: #2d2d2d;
    border-color: #404040;
  }
}

/* ===================================
   Mobile Search Overlay
   =================================== */

.mobile-search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

.mobile-search-overlay.active {
  display: flex;
}

.mobile-search-inner {
  width: 90%;
  max-width: 500px;
  position: relative;
}

.mobile-search-inner form {
  display: flex;
  background-color: var(--bg-primary);
  border-radius: 8px;
  overflow: hidden;
}

.mobile-search-inner input[type="search"] {
  flex: 1;
  padding: 14px 16px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
}

.mobile-search-inner button[type="submit"] {
  padding: 14px 16px;
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.mobile-search-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  padding: 4px 8px;
}

/* ===================================
   Main Content
   =================================== */

.site-main {
  min-height: 70vh;
  padding: 60px 0;
}

/* ===================================
   Posts List
   =================================== */

.posts-list {
  display: grid;
  gap: 60px;
}

.post-item {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 60px;
}

.post-item:last-child {
  border-bottom: none;
}

.post-thumbnail {
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 8px;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.post-thumbnail:hover img {
  transform: scale(1.05);
}

.entry-categories {
  margin-bottom: 10px;
}

.category-badge {
  display: inline-block;
  background-color: var(--link-color);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85em;
  margin-right: 8px;
  margin-bottom: 8px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.category-badge:hover {
  background-color: var(--link-hover);
  color: #ffffff;
}

.entry-title {
  margin-bottom: 15px;
  line-height: 1.3;
}

.entry-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.entry-title a:hover {
  color: var(--link-color);
}

.entry-meta {
  color: var(--text-secondary);
  font-size: 0.9em;
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.entry-summary {
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: var(--line-height);
}

.read-more {
  display: inline-block;
  color: var(--link-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.read-more:hover {
  color: var(--link-hover);
}

/* ===================================
   Single Post
   =================================== */

.single-post .entry-header {
  text-align: center;
  margin-bottom: 40px;
}

.single-post .entry-title {
  font-size: 2.5em;
  margin-bottom: 20px;
}

.single-post .entry-meta {
  justify-content: center;
}

.single-post .entry-thumbnail {
  margin-bottom: 60px;
  border-radius: 8px;
  overflow: hidden;
}

.single-post .entry-thumbnail .image-credit {
  text-align: right;
  font-size: 0.75rem;
  color: #999;
  margin: 6px 4px 0 0;
}

.single-post .entry-thumbnail .image-credit a {
  color: #999;
  text-decoration: none;
}

.single-post .entry-thumbnail .image-credit a:hover {
  color: #666;
  text-decoration: underline;
}

/* ===================================
   Language Tabs (한국어/English)
   =================================== */

.lang-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
}

.lang-tab {
  padding: 10px 24px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.lang-tab:hover {
  color: var(--text-primary);
}

.lang-tab.active {
  color: var(--link-color);
  border-bottom-color: var(--link-color);
  font-weight: 600;
}

.lang-content {
  display: none;
}

.lang-content.active {
  display: block;
}

.single-post .entry-content {
  font-size: var(--font-size-base);
  line-height: var(--line-height);
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
  margin-top: 2em;
  margin-bottom: 1em;
}

.single-post .entry-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 40px auto;
  border-radius: 8px;
}

.single-post .entry-content blockquote {
  border-left: 4px solid var(--link-color);
  padding-left: 20px;
  margin: 40px 0;
  font-style: italic;
  color: var(--text-secondary);
}

.single-post .entry-content code {
  background-color: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.single-post .entry-content pre {
  background-color: var(--bg-secondary);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 40px 0;
}

.single-post .entry-content pre code {
  background-color: transparent;
  padding: 0;
}

.entry-tags {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.entry-tags h3 {
  font-size: 1.2em;
  margin-bottom: 15px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-block;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.9em;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tag:hover {
  background-color: var(--link-color);
  color: #ffffff;
}

/* ===================================
   Post Navigation
   =================================== */

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 80px;
  margin-bottom: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.post-navigation a {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.post-navigation a:hover {
  background-color: var(--bg-tertiary);
}

.nav-label {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.nav-title {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-next {
  text-align: right;
}

/* ===================================
   Pagination
   =================================== */

.pagination {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pagination .page-numbers {
  display: inline-block;
  padding: 10px 15px;
  background-color: var(--bg-secondary);
  border-radius: 4px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background-color: var(--link-color);
  color: #ffffff;
}

/* ===================================
   Floating UI
   =================================== */

.floating-ui {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.floating-ui.visible {
  opacity: 1;
  visibility: visible;
}

.floating-btn {
  width: 50px;
  height: 50px;
  background-color: var(--link-color);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.floating-btn:hover {
  background-color: var(--link-hover);
  transform: scale(1.1);
}

/* ===================================
   Footer
   =================================== */

.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 20px 0 20px;
  margin-top: 100px;
}

.footer-bottom {
  margin-top: 10px;
}

.footer-notice {
  padding: 15px 0 20px;
  color: #666;
  font-size: 0.85em;
  line-height: 1.7;
  text-align: center;
}

.footer-copyright {
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-copyright p {
  margin: 5px 0;
  color: #666;
  font-size: 0.85em;
}

.footer-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}

.footer-navigation a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9em;
}

.footer-navigation a:hover {
  color: var(--link-color);
}

/* ===================================
   404 Page
   =================================== */

.error-404-content {
  text-align: center;
  padding: 80px 20px;
}

.error-404-content h1 {
  font-size: 8em;
  margin-bottom: 0;
  color: var(--text-tertiary);
}

.error-404-content h2 {
  font-size: 2em;
  margin-bottom: 20px;
}

.error-404-actions {
  margin: 40px 0;
}

.button {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--link-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.button:hover {
  background-color: var(--link-hover);
  color: #ffffff;
}

.error-404-search,
.error-404-recent {
  max-width: 600px;
  margin: 40px auto;
  text-align: left;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1024px) {
  :root {
    --font-size-base: 16px;
  }

  .container {
    padding: 0 15px;
  }
}

@media (max-width: 768px) {
  :root {
    --paragraph-spacing: 60px;
  }

  /* 이미지 넘침 방지 */
  body {
    overflow-x: hidden;
  }

  .entry-content img,
  .post-thumbnail img,
  .entry-thumbnail img {
    max-width: 100%;
    height: auto;
    width: auto;
  }

  .entry-content,
  .single-post .entry-content {
    overflow-x: hidden;
    word-break: break-word;
  }

  .entry-content iframe,
  .entry-content video,
  .entry-content embed,
  .entry-content object {
    max-width: 100%;
  }

  .header-inner {
    flex-wrap: nowrap;
  }

  /* 데스크탑 네비게이션 숨김 (모바일에서는 슬라이드 메뉴 사용) */
  .main-navigation {
    display: none;
  }

  /* 모바일 버튼 그룹 표시 */
  .mobile-header-actions {
    display: flex;
  }

  /* 데스크탑 전용 요소 숨김 */
  .header-controls {
    display: none;
  }

  .font-size-controls {
    display: none;
  }

  /* 사이드바 숨김 */
  .sidebar {
    display: none !important;
  }

  .content-wrapper.with-sidebar {
    grid-template-columns: 1fr !important;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .nav-next {
    text-align: left;
  }

  .footer-bottom {
    text-align: center;
  }

  .floating-ui {
    right: 10px;
    bottom: 10px;
  }

  .floating-btn {
    width: 45px;
    height: 45px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  :root {
    --font-size-base: 15px;
    --paragraph-spacing: 50px;
  }

  .site-header {
    padding: 15px 0;
  }

  .site-branding .site-title {
    font-size: 1.2em;
  }

  .site-description {
    display: none;
  }

  .single-post .entry-title {
    font-size: 1.6em;
  }

  .error-404-content h1 {
    font-size: 5em;
  }
}

/* ===================================
   Sidebar Layout
   =================================== */

.content-wrapper.with-sidebar {
  display: grid;
  gap: 40px;
}

/* 사이드바 오른쪽 (기본) */
.sidebar-right .content-wrapper.with-sidebar {
  grid-template-columns: 1fr 300px;
}

.sidebar-right .main-content {
  order: 1;
}

.sidebar-right .sidebar {
  order: 2;
}

/* 사이드바 왼쪽 */
.sidebar-left .content-wrapper.with-sidebar {
  grid-template-columns: 300px 1fr;
}

.sidebar-left .main-content {
  order: 2;
}

.sidebar-left .sidebar {
  order: 1;
}

/* 사이드바 없음 */
.no-sidebar .content-wrapper.with-sidebar {
  grid-template-columns: 1fr;
}

.no-sidebar .sidebar {
  display: none;
}

/* ===================================
   Sidebar Styles
   =================================== */

.sidebar {
  background-color: var(--bg-secondary);
  padding: 25px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* 워드프레스 검색 블록 숨김 */
.sidebar .wp-block-search {
  display: none !important;
}

.sidebar .widget {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar .widget:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.sidebar .widget-title {
  font-size: 1.2em;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--link-color);
}

/* 사이드바 네비게이션 */
.sidebar-navigation .widget-title {
  margin-bottom: 15px;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-menu li {
  margin-bottom: 10px;
}

.sidebar-menu a {
  display: block;
  padding: 10px 15px;
  color: var(--text-primary);
  text-decoration: none;
  background-color: var(--bg-primary);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sidebar-menu a:hover {
  background-color: var(--link-color);
  color: #ffffff;
  padding-left: 20px;
}

.sidebar-menu .current-menu-item > a {
  background-color: var(--link-color);
  color: #ffffff;
  font-weight: 600;
}

/* 서브메뉴 */
.sidebar-menu .sub-menu {
  list-style: none;
  margin: 10px 0 0 20px;
  padding: 0;
}

.sidebar-menu .sub-menu a {
  font-size: 0.9em;
  padding: 8px 12px;
}

/* 반응형 - 사이드바 */
@media (max-width: 1024px) {
  .content-wrapper.with-sidebar {
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    order: 3 !important;
  }

  .main-content {
    order: 1 !important;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none !important;
  }
}

/* ===================================
   다크모드 전용 스타일
   =================================== */

[data-theme="dark"] .category-badge {
  background-color: #2d2d2d;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .category-badge:hover {
  background-color: #3a3a3a;
  color: var(--text-primary);
}

[data-theme="dark"] .sidebar {
  background-color: #1a1a1a;
  border-color: #2d2d2d;
}

[data-theme="dark"] .sidebar-menu a:hover {
  background-color: #2d2d2d;
  color: var(--text-primary);
}

[data-theme="dark"] .sidebar-menu .current-menu-item > a {
  background-color: #2d2d2d;
  color: var(--text-primary);
}

[data-theme="dark"] .font-btn,
[data-theme="dark"] .theme-toggle-btn {
  background-color: #1a1a1a;
  border-color: #2d2d2d;
}

[data-theme="dark"] .font-btn:hover,
[data-theme="dark"] .theme-toggle-btn:hover {
  background-color: #2d2d2d;
}

[data-theme="dark"] .floating-btn {
  background-color: #2d2d2d;
  color: var(--text-primary);
  border: 1px solid #3a3a3a;
}

[data-theme="dark"] .floating-btn:hover {
  background-color: #3a3a3a;
}

[data-theme="dark"] .lang-tabs {
  border-bottom-color: #2d2d2d;
}

[data-theme="dark"] .lang-tab {
  color: #999;
}

[data-theme="dark"] .lang-tab:hover {
  color: var(--text-primary);
}

[data-theme="dark"] .lang-tab.active {
  color: var(--link-color);
  border-bottom-color: var(--link-color);
}

/* OS 다크모드 자동 감지 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .category-badge {
    background-color: #2d2d2d;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
  }

  :root:not([data-theme="light"]) .category-badge:hover {
    background-color: #3a3a3a;
    color: var(--text-primary);
  }

  :root:not([data-theme="light"]) .sidebar {
    background-color: #1a1a1a;
    border-color: #2d2d2d;
  }

  :root:not([data-theme="light"]) .sidebar-menu a:hover {
    background-color: #2d2d2d;
    color: var(--text-primary);
  }

  :root:not([data-theme="light"]) .sidebar-menu .current-menu-item > a {
    background-color: #2d2d2d;
    color: var(--text-primary);
  }

  :root:not([data-theme="light"]) .font-btn,
  :root:not([data-theme="light"]) .theme-toggle-btn {
    background-color: #1a1a1a;
    border-color: #2d2d2d;
  }

  :root:not([data-theme="light"]) .font-btn:hover,
  :root:not([data-theme="light"]) .theme-toggle-btn:hover {
    background-color: #2d2d2d;
  }

  :root:not([data-theme="light"]) .floating-btn {
    background-color: #2d2d2d;
    color: var(--text-primary);
    border: 1px solid #3a3a3a;
  }

  :root:not([data-theme="light"]) .floating-btn:hover {
    background-color: #3a3a3a;
  }
}

/* ===================================
   댓글 폼
   =================================== */

.comment-respond {
  max-width: 100%;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.comment-form p {
  margin-bottom: 12px;
}

.comment-form label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9em;
  color: var(--text-secondary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.95em;
  box-sizing: border-box;
}

.comment-form textarea#comment {
  width: 100%;
  padding: 10px 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.95em;
  box-sizing: border-box;
  resize: vertical;
}

.comment-form input[type="submit"] {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px 24px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
}

/* 참고 기사 섹션 */
.entry-references {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.entry-references details summary {
  cursor: pointer;
  font-size: 0.85em;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
  list-style: none;
}

.entry-references details summary::before {
  content: '▶ ';
  font-size: 0.75em;
}

.entry-references details[open] summary::before {
  content: '▼ ';
}

.entry-references ol {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

.entry-references ol li {
  margin-bottom: 4px;
  font-size: 0.82em;
  line-height: 1.6;
}

.entry-references ol li a {
  color: var(--text-secondary);
  text-decoration: underline;
}

/* 사이드바 최신글 한줄 말줄임 */
.sidebar .widget_recent_entries li a,
.sidebar .wp-block-latest-posts li a {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 사이드바 카테고리 위젯 숨김 (메뉴와 중복) */
.sidebar .widget_categories,
.sidebar .wp-block-categories,
.sidebar .wp-block-categories-list {
  display: none;
}

.sidebar .wp-block-group:has(.wp-block-categories) {
  display: none;
}

/* 사이드바 태그 클라우드 */
.sidebar-tags {
  margin-top: 30px;
}

.sidebar-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
