/* ==============================================
   네비게이션 메뉴 스타일 - 단순하고 명확한 구조
   ============================================== */

/* Inter 폰트 Import */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

/* Body 기본 설정 */
:root {
  color-scheme: light;
  background-color: #f8fafc;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding-top: 64px;
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

/* 네비게이션 바 */
#main-nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 64px !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  border-bottom: 1px solid #e5e7eb !important;
  z-index: 9999 !important;
  display: block !important;
}

/* 네비게이션 컨테이너 */
.nav-container {
  max-width: 1536px;
  height: 64px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 네비게이션 내용 - Flexbox 레이아웃 */
.nav-content {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 64px !important;
  gap: 1rem !important;
}

/* 로고 영역 */
.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-img {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.025em;
}

/* 메뉴 영역 - 중앙 */
.nav-menu {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.nav-menu a,
.nav-menu button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu button:hover {
  color: #111827;
}

.nav-menu .relative {
  position: relative;
}

/* 아이콘 영역 - 우측 */
.nav-icons {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-right: 2rem;
}

.nav-icons.desktop-icons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  visibility: visible;
  opacity: 1;
  height: auto;
  width: auto;
}

/* 햄버거 메뉴 */
.mobile-hamburger {
  display: none;
}

body.nav-open {
  overflow: hidden;
}

/* 모바일 메뉴 패널 */
.mobile-menu-panel {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45) !important;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 9998;
  transition: opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
}

.mobile-menu-panel.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-content {
  position: absolute;
  top: 64px;
  right: 0;
  width: min(420px, 92vw);
  height: calc(100vh - 72px);
  background-color: #ffffff !important;
  box-shadow: -18px 0 35px rgba(15, 23, 42, 0.15);
  border-top-left-radius: 28px;
  border-bottom-left-radius: 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.mobile-menu-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #0f172a;
}

.mobile-menu-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.9rem;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-menu-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.mobile-menu-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #f8fafc !important;
}

.mobile-link {
  display: block;
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a !important;
  background: #ffffff !important;
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mobile-link:hover {
  background: #f8fafc;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.08);
}

.mobile-section {
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px;
  padding: 0.65rem 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%) !important;
  box-shadow: inset 0 1px 0 #ffffff, 0 6px 16px rgba(15, 23, 42, 0.05);
}

.mobile-menu-toggle {
  width: 100%;
  background: none !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a !important;
  padding: 0.75rem 0.5rem 0.5rem;
  cursor: pointer;
}

.mobile-menu-toggle span {
  flex: 1;
  text-align: left;
}

.mobile-menu-toggle .chevron-icon {
  transition: transform 0.2s ease;
}

.mobile-menu-toggle[aria-expanded="true"] .chevron-icon {
  transform: rotate(180deg);
}

.mobile-submenu {
  display: none;
  padding-left: 0.5rem;
  margin-top: 0.35rem;
  flex-direction: column;
  gap: 0.4rem;
  background-color: transparent !important;
}

.mobile-submenu.show {
  display: flex;
  padding-bottom: 0.35rem;
}

.mobile-menu-toggle[aria-expanded="true"] + .mobile-submenu {
  display: flex;
  padding-bottom: 0.35rem;
}

.mobile-sublink {
  display: block;
  font-size: 0.95rem;
  color: #475569 !important;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
  background: #ffffff !important;
  border: 1px solid transparent;
}

.mobile-sublink:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.mobile-user-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 18px;
  padding: 1.1rem;
  background: #fbfdff !important;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: inset 0 1px 0 #ffffff, 0 6px 16px rgba(15, 23, 42, 0.05);
  margin-top: 0.5rem;
}

/* 모바일 사용자 카드 내부 링크 간격 조정 */
.mobile-user-card > .mobile-link {
  margin-bottom: 0.25rem;
}

.mobile-user-card > .mobile-link:last-of-type {
  margin-bottom: 0;
}

.mobile-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.mobile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

.mobile-user-name {
  font-weight: 600;
  color: #0f172a !important;
}

.mobile-user-email {
  font-size: 0.85rem;
  color: #64748b !important;
}

.mobile-link.mobile-logout {
  border: 1px solid #fee2e2;
  color: #b91c1c;
  background: #fef2f2;
  text-align: center;
}

.mobile-link.mobile-logout:hover {
  background: #fee2e2;
}

/* 모바일 회원탈퇴 버튼 스타일 */
.mobile-link.mobile-delete-account {
  border: 1px solid #fee2e2;
  color: #dc2626 !important;
  background: #fef2f2 !important;
  text-align: center;
  font-weight: 600;
  margin-top: 0.5rem;
}

.mobile-link.mobile-delete-account:hover {
  background: #fee2e2 !important;
  color: #991b1b !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(220, 38, 38, 0.15);
}

@media (max-width: 768px) {
  .mobile-menu-content {
    width: min(400px, 94vw);
    height: calc(100vh - 64px);
    border-top-left-radius: 22px;
    border-bottom-left-radius: 22px;
  }
}

@media (max-width: 640px) {
  .mobile-menu-content {
    width: 100vw;
    height: 100vh;
    top: 0;
    right: 0;
    border-radius: 0;
  }

  .mobile-menu-body {
    padding: 1.25rem 1.25rem 2.5rem;
  }

  .mobile-link,
  .mobile-section,
  .mobile-user-card {
    border-radius: 14px;
  }

  .nav-icons.desktop-icons {
    padding-right: 5px;
  }

  .mobile-hamburger {
    margin-left: 5px;
  }
}

/* 반응형 - 데스크톱 (1024px 이상) */
@media (min-width: 1024px) {
  .desktop-menu {
    display: flex;
    flex-direction: row;
  }

  .desktop-icons {
    display: flex;
    flex-direction: row;
  }

  .nav-icons.desktop-icons {
    display: flex;
  }

  .mobile-hamburger {
    display: none;
  }

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

/* 반응형 - 모바일 (1024px 미만) */
@media (max-width: 1023px) {
  .desktop-menu {
    display: none;
  }

  .nav-icons.desktop-icons {
    justify-content: flex-end;
    padding-right: 0.75rem;
    gap: 0.5rem;
  }

  .mobile-hamburger {
    display: flex;
  }
}

/* hidden 클래스 */
.hidden {
  display: none !important;
}

/* 드롭다운 메뉴 */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  min-width: 14rem;
  background-color: #ffffff;
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  padding: 0.25rem 0;
  z-index: 10000;
}

.dropdown-content.show {
  display: block !important;
}

/* 알림 벨 컨테이너 */
.notification-bell-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  visibility: visible;
  opacity: 1;
}

/* 알림 벨 버튼 */
.notification-bell-button {
  position: relative;
  padding: 0.5rem;
  background: none;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: visible;
  opacity: 1;
  width: auto;
  height: auto;
}

.notification-bell-button:hover {
  background-color: #fef3c7;
}

/* 벨 아이콘 - 노란색 */
.bell-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: #f59e0b;
}

.bell-icon svg {
  color: #f59e0b;
  stroke: #f59e0b;
  fill: none;
}

/* 알림 배지 - 빨간색 */
.notification-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.25rem;
  background-color: #ef4444;
  color: #ffffff;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #ffffff;
}

/* 알림 드롭다운 - 아래로 펼쳐지도록 */
.notification-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  min-width: 20rem;
  max-width: 24rem;
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  z-index: 10000;
  max-height: 400px;
  overflow-y: auto;
}

.notification-dropdown.show {
  display: block;
}

.dropdown-content a,
.dropdown-content button {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #374151;
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}

.dropdown-content a:hover,
.dropdown-content button:hover {
  background-color: #f3f4f6;
}

.dropdown-content button.text-red-600 {
  color: #dc2626;
}

/* 회원탈퇴 버튼 스타일 (톱니바퀴 메뉴) */
#desktop-delete-account-button {
  color: #dc2626 !important;
  font-weight: 500;
}

#desktop-delete-account-button:hover {
  background-color: #fef2f2 !important;
  color: #991b1b !important;
}

/* 모바일 회원탈퇴 버튼 스타일 */
.mobile-delete-account {
  color: #dc2626 !important;
  font-weight: 500;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.mobile-delete-account:hover {
  background-color: #fef2f2 !important;
  color: #991b1b !important;
}

/* 톱니바퀴 메뉴 구분선 */
#user-profile-menu .border-t {
  border-top: 1px solid #e5e7eb;
  margin: 0.25rem 0;
}

/* 모바일 메뉴 구분선 */
.mobile-user-card .border-t {
  border-top: 1px solid #e5e7eb;
  margin: 0.5rem 0;
}

/* 알림 벨 */
.relative {
  position: relative;
}

/* 톱니바퀴 버튼 스타일 */
#user-profile-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 9999px;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  visibility: visible;
  opacity: 1;
  width: auto;
  height: auto;
}

/* 사용자 프로필 드롭다운 메뉴 - 오른쪽 여백 추가 */
#user-profile-menu {
  right: 0;
  margin-right: 16rem;
}

#user-profile-button:hover {
  background-color: #f3f4f6;
}

#user-profile-button i {
  width: 1.5rem;
  height: 1.5rem;
  color: #6b7280;
}

#user-profile-button i svg,
.settings-icon svg {
  color: #6b7280;
  stroke: #6b7280;
  fill: none;
}

#user-profile-button:hover i svg,
#user-profile-button:hover .settings-icon svg {
  color: #111827;
  stroke: #111827;
}

.p-2 {
  padding: 0.5rem;
}

.rounded-full {
  border-radius: 9999px;
}

.text-yellow-500 {
  color: #eab308;
}

.hover\:text-yellow-600:hover {
  color: #ca8a04;
}

.hover\:bg-yellow-50:hover {
  background-color: #fefce8;
}

.w-6 {
  width: 1.5rem;
}

.h-6 {
  height: 1.5rem;
}

.min-w-5 {
  min-width: 1.25rem;
}

.h-5 {
  height: 1.25rem;
}

.bg-red-500 {
  background-color: #ef4444;
}

.text-white {
  color: #ffffff;
}

.text-xs {
  font-size: 0.75rem;
}

.font-bold {
  font-weight: 700;
}

/* 기타 유틸리티 */
.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.rounded-md {
  border-radius: 0.375rem;
}

.w-4 {
  width: 1rem;
}

.h-4 {
  height: 1rem;
}

.text-gray-900 {
  color: #111827;
}

.text-gray-500 {
  color: #6b7280;
}

.hover\:text-gray-900:hover {
  color: #111827;
}

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.text-base {
  font-size: 1rem;
}

.block {
  display: block;
}

.w-full {
  width: 100%;
}

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

.text-red-600 {
  color: #dc2626;
}

.hover\:bg-gray-100:hover {
  background-color: #f3f4f6;
}
