/* No Animations */
.na-menu2-card {
  width: 90%;
  margin: 0 auto;
  border: none;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 400px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  contain: layout style paint;
  isolation: isolate;
  transform: translateZ(0);
  margin-bottom: 1rem;
}

.na-menu2-tabs {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 70px;
  min-height: 70px;
  background: transparent;
  border-bottom: 1px solid transparent;
  border-radius: 0.5rem 0.5rem 0 0;
}

.na-menu2-tab {
  background: transparent;
  border: none;
  padding: 0.5rem 0.3rem;
  font-size: 0.8rem;
  color: #8b949e;
  font-weight: 400;
  cursor: pointer;
  outline: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  user-select: none;
  transition: background-color 0.15s ease, border-bottom-color 0.15s ease;
  border-bottom: 3px solid transparent;
  will-change: background-color, border-bottom-color;
}

.na-menu2-tab:hover {
  background: rgba(0, 0, 0, 0.03);
  color: inherit;
  transform: translateZ(0);
}

.na-menu2-tab.active {
  background: rgba(0, 0, 0, 0.05);
  color: inherit;
  font-weight: 600;
}

/* 탭 색상 테마 - Transparent */
.na-menu2-tab-yellow.active {
  border-bottom: 3px solid #ffb000;
  background: rgba(255, 176, 0, 0.08);
  color: inherit;
}

.na-menu2-tab-blue.active {
  border-bottom: 3px solid #0969da;
  background: rgba(9, 105, 218, 0.08);
  color: inherit;
}

.na-menu2-tab-purple.active {
  border-bottom: 3px solid #8250df;
  background: rgba(130, 80, 223, 0.08);
  color: inherit;
}

.na-menu2-tab-gray.active {
  border-bottom: 3px solid #6e7781;
  background: rgba(110, 119, 129, 0.08);
  color: inherit;
}

.na-menu2-tab .na-menu2-tab-icon {
  font-size: 0.9rem;
  color: inherit;
  margin-bottom: 0.1rem;
}


.na-menu2-tab-title {
  font-size: 0.85rem;
  line-height: 1.1;
  text-align: center;
  word-break: keep-all;
  color: inherit;
  font-weight: inherit;
}

.na-menu2-panels {
  flex: 1;
  background: transparent;
  overflow: hidden;
  border-radius: 0 0 0.5rem 0.5rem;
}

.na-menu2-panel {
  display: none;
  height: 100%;
  overflow: hidden;
}

.na-menu2-panel.active {
  display: flex;
  flex-direction: column;
}

.na-menu2-panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: inherit;
  padding: 0.8rem 0.8rem;
  background: transparent;
  border-bottom: 1px solid rgba(241, 243, 244, 0.3);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

/* 패널 제목 색상 테마 - Transparent */
.na-menu2-panel-title-yellow {
  background: rgba(255, 176, 0, 0.05);
  color: inherit;
  border-bottom: 1px solid rgba(240, 230, 140, 0.3);
}

.na-menu2-panel-title-blue {
  background: rgba(9, 105, 218, 0.05);
  color: inherit;
  border-bottom: 1px solid rgba(187, 222, 251, 0.3);
}

.na-menu2-panel-title-purple {
  background: rgba(130, 80, 223, 0.05);
  color: inherit;
  border-bottom: 1px solid rgba(225, 190, 231, 0.3);
}

.na-menu2-panel-title-gray {
  background: rgba(110, 119, 129, 0.05);
  color: inherit;
  border-bottom: 1px solid rgba(207, 216, 220, 0.3);
}

.na-menu2-panel-title-icon {
  font-size: 0.8rem;
  color: inherit;
}

.na-menu2-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  flex: 1;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.na-menu2-list li {
  border-bottom: 1px solid transparent;
  flex-shrink: 0;
}

.na-menu2-list li:last-child {
  border-bottom: none;
}

.na-menu2-list a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.8rem;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background-color 0.15s ease, border-left-color 0.15s ease;
  will-change: background-color, border-left-color;
}

.na-menu2-list a.active {
  background: rgba(0, 0, 0, 0.03);
  color: inherit;
  font-weight: 500;
  border-left: 3px solid #0969da;
}

.na-menu2-list a:hover:not(.active) {
  background: rgba(0, 0, 0, 0.02);
  color: inherit;
}

.na-menu2-badge {
  background: #e5e7eb;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.15rem 0.2rem;
  border-radius: 0.5rem;
  margin-right: 0.5rem;
  min-width: 1.5rem;
  text-align: center;
  flex-shrink: 0;
}

.na-menu2-list a.active .na-menu2-badge {
  background: #0969da;
  color: #ffffff;
}

.na-menu2-list a:hover .na-menu2-badge {
  background: #d1d5db;
  color: #374151;
}

.na-menu2-badge:empty {
  display: none;
}

.na-menu2-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #8b949e;
  font-size: 0.9rem;
}

/* Dark Mode */
[data-theme="dark"] .na-menu2-card {
  background: transparent;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .na-menu2-tabs {
  background: transparent;
  border-bottom: 1px solid transparent;
}

[data-theme="dark"] .na-menu2-tab {
  color: inherit;
}

[data-theme="dark"] .na-menu2-tab:hover {
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
}

[data-theme="dark"] .na-menu2-tab.active {
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font-weight: 600;
}

[data-theme="dark"] .na-menu2-tab-yellow.active {
  border-bottom: 3px solid #ffb000;
  background: rgba(255, 176, 0, 0.08);
  color: inherit;
}

[data-theme="dark"] .na-menu2-tab-blue.active {
  border-bottom: 3px solid #0969da;
  background: rgba(9, 105, 218, 0.08);
  color: inherit;
}

[data-theme="dark"] .na-menu2-tab-purple.active {
  border-bottom: 3px solid #8250df;
  background: rgba(130, 80, 223, 0.08);
  color: inherit;
}

[data-theme="dark"] .na-menu2-tab-gray.active {
  border-bottom: 3px solid #6e7781;
  background: rgba(110, 119, 129, 0.08);
  color: inherit;
}

[data-theme="dark"] .na-menu2-panels {
  background: transparent;
}

[data-theme="dark"] .na-menu2-panel-title {
  color: inherit;
  background: transparent;
  border-bottom: 1px solid transparent;
}

[data-theme="dark"] .na-menu2-panel-title-yellow {
  background: rgba(255, 176, 0, 0.05);
  color: inherit;
  border-bottom: 1px solid transparent;
}

[data-theme="dark"] .na-menu2-panel-title-blue {
  background: rgba(9, 105, 218, 0.05);
  color: inherit;
  border-bottom: 1px solid transparent;
}

[data-theme="dark"] .na-menu2-panel-title-purple {
  background: rgba(130, 80, 223, 0.05);
  color: inherit;
  border-bottom: 1px solid transparent;
}

[data-theme="dark"] .na-menu2-panel-title-gray {
  background: rgba(110, 119, 129, 0.05);
  color: inherit;
  border-bottom: 1px solid transparent;
}

[data-theme="dark"] .na-menu2-list li {
  border-bottom: 1px solid transparent;
}

[data-theme="dark"] .na-menu2-list a {
  color: inherit;
}

[data-theme="dark"] .na-menu2-list a.active {
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  border-left: 3px solid #0969da;
}

[data-theme="dark"] .na-menu2-list a:hover:not(.active) {
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
}

[data-theme="dark"] .na-menu2-badge {
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

[data-theme="dark"] .na-menu2-list a.active .na-menu2-badge {
  background: #0969da;
  color: #ffffff;
}

[data-theme="dark"] .na-menu2-list a:hover .na-menu2-badge {
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
}

[data-theme="dark"] .na-menu2-empty {
  color: inherit;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .na-menu2-card {
    width: 95%;
    height: 350px;
    margin: 0 auto;
  }

  .na-menu2-tabs {
    height: 65px;
    min-height: 65px;
  }

  .na-menu2-tab {
    padding: 0.5rem 0.3rem;
    font-size: 0.75rem;
    border-bottom: 4px solid transparent;
  }

  .na-menu2-tab.active {
    background: rgba(0, 0, 0, 0.08);
    font-weight: 700;
  }

  [data-theme="dark"] .na-menu2-tab.active {
    background: rgba(255, 255, 255, 0.08);
    font-weight: 700;
  }

  .na-menu2-tab-yellow.active {
    border-bottom: 4px solid #ffb000;
  }

  .na-menu2-tab-blue.active {
    border-bottom: 4px solid #0969da;
  }

  .na-menu2-tab-purple.active {
    border-bottom: 4px solid #8250df;
  }

  .na-menu2-tab-gray.active {
    border-bottom: 4px solid #6e7781;
  }

  .na-menu2-tab-title {
    font-size: 0.85rem;
    font-weight: 500;
  }

  .na-menu2-panel-title {
    padding: 0.6rem 0.6rem;
    font-size: 0.9rem;
  }

  .na-menu2-list a {
    padding: 0.6rem 0.6rem;
    font-size: 0.85rem;
  }

  .na-menu2-badge {
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
  }
}

/* Scrollbar */
.na-menu2-list::-webkit-scrollbar {
  width: 6px;
}

.na-menu2-list::-webkit-scrollbar-track {
  background: transparent;
}

.na-menu2-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.na-menu2-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

[data-theme="dark"] .na-menu2-list::-webkit-scrollbar-track {
  background: transparent;
}

[data-theme="dark"] .na-menu2-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .na-menu2-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* === 3 Depth 서브메뉴 스타일 (소모임 메뉴 좌측정렬) === */
.na-menu2-sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #f8f9fa;
  border-left: 2px solid #e9ecef;
  margin-left: 1.2rem;
  margin-top: 0.5rem;
  border-radius: 0 0.3rem 0.3rem 0;
  overflow: hidden;
}

.na-menu2-sub-list li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.na-menu2-sub-list li:last-child {
  border-bottom: none;
}

.na-menu2-sub-list li:hover {
  background: rgba(9, 105, 218, 0.03);
}

.na-menu2-sub-list a {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.6rem;
  color: #656d76;
  font-size: 0.8rem;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
  text-align: left;
  justify-content: flex-start;
  position: relative;
}

.na-menu2-sub-list a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(9, 105, 218, 0.08) 0%, transparent 80%);
  transition: width 0.2s ease;
}

.na-menu2-sub-list a:hover::before {
  width: 100%;
}

.na-menu2-sub-list a:hover {
  color: #24292f;
  padding-left: 0.8rem;
  transform: translateX(2px);
}

.na-menu2-sub-list a.active {
  background: #e7f3ff;
  color: #0969da;
  font-weight: 500;
  border-left-color: #0969da;
  position: relative;
}

.na-menu2-sub-list a.active::after {
  content: '';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.3rem;
  height: 0.3rem;
  background: #0969da;
  border-radius: 50%;
}

.na-menu2-sub-list .na-menu2-badge {
  width: 0.7rem;
  height: 0.7rem;
  font-size: 0.6rem;
  border-radius: 0.15rem;
  background: #e9ecef;
  color: #6c757d;
  flex-shrink: 0;
}

.na-menu2-sub-list a.active .na-menu2-badge {
  background: #0969da;
  color: #fff;
}

.na-menu2-sub-list a:hover .na-menu2-badge {
  background: #dee2e6;
  color: #495057;
}

/* === 다크모드 3 Depth 서브메뉴 스타일 === */
[data-theme="dark"] .na-menu2-sub-list {
  background: #0d1117;
  border-left-color: #21262d;
}

[data-theme="dark"] .na-menu2-sub-list li {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .na-menu2-sub-list li:hover {
  background: rgba(58, 123, 213, 0.05);
}

[data-theme="dark"] .na-menu2-sub-list a {
  color: #7d8590;
}

[data-theme="dark"] .na-menu2-sub-list a::before {
  background: linear-gradient(90deg, rgba(58, 123, 213, 0.1) 0%, transparent 80%);
}

[data-theme="dark"] .na-menu2-sub-list a:hover {
  color: #c9d1d9;
}

[data-theme="dark"] .na-menu2-sub-list a.active {
  background: #1a2332;
  color: #58a6ff;
  border-left-color: #58a6ff;
}

[data-theme="dark"] .na-menu2-sub-list a.active::after {
  background: #58a6ff;
}

[data-theme="dark"] .na-menu2-sub-list .na-menu2-badge {
  background: #21262d;
  color: #7d8590;
}

[data-theme="dark"] .na-menu2-sub-list a.active .na-menu2-badge {
  background: #58a6ff;
  color: #0d1117;
}

[data-theme="dark"] .na-menu2-sub-list a:hover .na-menu2-badge {
  background: #30363d;
  color: #c9d1d9;
}

/* === 모바일 3 Depth 서브메뉴 스타일 === */
@media (max-width: 768px) {
  .na-menu2-sub-list {
    margin-left: 0.8rem;
    border-radius: 0 0.2rem 0.2rem 0;
  }

  .na-menu2-sub-list a {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
  }

  .na-menu2-sub-list .na-menu2-badge {
    width: 0.6rem;
    height: 0.6rem;
    font-size: 0.55rem;
  }
}

/* 라이트 테마에서만 색상 적용 */
[data-theme="light"] .na-menu2-tabs {
  border-bottom: 1px solid rgba(241, 243, 244, 0.3);
}
[data-theme="light"] .na-menu2-list li {
  border-bottom: 1px solid #f6f8fa;
}

.na-menu2-tab, .na-menu2-panel {
  transition: none;
  animation: none;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: contents;
  contain: layout style paint;
}

/* GPU 가속 */
.na-menu2-tabs, .na-menu2-panels {
  will-change: contents;
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: layout style paint;
  isolation: isolate;
}

/* 사이드바 광고배너 사이즈 조정 */
.da-bn-item {
  padding: 0 1rem;
}

/* 🚀 깜빡임 방지: 다크모드 우선 스타일 (FOUC 방지) */
#category-menu-container[data-theme="dark"] .na-menu2-badge {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

#category-menu-container[data-theme="dark"] .na-menu2-list a.active .na-menu2-badge {
  background: #0969da;
  color: #ffffff;
}

#category-menu-container[data-theme="dark"] .na-menu2-list a:hover .na-menu2-badge {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

#category-menu-container[data-theme="dark"] .na-menu2-sub-list .na-menu2-badge {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

#category-menu-container[data-theme="dark"] .na-menu2-sub-list a.active .na-menu2-badge {
  background: #0969da;
  color: #ffffff;
}

#category-menu-container[data-theme="dark"] .na-menu2-sub-list a:hover .na-menu2-badge {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

#category-menu-container[data-theme="light"] .na-menu2-badge {
  background: #e5e7eb;
  color: #6b7280;
}

#category-menu-container[data-theme="light"] .na-menu2-list a.active .na-menu2-badge {
  background: #0969da;
  color: #ffffff;
}

#category-menu-container[data-theme="light"] .na-menu2-list a:hover .na-menu2-badge {
  background: #d1d5db;
  color: #374151;
}