@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

body {
  font-family: 'Pretendard';
  margin: 0;
  padding: 0;
}

/* header css */

.header {
  width: 100%;
  border-bottom: 1px solid #ddd;
}

.header-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 16px 24px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-left: 50px;
}

.header-logo img {
  height: 70px;
  transform: scale(1.4);
  transform-origin: left center;
  padding-right: 15px;
}

.header-nav {
  display: flex;
  gap: 12px;
  margin-right: 25px;
}

.nav-item {
  padding: 8px 14px;
  border-radius: 30px;

  text-decoration: none;
  color: #452829;
  font-size: 16px;

  line-height: 42px;

  transition-duration: 0.25s;
}

.nav-item:hover {
  font-weight: bold;
  color: #452829;
  text-decoration: none;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-btn,
.signup-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  transition: 0.2s ease;
}

.login-btn {
  background: #452829;
  color: #FFF57E;
}

.login-btn:hover {
  background-color: #593737;
  transform: translateY(-2px);
}

.login-btn:active {
  transform: scale(0.95);
}

.signup-btn {
  border: 1px solid #452829;
  color: #452829;
}

.signup-btn:hover {
  transform: translateY(-2px);
}

.signup-btn:active {
  transform: scale(0.95);
}

/* footer css */

.footer {
  width: 100%;
  background-color: #FFF57E;
  padding-top: 50px;
  padding-bottom: 50px;
  text-align: center;
  color: #452829;
}

.footer-copy {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 24px;
}

.footer-email {
  font-size: 15px;
  margin-bottom: 36px;
}

ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.footer-links a {
  text-decoration: none;
  color: #452829;
}

.footer-links span {
  color: #999;
}

/* Categories */
.categories {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding: 60px 0;
  color: #452829;
}

.category {
  text-align: center;
  cursor: pointer;
  transition-duration: 0.25s;
}

.category i {
  width: 90px;
  height: 90px;
  background: #FFF57E;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 34px;
  color: #452829;
  margin-bottom: 12px;
  transition-duration: 0.25s;
}

.category:hover {
  transform: scale(1.2);
}

.categories a.category {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}


/* 로그인 후 사용자 영역 */
.header-user-loggedin {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 프로필 이미지 */
.header-profile-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #cccccc;
}

/* 사용자 이름 */
.header-user-name {
  font-size: 16px;
  font-weight: 500;
  color: #333333;
}

/* 로그아웃 버튼 */
.header-btn-logout {
  padding: 6px 14px;
  background-color: #452829;
  color: #ffffff;
  font-size: 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.2s ease;
}

.header-btn-logout:hover {
  background-color: #452829;
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-submit:active {
  transform: scale(0.95);
}

.header-btn-a {
  transition: 0.2s ease;
}

.header-btn-logout:hover {
  transform: translateY(-2px);
}

.btn-submit:active {
  transform: scale(0.95);
}

#nickname {
  text-decoration: none;
}


.header-box {
  display: flex;
}


.member-link {
  color: inherit;
  text-decoration: none;
}

.member-link:hover {
  text-decoration: underline;
  color: #452829;
}

/* 프로필 이미지 링크 - 커서 변경 */
a>.profile-img {
  cursor: pointer;
  transition: opacity 0.2s;
}

a>.profile-img:hover {
  opacity: 0.85;
}

/* 알림 래퍼 */
.noti-wrapper {
  position: relative;
}

/* 알림 버튼 */
.noti-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #452829;
  position: relative;
  padding: 4px 8px;
}

/* 뱃지 */
.noti-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #e74c3c;
  color: white;
  font-size: 10px;
  font-weight: bold;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 드롭다운 */
.noti-dropdown {
  position: absolute;
  top: 44px;
  right: 0;
  width: 320px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  overflow: hidden;
}

.noti-dropdown.popup-hidden {
  display: none;
}

/* 드롭다운 헤더 */
.noti-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
  font-weight: bold;
  color: #452829;
}

.noti-read-all {
  background: none;
  border: none;
  font-size: 12px;
  color: #888;
  cursor: pointer;
}

.noti-read-all:hover {
  color: #452829;
}

/* 알림 목록 */
.noti-list {
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
}

/* 알림 아이템 */
.noti-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s;
}

.noti-item:hover {
  background: #fafafa;
}

.noti-item.unread {
  background: #fffef0;
}

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

/* 알림 프로필 이미지 */
.noti-profile-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* 알림 내용 */
.noti-content {
  flex: 1;
}

.noti-msg {
  font-size: 13px;
  color: #333;
  line-height: 1.4;
}

.noti-msg strong {
  color: #452829;
}

.noti-date {
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
}

/* 빈 알림 */
.noti-empty {
  text-align: center;
  padding: 30px;
  color: #aaa;
  font-size: 13px;
}

/* 알림 헤더 버튼 영역 */
.noti-header-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.noti-divider {
  color: #ddd;
  font-size: 12px;
}

.noti-delete-all {
  background: none;
  border: none;
  font-size: 12px;
  color: #e74c3c;
  cursor: pointer;
}

.noti-delete-all:hover {
  text-decoration: underline;
}

/* 개별 삭제 버튼 */
.noti-delete-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  line-height: 1;
  transition: color 0.15s;
}

.noti-delete-btn:hover {
  color: #e74c3c;
}

/* 팔로우 목록 모달 */
.follow-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.follow-modal.popup-hidden {
  display: none;
}

.follow-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.follow-modal-box {
  position: relative;
  background: white;
  border-radius: 16px;
  width: 360px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.follow-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  font-weight: bold;
  color: #452829;
}

.follow-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #888;
  line-height: 1;
}

.follow-modal-list {
  list-style: none;
  overflow-y: auto;
  padding: 8px 0;
}

.follow-modal-item {
  padding: 4px 0;
}

.follow-modal-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  text-decoration: none;
  color: #333;
  transition: background 0.15s;
}

.follow-modal-link:hover {
  background: #fafafa;
}

.follow-modal-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f0ebe8;
}

.follow-modal-name {
  font-size: 14px;
  font-weight: 500;
  color: #452829;
}

.follow-modal-empty {
  text-align: center;
  padding: 30px;
  color: #aaa;
  font-size: 13px;
}

/* ================================
   헤더 채팅 아이콘
================================ */

.chat-icon-wrapper {
  position: relative;
}

.chat-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #452829;
  font-size: 18px;
  text-decoration: none;
  position: relative;
  transition: background 0.15s;
}

.chat-icon-btn:hover {
  background: #f5f0ee;
}

.chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #e74c3c;
  color: white;
  font-size: 10px;
  font-weight: bold;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ================================================
   반응형 미디어 쿼리 (4단계)
================================================ */

/* --- Tablet (768px ~ 1199px) --- */
@media (max-width: 1199px) {
    .header-inner {
        max-width: 100%;
        padding: 12px 20px;
    }

    .header-logo {
        margin-left: 20px;
    }

    .header-logo img {
        height: 56px;
    }

    .header-nav {
        gap: 6px;
        margin-right: 16px;
    }

    .nav-item {
        font-size: 14px;
        padding: 6px 10px;
        line-height: 36px;
    }

    .categories {
        gap: 36px;
        padding: 48px 20px;
    }
}

/* --- Mobile L (480px ~ 767px) --- */
@media (max-width: 767px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 10px 16px;
        gap: 8px;
        position: relative;
    }

    .header-logo {
        margin-left: 0;
    }

    .header-logo img {
        height: 44px;
        transform: scale(1.1);
    }

    /* 네비게이션 숨기고 필요 시 햄버거로 대체 가능 */
    .header-nav {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
        margin-right: 0;
        gap: 4px;
    }

    .nav-item {
        font-size: 13px;
        padding: 5px 10px;
        line-height: 1.4;
        border: 1px solid #eee;
        border-radius: 20px;
    }

    /* 카테고리 */
    .categories {
        gap: 20px;
        padding: 36px 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .category i {
        width: 70px;
        height: 70px;
        font-size: 26px;
    }

    /* 알림 드롭다운 */
    .noti-dropdown {
        width: 280px;
        right: -40px;
    }

    /* 팔로우 모달 */
    .follow-modal-box {
        width: 90vw;
    }
}

/* --- Mobile S (~ 479px) --- */
@media (max-width: 479px) {
    .header-logo img {
        height: 38px;
        transform: scale(1.0);
    }

    .nav-item {
        font-size: 12px;
        padding: 4px 8px;
    }

    .categories {
        gap: 14px;
        padding: 28px 8px;
    }

    .category i {
        width: 58px;
        height: 58px;
        font-size: 22px;
    }

    .footer-copy {
        font-size: 15px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 12px;
    }

    .noti-dropdown {
        width: 94vw;
        right: -60px;
    }

    .login-btn,
    .signup-btn {
        font-size: 12px;
        padding: 5px 10px;
    }
}
