/* ⭐ 1. 스크롤바 공간을 항상 고정하여 페이지 이동 시 좌우 꿀렁임 원천 차단 */
html { 
    background-color: #011641;
    overflow-y: scroll; 
    color-scheme: dark;
}
body {
    margin: 0;
    background-color: #011641;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ⭐ 2. 상단 고정 헤더 */
.custom-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 32px;
    background-color: #011641;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-sizing: border-box;
    z-index: 1000;
}

.custom-header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 18px;
    gap: 8px;
}
.custom-header .logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
}
.custom-header .logo-trust {
    color: #f0b90b;
}

/* ⭐ 3. 알약형 네비게이션 */
.navbar-capsule {
    display: flex;
    align-items: center;
    background: rgba(1, 15, 51, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px;
    border-radius: 9999px;
    flex-shrink: 0;
    box-sizing: border-box;
}
.navbar-capsule .nav-item {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 9999px;
    transition: color 0.2s ease-in-out;
    white-space: nowrap;
    border: 1px solid transparent; 
}
.navbar-capsule .nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9), rgba(30, 27, 75, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.35);
}

/* ⭐ 4. 로그인/회원가입 - 네 원래 디자인 그대로 유지 */
.auth-container {
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-container .btn-login {
    background: transparent;
    color: #f0b90b;
    border: 1px solid rgba(240, 185, 11, 0.4);
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.auth-container .btn-login:hover {
    background: #f0b90b;
    color: #000;
}
.auth-container .btn-register {
    background: #f0b90b;
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}
.mobile-menu-toggle .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 3px;
}

/* ⭐ 5. 본문 영역 */
.common-main-wrapper {
    min-height: calc(100vh - 64px);
    background: #0b0e14;
    padding-top: 64px;
}

/* ⭐ 6. 모바일 */
@media (max-width: 768px) {
  .custom-header { 
    padding: 0 16px; 
    position: fixed;
    z-index: 1000;
  }
  .mobile-menu-toggle { 
    display: flex !important; 
    position: relative !important;
    z-index: 9999 !important;
    pointer-events: auto !important;
  }
  .navbar-capsule {
    display: none;
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    background: #151a23;
    border: 1px solid #2b313a;
    border-radius: 16px;
    padding: 8px;
    z-index: 9998;
  }
  .navbar-capsule.open {
    display: flex !important;
  }
  .navbar-capsule .nav-item {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
  }

  /* ⭐️ 추가된 부분: 모바일 헤더에서 복잡해지는 PC 우측 영역을 숨기고, 햄버거 내부 인증 박스 정렬 세팅 */
  .custom-header .header-right {
    display: none !important;
  }
  #mobile-auth {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 6px;
    box-sizing: border-box;
  }
}

/* PC 화면에서는 모바일용 인증 박스가 보이지 않도록 처리 */
@media (min-width: 769px) {
  #mobile-auth {
    display: none !important;
  }
}