@font-face {
  font-family: 'Gyeonggi_Title_Light';
  src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/2410-3@1.0/Title_Light.woff') format('woff');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Gyeonggi_Title_Medium';
  src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/2410-3@1.0/Title_Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
}

@font-face {
    font-family: 'Gyeonggi_Title_Bold';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/2410-3@1.0/Title_Bold.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

/* 기본 스타일 초기화 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Gyeonggi_Title_Light', sans-serif;
  scrollbar-width: thin; /* 스크롤바 너비를 얇게 설정 */
  scrollbar-color: #ffffff50 transparent; /* 스크롤바 색상 (thumb, track) */
}

/* 바디 스타일 */
body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: #18181a;
  color: #333;
}

#today-birthday {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 8px;
  background-color: #ff004c;
  color: #ffffff;
  font-family: 'Gyeonggi_Title_Medium', sans-serif;
}
#today-birthday button {
  width: 32px;
  height: 32px;
  font-size: 2em;
  border: none;
  background-color: #ffffff00;
  color: #ffffff;
  cursor: pointer;
}

/* 헤더 스타일 */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000; /* 다른 요소보다 위에 표시 */
  background-color: #18181a;
  border-bottom: 1px solid #ffffff50;
  padding: 10px 0;
}

.header-container {
  width: 80%;
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 로고 스타일 */
.logo a {
  font-size: 1.6em;
  font-weight: bold;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.1s;
  font-family: 'Gyeonggi_Title_Medium', sans-serif;
}

.logo a:hover {
  border-bottom: 2px solid white;
}

/* 상단 내비게이션 스타일 */
.top-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

.top-nav ul li a {
  text-decoration: none;
  color: #ffffff;
  font-weight: 500;
  transition: color 0.1s;
}

.top-nav ul li a:hover {
  border-bottom: 2px solid white;
}

/* 검색 및 프로필 컨테이너 스타일 */
.search-profile-container {
  display: flex;
  align-items: center;
  position: relative; /* 툴팁 위치를 위한 상대 위치 */
}

/* 검색 바 스타일 */
.search-bar {
  display: flex;
  align-items: center;
  /* margin-right: -64px;  // 불필요한 음수 마진은 제거 또는 주석 처리 */
}

.search-bar input[type="text"] {
  padding: 8px 12px;
  border: 1px solid #ffffff50;
  border-right: none;
  border-radius: 4px 0 0 4px;
  outline: none;
  font-size: 1em;
  height: 38px;
  background-color: #18181a;
  color: white;
}

.search-bar button {
  padding: 8px 12px;
  border: 1px solid #ffffff50;
  border-left: none;
  background-color: #18181a;
  color: #ffffff;
  cursor: pointer;
  border-radius: 0 4px 4px 0;
  transition: background-color 0.1s;
  font-size: 1.2em;
  height: 38px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-bar button:hover {
  background-color: #ffffff;
  color: #000000;
}

/* 프로필 버튼 스타일 */
.profile-button {
  width: 38px;
  height: 38px;
  background-color: #18181a;
  border: 1px solid #ffffff50;
  border-radius: 3px;
  margin-left: 10px; /* 기본값 */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #fff;
  font-size: 1.2em;
  transition: color 0.1s;
}

.profile-button:hover {
  background-color: #ffffff;
  color: #000000;
}

/* 툴팁 스타일 */
.tooltip {
  position: absolute;
  top: 48px; /* 프로필 버튼 바로 아래 위치 */
  right: 0;
  background-color: #18181a;
  width: 340px;
  color: #fff;
  padding: 10px 8px;
  border-radius: 4px;
  border: 1px solid #ffffff50;
  font-size: 1em;
  visibility: hidden; /* 기본적으로 숨김 */
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.1s ease, transform 0.1s ease;
  white-space: nowrap;
  z-index: 1000;
}

.tooltip .id-text {
  margin-top: 10px;
}

.tooltip hr {
  border: 1px #ffffff50;
  margin-top: -10px;
  margin-bottom: -18px;
}

.tooltip button {
  width: 100%;
  height: 48px;
  border: 1px solid #ffffff50;
  border-radius: 4px;
  background-color: #18181a;
  color: white;
  padding: 4px;
  margin-top: 8px;
  transition: 0.1s;
}

.tooltip button:hover {
  background-color: #ffffff;
  color: #000000;
}

.tooltip.show {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.tooltip-buttons {
  display: flex;
  width: 100%;
}

.tooltip-buttons button {
  flex: 1; /* 버튼들이 동일한 크기로 확장 */
  margin: 0; /* 간격 제거 */
  border: 1px solid #ffffff50;
  background-color: #18181a;
  color: white;
  padding: 12px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.1s;
}

.tooltip-buttons button:first-child {
  border-radius: 4px 0 0 4px; /* 왼쪽 버튼 둥근 모서리 */
}

.tooltip-buttons button:last-child {
  border-radius: 0 4px 4px 0; /* 오른쪽 버튼 둥근 모서리 */
}

.tooltip-buttons button:hover {
  background-color: #ffffff;
  color: #000000;
}

/* 메인 컨테이너 스타일 */
.main-container {
  display: flex;
  width: 80%;
  max-width: 1600px;
  margin: 20px auto;
  gap: 20px;
  margin-top: 80px;
}

/* 사이드바 스타일 */
.sidebar {
  position: fixed;
  top: 0;
  z-index: 999;
  width: 20%;
  border: 1px solid #ffffff50;
  position: sticky;
  top: 80px; /* 헤더 아래 여백 (헤더 높이 + 추가 여백) */
  /* 기존 스타일 유지 */
  background-color: #18181a;
  padding: 16px;
  border-radius: 4px;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-section h3 {
  margin-bottom: 16px;
  font-size: 1.6em;
  color: #ffffff;
  border-bottom: 1px solid #ffffff50;
  padding-bottom: 4px;
}

.sidebar-section ul {
  list-style: none;
}

.sidebar-section ul li {
  margin-bottom: 8px;
  font-size: 1.2em;
}

.sidebar-section ul li a {
  font-size: 1.1em;
  text-decoration: none;
  color: #007BFF;
  transition: color 0.1s;
}

.sidebar-section ul li a:hover {
  color: #005abb;
}

/* 메인 콘텐츠 스타일 */
main {
  width: 58%;
  background-color: #18181a;
  padding: 16px;
  border: 1px solid #ffffff50;
  border-radius: 4px;
}

article {
  margin-bottom: 16px;
}

article h2 {
  font-size: 1.6em;
  color: #ffffff;
  margin-bottom: 10px;
}

article p {
  line-height: 1.6;
  color: #ffffff;
}

/* 푸터 스타일 */
footer {
  border-top: 1px solid #ffffff50;
  padding: 32px 0;
  text-align: left;
  font-weight: bold;
  font-size: 1.2em;
}

footer #footer-title {
  padding-left: 32px;
  font-size: 2.4em;
  font-weight: bold;
  margin-bottom: 8px;
  font-family: 'Gyeonggi_Title_Medium';
}

footer .footer-list {
  padding-top: 16px;
  padding-left: 100px;
}

footer .footer-click {
  text-decoration: none;
  color: #000000;
}

footer .footer-click:hover {
  border-bottom: 2px solid #000000;
}

.default-up-ad-banner {
  margin-top: 16px;
  width: 728px;
  height: 100%;
  margin: 0 auto;
  display: block;
}
.pc-up-ad-banner {
  margin-top: 16px;
  width: 970px;
  height: 100%;
  margin: 0 auto;
  display: none;
}
.tab-up-ad-banner {
  margin-top: 16px;
  width: 728px;
  height: 100%;
  margin: 0 auto;
  display: none;
}
.m-up-ad-banner {
  margin-top: 16px;
  width: 320px;
  height: 100%;
  margin: 0 auto;
  display: none;
}

.sidesquare-ad {
  width: 250px;
  height: 100%;
  margin: 0 auto;
}

.sidebar-ad {
  width: 160px;
  height: 100%;
  margin: 0 auto;
}

.footer-ad {
  width: 728px;
  height: 100%;
  margin: 0 auto;
}

.m-footer-ad {
  width: 320px;
  height: 100%;
  margin: 0 auto;
  display: none;
}

.tooltip-option {
  display: none;
}

.get-post-error {
  color: white;
}

.more-post {
  display: block;
  width: 100%;
  height: 48px;
  border: 1px solid #ffffff50;
  background-color: #18181a;
  color: #ffffff;
  font-size: 1.2em;
  margin-top: 16px;
  border-radius: 4px;
  transition: 0.1s;
  cursor: pointer;
}
.more-post:hover {
  background-color: #ffffff;
  color: #000000;
}

#option-tooltip {
  position: absolute;
  background-color: rgba(51, 51, 51, 0.9);
  color: #fff;
  padding: 10px;
  border-radius: 5px;
  display: none;
  z-index: 1000;
  white-space: nowrap;
}
#option-tooltip button {
  background-color: #007BFF;
  border: none;
  color: #fff;
  padding: 5px 10px;
  margin-top: 5px;
  cursor: pointer;
  border-radius: 3px;
  font-size: 0.9em;
}

@media (max-width: 920px) {
  footer #footer-title {
    font-size: 1em;
  }

  footer .footer-list {
    padding-left: 32px;
    font-size: 1rem;
  }
}

@media (max-width: 1220px) {
  .header-container,
  .main-container {
    width: 96%;
    margin: 0 auto; /* 작은 화면에서도 가운데 정렬 */
  }

  .main-container {
    margin-top: 60px;
  }

  .top-nav {
    display: none;
  }

  /* 상단 네비게이션은 세로로 펼쳐지게 되므로 숨기거나 수정 */
  .top-nav ul {
    flex-direction: column;
    gap: 10px;
  }

  .sidebar {
    display: none; /* 공간까지 제거 */
  }

  main {
    width: 100%;
    margin: 20px auto; 
  }

  /* 검색창과 메뉴 버튼을 붙여서 정렬 */
  .search-profile-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;  /* 사이 간격이 필요하다면 값 조절 */
    margin-right: 0; 
  }

  /* 검색창 폭 조절(필요시 width값 직접 지정) */
  .search-bar {
    margin-right: 0;
    width: auto;
  }
  .search-bar input[type="text"] {
    width: 100px; /* 적당한 폭으로 조절 */
  }

  /* 프로필 버튼 왼쪽 여백 제거 */
  .profile-button {
    margin-left: 16 !important;
  }

  .tooltip {
    top: 48px;
    right: 0;
  }
}

/* 1024px 이상(데스크톱) */
@media (min-width: 1200px) {
  .profile-button {
    display: none;
  }
}

@media (max-width: 380px) {
  .tooltip {
    width: 300px;
  }
}