/* 상단바 */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}

.left-group {
  display: flex;
  align-items: center;
  gap: 40px;           /* 로고와 메뉴 사이 간격 */
}

.logo {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.logo-img {
  width: 32px;
  margin-right: 8px;
}

/* ====================== 로고 텍스트 강조 ====================== */
.logo-text {
  font-weight: 700;           /* 진하게 (700~900 사이로 조정 가능) */
  font-size: 1.35rem;         /* 글자 크기 (원하는 크기로 조정) */
  letter-spacing: -0.02em;    /* 자간 살짝 좁혀서 세련되게 */
  color: #111;                /* 필요하면 색상 변경 */
  white-space: nowrap;        /* 줄바꿈 방지 */
}

/* 모바일에서도 잘 보이게 */
@media (max-width: 768px) {
  .logo-text {
    font-size: 1.45rem;       /* 모바일에서는 조금 작게 */
  }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-user-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  margin-right: 20px;
  flex-shrink: 0;
}

.user-profile-btn {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.user-profile-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #007bff, #8faadc);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  box-shadow: 0 3px 10px rgba(0, 123, 255, 0.4);
  border: 2px solid #fff;
  overflow: hidden;
}

.user-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-sponsor-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #6f4e37;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}

.header-sponsor-btn:hover {
  background: #efe6dc;
  color: #5a3d2b;
}

.header-sponsor-icon {
  display: block;
  width: 20px;
  height: 20px;
}

.header-user-actions .header-sponsor-btn + .notification-bell {
  margin-left: 0;
}

.header-login-btn {
  padding: 8px 16px;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}

.header-login-btn:hover {
  background: #0056b3;
}

.menu-btn {
  font-size: 28px;
  cursor: pointer;
  user-select: none;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.menu-btn:active {
  background: #f3f4f6;
}

/* ====================== 알림 ====================== */
.notification-bell {
  position: relative;
  flex-shrink: 0;
  margin-left: -16px;
}

.notification-bell-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.notification-bell-btn:hover {
  background: #e5e7eb;
}

.notification-bell-icon {
  font-size: 18px;
  line-height: 1;
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-height: 420px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  z-index: 1200;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.notification-panel.is-open {
  display: flex;
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafafa;
}

.notification-panel-header strong {
  font-size: 15px;
  color: #111;
}

.notification-panel-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-viewall-link {
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.notification-viewall-link:hover {
  text-decoration: underline;
}

.notification-settings-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  color: #64748b;
}

.notification-settings-btn:hover {
  background: #f1f5f9;
  color: #111;
}

.notification-list {
  overflow-y: auto;
  max-height: 360px;
}

.notification-item {
  width: 100%;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  text-align: left;
  padding: 12px 16px;
  cursor: pointer;
}

.notification-item:hover {
  background: #f8fafc;
}

.notification-item.unread {
  background: #eff6ff;
}

.notification-item-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.notification-item-label {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
}

.notification-item-time {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.notification-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin-bottom: 2px;
}

.notification-item-message {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.notification-empty {
  padding: 28px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

/* 유저 프로필 드롭다운 패널 (유튜브식) */
.user-profile-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  z-index: 1200;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.user-profile-panel.is-open {
  display: flex;
}

.user-profile-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafafa;
}

.user-profile-panel-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.user-profile-panel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-panel-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-profile-panel-info strong {
  font-size: 14px;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-profile-panel-info span {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-profile-panel-menu {
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.user-profile-panel-item {
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 10px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: #111;
  cursor: pointer;
}

.user-profile-panel-item:hover {
  background: #f3f4f6;
}

.user-profile-panel-item-danger {
  color: #dc3545;
}

.notification-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.notification-settings-card {
  position: relative;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.notification-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.notification-settings-header h3 {
  margin: 0;
  font-size: 18px;
  color: #111;
}

.notification-settings-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.notification-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: #334155;
}

.notification-setting-row.master {
  font-weight: 700;
}

.notification-specific-toggle {
  width: 100%;
  margin-top: 12px;
  padding: 12px 0;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-specific-toggle .arrow {
  font-size: 12px;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.notification-specific-toggle.open .arrow {
  transform: rotate(180deg);
}

.notification-specific-list {
  padding-left: 4px;
}

.notification-settings-save {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.notification-settings-save:hover {
  background: #1d4ed8;
}

.notification-settings-divider {
  margin: 20px 0 14px;
  border-top: 1px solid #f1f5f9;
}

.notification-settings-delete {
  width: 100%;
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff;
  color: #dc2626;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.notification-settings-delete:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

@media (max-width: 768px) {
  .notification-panel {
    width: min(92vw, 340px);
    right: -8px;
  }
}

/* ====================== 사이드 메뉴 ====================== */
.side-menu {
  position: fixed;
  top: 0;
  right: -500px;
  width: 250px;
  height: 100%;
  background: #f9f9f9;
  box-shadow: -2px 0 5px rgba(0,0,0,0.2);
  transition: right 0.3s ease;
  padding: 20px;
  z-index: 1000;
}

.close-btn {
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 15px;
  user-select: none;
}

.side-menu ul {
  list-style: none;
  padding: 0;
  margin-top: 50px;
}

.side-menu ul li {
  margin: 15px 0;
}

.side-menu ul li a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

/* ====================== 드롭다운 네비게이션 ====================== */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 15px;        /* 로고 바로 오른쪽 */
}

.nav-item {
  position: relative;
}

.nav-item > a {
  color: #333;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.nav-item > a:hover {
  color: #111;
}

.arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.nav-item:hover .arrow {
  transform: rotate(180deg);
}

/* 드롭다운 */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  min-width: 180px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.dropdown a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.dropdown a:hover {
  background: #f5f5f5;
}

/* ====================== 사이드 메뉴 드롭다운 (클릭 전용) ====================== */

/* 사이드 드롭다운 기본: 숨김 */
.side-menu .dropdown {
  display: none;
  position: static;   /* 데스크톱처럼 absolute 아님 */
  box-shadow: none;
  border: none;
  border-radius: 0;
  margin-top: 0;    /* ← 이걸 추가 */
  padding: 0;
  padding-top: 0;
  opacity: 1;
  visibility: visible;
  background: transparent;
}

.side-menu .dropdown li:first-child {
  margin-top: 0;
}

/* active 클래스 붙을 때만 펼침 */
.side-menu .side-dropdown.active .dropdown {
  display: block;
}

/* 화살표 회전 */
.side-menu .dropdown-toggle .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.side-menu .side-dropdown.active .dropdown-toggle .arrow {
  transform: rotate(180deg);
}

/* 푸터 */
footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid #ddd;
  font-size: 14px;
}

.fot-text {
  font-weight: 2000;           /* 진하게 (700~900 사이로 조정 가능) */
  font-size: 1.05rem;         /* 글자 크기 (원하는 크기로 조정) */
  letter-spacing: -0.02em;    /* 자간 살짝 좁혀서 세련되게 */
  color: #000000;                /* 필요하면 색상 변경 */
  white-space: nowrap;        /* 줄바꿈 방지 */
}

/* 푸터 문의하기 링크 밑줄 제거 */
footer a,
#contact-link {
  text-decoration: none !important;
}

/* hover 시에도 밑줄 안 생기게 */
footer a:hover,
#contact-link:hover {
  text-decoration: none !important;
}

/* ====================== 모바일 헤더/레이아웃 ====================== */
@media (max-width: 768px) {
  header {
    padding: 8px 12px;
    gap: 8px;
  }

  .left-group {
    gap: 8px;
    min-width: 0;
    flex: 1;
  }

  .desktop-nav {
    display: none !important;
  }

  .logo-img {
    width: 28px;
    margin-right: 6px;
  }

  .header-right {
    gap: 6px;
  }

  .header-user-actions {
    margin-right: 4px;
    gap: 6px;
  }

  .header-login-btn {
    padding: 8px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .user-profile-avatar {
    width: 40px;
    height: 40px;
  }

  .header-sponsor-btn {
    width: 44px;
    height: 44px;
  }

  .header-sponsor-icon {
    width: 22px;
    height: 22px;
  }

  .notification-bell-btn {
    width: 44px;
    height: 44px;
  }

  .side-menu {
    width: min(86vw, 300px);
    right: -100%;
    padding: 16px;
    padding-top: 48px;
  }

  .side-menu.open,
  .side-menu.active {
    right: 0;
  }

  .side-menu ul li a,
  .side-menu .dropdown-toggle {
    display: block;
    padding: 12px 8px;
    min-height: 44px;
    line-height: 1.3;
  }

  .close-btn {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  footer {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    padding: 12px 16px;
  }

  .fot-text {
    white-space: normal;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 1.1rem;
  }

  .header-login-btn {
    padding: 8px;
    font-size: 12px;
  }
}

/* 미구현 메뉴 */
.nav-soon,
a.nav-soon {
  opacity: 0.55;
  cursor: not-allowed;
  font-style: italic;
}