* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #6366f1;
  --background-color: #f8fafc;
  --text-color: #1e293b;
  --border-color: #e2e8f0;
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  --glass-effect: rgba(255, 255, 255, 0.9);
  --vh: 1vh;
  --header-height: 64px;
}

html,
body {
  background: var(--background-color) !important;
  color: var(--text-color);
  height: 100dvh;
  margin: 0;
  padding: 0;
}

/* 본문 영역 */
main {
  height: 100dvh;
  padding-top: var(--header-height); /* 헤더와 겹치지 않도록 여백 추가 */
  box-sizing: border-box;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--background-color) !important;
  /*
  
  justify-content: center;
  align-items: center;
  text-align: center;
  */
}

header {
  background: var(--glass-effect);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  height: var(--header-height); /* 헤더 높이를 변수로 설정 */
}

/* 네비게이션 바 스타일 */
.custom-navbar {
  background: var(--glass-effect);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
}

/* .navbar {
  background: var(--glass-effect);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: absolute; 
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 100px; 
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  width: 100%;
} */

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  display: block;
  width: 150px;
  height: auto;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin-bottom: 0px !important;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: var(--primary-color);
  color: white;
}

.nav-mobile-menu {
  display: none;
}

@media (max-width: 768px) {
  /* 기존 스타일 유지 */
  .nav-menu {
    display: none;
  }

  .nav-mobile-menu {
    display: block;
  }

  /* 햄버거 버튼 */
  input[id='hamburger'] {
    display: none;
  }

  input[id='hamburger'] + label {
    display: block;
    width: 36px;
    height: 36px;
    position: relative;
    cursor: pointer;
  }

  input[id='hamburger'] + label span {
    display: block;
    position: absolute;
    width: 100%;
    height: 5px;
    border-radius: 30px;
    background: #000;
    transition: all 0.35s;
  }

  input[id='hamburger'] + label span:nth-child(1) {
    top: 0;
  }
  input[id='hamburger'] + label span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
  }
  input[id='hamburger'] + label span:nth-child(3) {
    bottom: 0;
  }

  /* 📌 햄버거 클릭 시 나오는 메뉴 전체 화면 덮기 */
  .sidebar {
    width: 100vw; /* 전체 화면 가로 */
    height: 100vh; /* 전체 화면 세로 */
    background: white; /* 배경 흰색 */
    position: fixed;
    top: 0;
    left: -100%;
    z-index: 98;
    transition: all 0.35s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* justify-content: center; */
    align-items: center;
  }

  /* X 버튼 */
  input[id='hamburger']:checked + label {
    z-index: 99;
  }
  input[id='hamburger']:checked + label span {
    background: black;
  }
  input[id='hamburger']:checked + label span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
  }
  input[id='hamburger']:checked + label span:nth-child(2) {
    opacity: 0;
  }
  input[id='hamburger']:checked + label span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
  }

  /* 📌 메뉴가 활성화될 때 화면 전체 덮기 */
  input[id='hamburger']:checked + label + .sidebar {
    left: 0;
  }

  /* 네비게이션 메뉴 스타일 */
  .nav_mobile {
    width: 100%;
    padding: 0px;
    text-align: center;
  }

  .sidebar .nav_mobile li {
    width: 100%;
    list-style-type: none;
    font-size: 24px;
    font-family: 'Noto Sans KR';
    font-weight: bold;
    padding: 20px 0;
    text-align: center;

    border-bottom: 1px solid #ccc;
    transition: all 0.3s ease;
  }

  /* 📌 마우스 hover 시 글자색 흰색 & 배경 검은색 */
  .sidebar .nav_mobile li:hover {
    color: white;
    background-color: black;
  }

  .sidebar a {
    text-decoration: none;
    display: block;
    width: 100%;
    color: black;
  }

  .sidebar a:hover {
    background: var(--primary-color);
    color: white;
  }
  :root {
    --vh: calc(100vh / 100);
  }
}

/* 로그인 상태 표시 스타일 */
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #666;
  font-size: 14px;
  padding: 5px 10px;
  background: #f8f9fa;
  border-radius: 20px;
}

.user-info i {
  color: #28a745;
}

.logout-link {
  color: #dc3545 !important;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.logout-link:hover {
  background: rgba(220, 53, 69, 0.1);
}

.login-link {
  color: #007bff !important;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.login-link:hover {
  background: rgba(0, 123, 255, 0.1);
}

/* 모바일 사용자 정보 스타일 */
.mobile-user {
  padding: 10px 20px;
  border-bottom: 1px solid #eee;
}

.mobile-user span {
  display: flex;
  align-items: center;
  gap: 8px;
}
