/* 배너 섹션 */
.banner-section {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 0;
  margin-top: 8px;
}

.banner-section .banner-link {
  display: inline-block;
  line-height: 0;
  flex-shrink: 0;
}

.banner-section .banner-img {
  width: 150px;
  height: 50px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

/* 데스크톱: 배너 한 줄 고정, 넘치면 가로 스크롤로 세로 공간 절약 */
@media (min-width: 768px) {
  .banner-section {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0;
    margin-top: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .banner-section::-webkit-scrollbar {
    height: 6px;
  }
  .banner-section::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
  }
}


/* 공지사항: 100% basis로 항상 다음 줄에만 표시 (헤더 flex 유지) */
.notice-row {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #e2e8f0;
}
.notice-section {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
}
.notice-section .notice-label {
  font-weight: 700;
  color: #475569;
  flex-shrink: 0;
}
.notice-section .notice-list {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notice-section .notice-item {
  color: #0ea5e9;
  text-decoration: none;
}
.notice-section .notice-item:hover {
  text-decoration: underline;
}
.notice-section .notice-sep {
  color: #cbd5e1;
  margin: 0 4px;
}
#header .notice-section .notice-item {
  color: #0ea5e9 !important;
}
#header .notice-section .notice-item:hover {
  color: #0284c7 !important;
  text-decoration: underline !important;
}

/* 브랜딩 + 공지 한 줄 (타이틀 옆에 공지) */
#branding .branding-with-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  width: 100%;
  min-width: 0;
}
#branding .branding-with-notice #site-name {
  margin: 0;
  flex-shrink: 0;
}
.notice-in-header {
  flex: 1;
  min-width: 0;
}
.notice-in-header .notice-section {
  margin: 0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
}
.notice-in-header .notice-list {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.notice-in-header .notice-empty {
  color: #94a3b8;
  font-size: 0.95em;
}

/* Admin quick links and player list styles */

/* Django 관리자 헤더 - 흰색 배경, flex row+wrap 유지(공지만 다음 줄로) */
#header {
  background: #fff !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
}

/* 헤더 링크 - 진한 텍스트 */
#header a:link,
#header a:visited {
  color: #1e293b !important;
}

#header a:hover {
  color: #334155 !important;
}

#branding h1, #branding h1 a:link, #branding h1 a:visited {
  color: #1e293b !important;
  font-weight: 700 !important;
}

#branding h1 a {
  display: block;
  text-decoration: none;
}

/* 모바일에서 헤더 여백 축소 */
@media (max-width: 768px) {
  #header {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }
  #branding .branding-with-notice {
    gap: 8px 12px;
  }
  .notice-in-header .notice-section {
    padding: 4px 10px;
    font-size: 12px;
  }
}

#branding .site-title {
  display: block;
  font-size: 1.1em;
}

#branding .site-slogan {
  display: block;
  font-size: 0.7em;
  font-weight: 500;
  color: #64748b !important;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

#branding h1 a:hover {
  color: #334155 !important;
}

/* 사용자 도구 영역 */
#user-tools {
  color: #64748b !important;
}

#user-tools a:link,
#user-tools a:visited {
  color: #475569 !important;
}

#user-tools a:hover {
  color: #334155 !important;
}

#oh-quick-links { margin-top:6px; }
#oh-quick-links .button {
  display:inline-block;
  padding:4px 8px;
  border-radius:4px;
  background:#475569;
  color:#fff;
  text-decoration:none;
}

#oh-top-links { display:flex; gap:1rem; align-items:center; margin-top:6px; }
#oh-top-links .oh-link { color:#475569; background:transparent; padding:6px 8px; text-decoration:none; border-radius:4px }
#oh-top-links .oh-link:hover { background: #f1f5f9; color:#334155; }

/* common top nav - 탭형 스타일 */
#header .common-top-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  margin-top: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

#header .common-top-nav .nav-item {
  display: flex !important;
  align-items: center;
  gap: 5px;
  color: #64748b !important;
  text-decoration: none !important;
  padding: 8px 12px !important;
  border-radius: 6px 6px 0 0 !important;
  transition: color 0.2s ease, background 0.2s ease;
  font-weight: 600 !important;
  font-size: 14px !important;
  position: relative;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#header .common-top-nav .nav-item .nav-text {
  display: inline-block;
}

#header .common-top-nav .nav-item:hover {
  color: #334155 !important;
  background: #f1f5f9 !important;
  text-decoration: none !important;
}

#header .common-top-nav .nav-item:hover::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #475569;
  border-radius: 1px;
}

/* Active state - 밑줄 표시 */
#header .common-top-nav .nav-item.active {
  color: #334155 !important;
  font-weight: 700;
  background: transparent !important;
}

#header .common-top-nav .nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #334155;
  border-radius: 1px;
}

#header .common-top-nav .nav-item.active:hover::after {
  background: #334155;
}

/* 하키여기어때 메뉴: 선택 시 붉은색 포인트 */
#header .common-top-nav .nav-item.nav-item-here.active {
  color: #dc2626 !important;
}
#header .common-top-nav .nav-item.nav-item-here.active::after {
  background: #dc2626;
}
#header .common-top-nav .nav-item.nav-item-here.active:hover::after {
  background: #b91c1c;
}

/* 하키튜브: 선택 시 붉은색 포인트 (하키여기어때와 동일) */
#header .common-top-nav .nav-item.nav-item-youtube.active {
  color: #dc2626 !important;
}
#header .common-top-nav .nav-item.nav-item-youtube.active::after {
  background: #dc2626;
}
#header .common-top-nav .nav-item.nav-item-youtube.active:hover::after {
  background: #b91c1c;
}

/* 샵여기어때: 활성 시 연두 계열 (샵 페이지 테마) */
#header .common-top-nav .nav-item.nav-item-shop.active {
  color: #15803d !important;
}
#header .common-top-nav .nav-item.nav-item-shop.active::after {
  background: #15803d;
}
#header .common-top-nav .nav-item.nav-item-shop.active:hover::after {
  background: #166534;
}

/* 장비가격비교: 선택(active)일 때만 금색, 기본은 다른 메뉴와 동일 */
#header .common-top-nav .nav-item.nav-item-equipment.active {
  color: #fbbf24 !important;
}
#header .common-top-nav .nav-item.nav-item-equipment.active::after {
  background: #fbbf24;
}
#header .common-top-nav .nav-item.nav-item-equipment.active:hover::after {
  background: #fcd34d;
}

/* 하키러브: 파란색 강조 (팀정보 우측) */
#header .common-top-nav .nav-item.nav-item-hockeylove {
  color: #1d4ed8 !important;
  background: #dbeafe !important;
}
#header .common-top-nav .nav-item.nav-item-hockeylove:hover {
  color: #1e40af !important;
  background: #bfdbfe !important;
}
#header .common-top-nav .nav-item.nav-item-hockeylove:hover::after {
  background: #2563eb;
}

/* 로그아웃 POST 폼 (Django 5.0 LogoutView는 POST만 허용) */
#header .common-top-nav .nav-logout-form {
  display: inline-flex;
  margin: 0;
}

#header .common-top-nav .nav-item-btn {
  display: flex !important;
  align-items: center;
  gap: 5px;
  color: #64748b !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  transition: color 0.2s ease, background 0.2s ease;
  font-weight: 600 !important;
  font-size: 14px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  font-family: inherit;
  position: relative;
}

#header .common-top-nav .nav-item-btn:hover {
  color: #334155 !important;
  background: #f1f5f9 !important;
}

#header .common-top-nav .nav-item-btn:hover::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #475569;
  border-radius: 1px;
}

/* 오픈하키밴드 - 네이버 연두색 (탭형에서 특수 강조) */
#header .common-top-nav .nav-item-band {
  color: #166534 !important;
}
#header .common-top-nav .nav-item-band:hover {
  color: #15803d !important;
  background: #f0fdf4 !important;
}

/* Responsive design - 탭형 / 모바일: 한 줄 가로 슬라이딩 */
@media (max-width: 768px) {
  #header .common-top-nav {
    gap: 0.15rem;
    padding-bottom: 2px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
  }
  #header .common-top-nav::-webkit-scrollbar {
    display: none;
  }
  
  #header .common-top-nav .nav-item,
  #header .common-top-nav .nav-item-btn {
    padding: 6px 10px !important;
    font-size: 15px;
    flex-shrink: 0;
  }
  
  #header .common-top-nav .nav-logout-form {
    flex-shrink: 0;
  }
  
  #header .common-top-nav .nav-item .nav-text,
  #header .common-top-nav .nav-item-btn .nav-text {
    display: inline-block;
    font-size: 15px;
  }
  
  #header .common-top-nav .nav-item:hover::after,
  #header .common-top-nav .nav-item.active::after,
  #header .common-top-nav .nav-item-btn:hover::after {
    left: 8px;
    right: 8px;
  }
}

/* Player list page */
.player-tools { display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; }
.player-tools .search-form { margin:0; }
.player-tools .button { text-decoration:none; padding:6px 10px; background:#475569; color:#fff; border-radius:4px; }

table.player-list { border-collapse:collapse; width:100%; }
table.player-list th, table.player-list td { border:1px solid #e0e0e0; padding:6px; text-align:left; }

.pagination { margin-top:1rem; }
.pagination a.next { margin-left:1rem; }

/* 로그인/인증 페이지: 헤더·버튼 글자 가시성 보장 (admin #content 상속 무시) */
#content .login-header h1,
#content .login-header p,
#content .auth-header h1,
#content .auth-header p,
#content .social-login-header h1,
#content .social-login-header p {
  color: #fff !important;
}
#content .login-actions .btn-primary,
#content .auth-actions .btn-primary,
#content .social-login-form button[type="submit"] {
  color: #fff !important;
}
#content .login-body,
#content .auth-body,
#content .social-login-body {
  color: #1e293b;
}
