/* KRONA Stake Style Integration */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');
@import url('https://cdn.jsdelivr.net/gh/sun-typeface/SUIT/fonts/static/woff2/SUIT.css');
/* @import url('https://rsms.me/inter/inter.css'); */
:root {
  --primary-gold: #D4AF37;
  --dark-bg: #0f172a;
  --card-bg: #1e293b;
  --text-gray: #94a3b8;
  --krona-cyan: #00f2fe;
  --glass-bg: rgba(30, 41, 59, 0.35);  
  --sidebar-width: 250px;
}

body {
  background-color: var(--dark-bg);
  color: white;
  /* font-family: 'Inter', sans-serif; */

  font-family: 'Pretendard', 'SUIT', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.2px; /* 기본 자간: 살짝 좁혀서 가독성 향상 */
  -webkit-font-smoothing: antialiased; /* 폰트를 더 매끄럽게 */

  /* background-image: radial-gradient(circle at 50% 0%, #2a2a35 0%, #0f172a 70%); */
  background-attachment: fixed;
  background-size: cover;
  
  /* height 대신 min-height 사용 */
  min-height: 100vh; 
  /* 모바일 브라우저 주소창 대응 (Dynamic Viewport Height) */
  min-height: 100dvh; 

  

  /* display: flex;
  align-items: center;
  justify-content: center; */
  display: block !important;

  /* 중요: 전체 스크롤을 막는 대신 가로만 막고 세로는 상황에 따라 허용 */
  overflow-x: hidden; 
  overflow-y: auto; 
  
  /* padding-bottom: 80px; 하단 버튼 가림 방지 여백 */

  /* 5. 아이폰 노치/하단 바 대응 (Safe Area) */
  /* 아이폰 밑에 있는 홈 바(Home Indicator)에 버튼이 가려지는 것 방지 */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

h1, h2, h3, h4, h5, .plan-label-inner, .text-uppercase {
  letter-spacing: 0.2px; /* 타이틀 자간: 살짝 넓혀서 개방감 부여 */
}

/* (선택사항) 모바일에서 스크롤바 숨기기 (기능은 유지하되 디자인만 깔끔하게) */
body::-webkit-scrollbar {
  display: none; /* 크롬, 사파리 등 */
}

.num {
  font-family: 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.em {
  font-weight: 600;
  color: #e6e8eb;
}

.border-gold {
  border: 1px solid rgba(212, 175, 55, 0.5) !important;
}

.label-sub {
  font-size: 11px;
  color: #8b9099;
  font-weight: 400;
}

body {
  -ms-overflow-style: none;  /* IE, Edge */
  scrollbar-width: none;  /* 파이어폭스 */
}

/* 2. [NEW] 로그인/회원가입 전용 중앙 정렬 래퍼 */
.auth-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  
  /* 화면 전체 높이를 차지해야 정중앙에 옵니다 */
  min-height: 100vh; 
  min-height: 100dvh; /* 모바일 브라우저 대응 */
  
  width: 100%;
  padding: 20px; /* 모바일에서 좌우 여백 확보 */
  
  /* (선택) 배경이 필요하다면 여기에 그라데이션 추가 */
  /* background: radial-gradient(...); */
}

.gold-ticker {
  background: linear-gradient(90deg, #1e293b, #000);
  border-bottom: 1px solid #334155;
 
  font-weight: 600;
  padding: 8px 0;
  font-size: 0.9rem;
  margin-top: 0 !important;
  border-top-left-radius: 0 !important; /* 상단이 둥글면 떠 보일 수 있음 */
  border-top-right-radius: 0 !important;
}

.text-gold{
  color: var(--primary-gold);
}

/* 유리 질감 카드 (Glassmorphism) */
.glass-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);

  /* ★ 핵심: 고정 너비(460px) 대신 부모 그리드에 맞춤 */
  width: 100% !important; 
  height: 100%; /* 옆 카드와 높이 맞추기 위해 */
  
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 호버 효과 (살짝 뜸) */
.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

/* 1. 사이드바 (Slower Motion) */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width) !important;
  /* margin-left:  var(--sidebar-width); 기본은 숨김 (모바일 우선 정책) */
  height: 100vh;    
  z-index: 1050 !important; /* SweetAlert 기본값(1060)보다 낮아야 함 */
  transform: translateX(-100%);
  
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  /* border:none; */
  
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* 내용이 넘치면 세로 스크롤 생성 */
  overflow-x: hidden;

  /* 스크롤바 커스텀 (디자인을 해치지 않게 슬림하게) */
  scrollbar-width: none;
  -ms-overflow-style: none;
  scrollbar-color: rgba(212, 175, 55, 0.3) transparent;

  /* 1. 기본 상태: 화면 왼쪽 밖 */
  transform: translateX(-100%);
    
  /* 2. 애니메이션 설정: 'transform'에 대해서만 0.3초간 작동 */
  transition: transform 0.3s ease-in-out;
  
  /* 3. visibility는 굳이 hidden일 필요 없습니다. 밖으로 나가 있으니까요. */
  visibility: visible;
}

/* 크롬, 사파리용 스크롤바 디자인 */
#sidebar::-webkit-scrollbar {
  width: 0px;       /* 아예 너비를 없앰 */
  background: transparent; /* 배경 투명 */
}

/* 선택 사항: 마우스를 올렸을 때만 아주 가늘게 보여주고 싶다면? */
#sidebar:hover::-webkit-scrollbar {
  width: 2px;
}
#sidebar:hover::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.1); /* 아주 연한 골드빛 */
  border-radius: 10px;
}

.sidebar-profile {
  background: rgba(0, 0, 0, 0.1);
}

.sidebar-heading { 
  padding: 2rem 1rem; 
  text-align: center; 
  /* border-bottom: 1px solid rgba(255,255,255,0.1); */
}

#sidebar .nav {
  flex: 1 0 auto; /* 메뉴가 적어도 늘어나게 */
  padding-bottom: 80px; /* 최하단 로그아웃 버튼이 가려지지 않게 여유분 */
}

#sidebar .sidebar-footer {
  position: sticky;
  bottom: 0;
  background: var(--glass-bg); /* 사이드바 배경색과 동일하게 */
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: auto; /* 하단 밀착 */
}

/* 메뉴 링크 스타일 */
.sidenav-link {
  color: rgba(255,255,255,0.6); 
  padding: 18px 25px; 
  font-size: 16px;
  display: flex; 
  align-items: center; 
  transition: all 0.3s; 
  text-decoration: none;
  border-left: 4px solid transparent; /* 호버 효과 준비 */
}

.sidenav-link i { 
  width: 25px; 
  text-align: center; 
  margin-right: 15px; 
}

#main-header{
  z-index: 1000;
}

/* 1. 기본 봉쇄 (로그인 전) */
#main-header, #sidebar, #overlay {
  display: none !important;
}

/* 2. 봉쇄 해제 (로그인 후 body.is-authenticated 상태일 때) */
body.is-authenticated #main-header {
  display: flex !important; /* 헤더 등장 */
}

/* ★ 오버레이 추가: 로그인 상태여도 평소엔 숨겨져 있다가, '필요할 때만' display: block이 되어야 함 */
body.is-authenticated #overlay {
  display: block !important; /* 이제 display: none 봉쇄가 풀립니다 */
  
  /* 하지만 평소엔 투명하게 숨겨둠 (애니메이션을 위해) */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 3. 사이드바가 열렸을 때 (최종 활성화) */
body.sidebar-open #overlay {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.is-authenticated #sidebar {

  display: block !important; /* DOM에는 존재하게 함 */

  transform: translateX(-100%); /* 하지만 위치는 화면 밖 */

  transition: transform 0.3s ease-in-out; /* 애니메이션 준비 */

}

/* 3. 사이드바 열기 (active 클래스 활용) */
#sidebar.active {
  transform: translateX(0) !important;
}

body.is-authenticated #overlay.active {
  display: block !important;
  opacity: 1;
}

/* 지갑 버튼 슬림화 */
#btn-connect-wallet {
  box-shadow: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#btn-connect-wallet:hover {
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.wallet-status-box {
  transition: all 0.3s ease;
}
.wallet-status-box:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* 활성화(Active) 및 호버 스타일 */
.sidenav-link:hover, .sidenav-link.active {
  color: #fff; 
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, transparent 100%); /* Gold Tint */
  border-left-color: var(--primary-gold); 
}

/* 화려한 시각적 뱃지 스타일 */
.tier-badge {
  background: rgba(212, 175, 55, 0.1); color: var(--primary-gold); padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; border: 1px solid var(--primary-gold);
}

/* STAR 5: 오로라 광택 + 애니메이션 고정 */
.tier-star5 {
  background: linear-gradient(-45deg, #f59e0b, #ef4444, #8b5cf6, #06b6d4);
  background-size: 300% 300%;
  animation: gradient-flow 5s ease infinite;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* STAR 1~2: 골드/실버 메탈릭 느낌 */
.tier-star1 {
  background: linear-gradient(135deg, #fcd34d 0%, #d97706 100%);
  color: #451a03;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.logout-trigger:hover i {
  color: #ef4444;
  transform: scale(1.1);
  transition: all 0.3s;
}

.btn-close-sidebar {
  position: absolute;
  top: 15px;      /* 위에서 15px */
  right: 15px;    /* 오른쪽에서 15px */
  
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5); /* 은은한 회색 */
  font-size: 1.5rem; /* 아이콘 크기 키움 */
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  padding: 5px; /* 터치 영역 확보 */
}

/* 지갑 아이콘 원형 배경 */
.wallet-icon-circle {
  width: 24px;
  height: 24px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 전원 아이콘 호버 효과 */
.fa-power-off:hover {
  color: #ef4444; /* 마우스 올리면 붉은색으로 변하게 */
  transition: color 0.3s;
}

/* 텍스트 간격 조정 */
.x-small { font-size: 0.7rem; }
.text-white-30 { color: rgba(255, 255, 255, 0.3); }

/* 호버하거나 눌렀을 때 */
.btn-close-sidebar:hover,
.btn-close-sidebar:active {
  color: #fff;       /* 흰색으로 밝게 */
  transform: rotate(90deg); /* 뱅글 도는 애니메이션 (재미 요소) */
}

/* 2. 오버레이 (배경 어둡게) */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.sidebar-open #overlay {
  opacity: 1;
  visibility: visible;
  
  /* ★ 중요: 이때만 클릭 가능하게 변경 */
  pointer-events: auto; 
  cursor: pointer; /* 손가락 모양 커서 (클릭 가능하다는 힌트) */
}

/* 햄버거 버튼 눌러서 열렸을 때 (JS가 body에 sidebar-open 클래스 줄 때) */
body.sidebar-open #sidebar {
  transform: translateX(0); /* 튀어나옴 */
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: 1.2rem;
  position: relative;
}

label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
  display: block;
  margin-left: 5px;
}

/* 입력창: Login 페이지 스타일 (custom-input-group 느낌) */
.form-control, input[type="text"], input[type="email"], input[type="password"] {
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
  height: 48px;
  border-radius: 12px;
  font-size: 15px;
  width: 100%;
  padding: 10px 15px;
  display: block;
  transition: all 0.3s ease;
}

.form-control:focus, input:focus {
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3) !important;
  background: rgba(0, 0, 0, 0.4) !important;
  outline: none;
}

/* 입력 필드 스타일링 */
.custom-input-group {
  position: relative;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.custom-input-group:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.custom-input-group .form-control-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 16px;
  z-index: 10;
}

.custom-input-group input {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  padding: 15px 15px 15px 45px; /* 아이콘 공간 확보 */
  height: auto;
  font-size: 15px;
  width: 100%;
  border-radius: 12px;
}

.custom-input-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.custom-input-group input:focus {
  box-shadow: none;
  background: transparent;
}

/* 어두운 테마에서의 입력창 스타일 */
.form-control-dark {
  background-color: rgba(0, 0, 0, 0.4) !important; /* 더 어둡게 눌러주거나 */
  border: 1px solid rgba(255, 255, 255, 0.15) !important; /* 테두리를 조금 더 선명하게 */
  color: #fff !important;
}

.form-control-dark:focus {
  background-color: rgba(0, 0, 0, 0.6) !important;
  border-color: var(--primary-gold) !important; /* 포커스 시 골드 테두리 */
  box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}
/* 버튼 스타일 (그라데이션) */
.btn-krona {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); /* 예시: 청록 계열 */
  /* 만약 Stake 페이지가 보라색 계열이라면 아래 주석을 해제해서 쓰세요 */
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  
  border: none;
  color: #000;
  font-weight: 700;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  letter-spacing: 0.5px;
  width: 100%;
  transition: all 0.3s ease;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
  /* cursor: pointer; */
}

.btn-krona:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
  color: #000;
}

.btn-secondary-krona {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 12px;
  font-size: 13px;
  border-radius: 12px;
  width: 100%;
  margin-top: 10px;
  transition: all 0.3s;
}
.btn-secondary-krona:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.btn-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #AA8A2E 100%);
  border: none; color: black; font-weight: 800; transition: all 0.3s ease;
}
.btn-gold:hover {
  transform: translateY(-2px); box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4); color: black;
}
.btn-outline-gold {
  border: 1px solid var(--primary-gold); color: var(--primary-gold); background: transparent;
}
.btn-outline-gold:hover {
  background: var(--primary-gold); color: black;
}

/* --- Progress Bar --- */
.progress-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  position: relative;
  padding: 0 20px;
}

.progress-line-bg {
  position: absolute;
  top: 50%;
  left: 30px;
  right: 30px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.progress-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
  transition: all 0.3s;
}

/* 활성화된 스텝: Cyan 테마 적용 */
.progress-step.active {
  background: #00f2fe; /* 버튼 색상 중 하나 */
  color: #000;
  border-color: #00f2fe;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.signup-step {
  display: none;
  /* 애니메이션 효과 */
  animation: fadeInUp 0.5s; 
}
.signup-step.active {
  display: block;
}

/* --- Validation & Info --- */
.error-message {
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 5px;
  padding-left: 5px;
}

.timer {
  position: absolute;
  right: 15px;
  top: 40px; /* label 고려 */
  color: #00f2fe; /* 타이머도 Cyan */
  font-size: 13px;
  font-weight: bold;
}

.info-box {
  background: rgba(79, 172, 254, 0.1); /* 푸른빛이 도는 박스 */
  border-radius: 12px;
  padding: 15px;
  margin-top: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(79, 172, 254, 0.3);
}

/* --- Modal (Glass style) --- */
.modal {
  display: none; 
  position: fixed; 
  z-index: 9999; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  background-color: rgba(0,0,0,0.7); 
  backdrop-filter: blur(8px); /* 배경 더 흐리게 */
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: auto;
  padding: 40px 30px;
  width: 90%;
  max-width: 400px;
  border-radius: 24px;
  text-align: center;
  color: #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* 링크 텍스트 */
.link-sub {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.3s;
}
.link-sub:hover {
  color: #fff;
}

/* 로고 영역 */
.logo-container {
  margin-bottom: 30px;
  position: relative;
}

/* 배경 장식용 빛 (선택 사항) */
.glow-effect {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(79, 172, 254, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
}

/* 애니메이션 */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}


/* [PC/태블릿] 화면이 넓을 때는 카드의 너비를 픽셀 단위로 '강제 고정' 합니다 */
@media (min-width: 768px) {
  .glass-card {
      /* 내용물이 적든 많든 무조건 460px로 고정 (원하는 크기로 조절 가능) */
      width: 460px !important; 
      
      /* 혹시 모를 레이아웃 꼬임 방지 */
      min-width: 460px !important;
      margin: 0 auto; /* 중앙 정렬 확실하게 */
  }
}

/* [모바일] 화면이 좁을 때는 꽉 차게 (기존 유지) */
@media (max-width: 767px) {
  .glass-card {
      width: 100% !important;
      min-width: 0 !important;
  }
}

/* [모바일: 992px 미만] - 사이드바 숨김, 하단 버튼 보임 */
@media (max-width: 991.98px) {
    
  /* 사이드바 숨김 (왼쪽으로 보냄) */
  #sidebar {
      transform: translateX(-100%);
  }

  /* 컨텐츠는 꽉 차게 */
  #page-content-wrapper {
      margin-left: 0 !important;
      width: 100% !important;
  }


  /* 하단 버튼 보임 */
  #bottom-menu-toggle { display: flex !important;}
}

#pwa-install-menu .sidenav-link {
  border: 1px dashed rgba(212, 175, 55, 0.4); /* 골드 점선 테두리 */
  margin: 10px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
}

#pwa-install-menu .sidenav-link:hover {
  background: rgba(212, 175, 55, 0.2);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3); /* 은은한 골드 광채 */
}

/* ============================================================
 [PC: 992px 이상]
 ============================================================ */
@media (min-width: 992px) {
  
  /* 1. 사이드바: 항상 보임 & 제자리 찾기 */
  #sidebar {
      transform: translateX(0) !important;
      left: 0 !important;
      /* 혹시나 width가 지정 안 되어 있을까봐 안전장치 */
      width: 250px !important; 
  }

  /* 2. 오버레이 & 하단 버튼: 숨김 */
  #overlay, 
  #bottom-menu-toggle { 
      display: none !important; 
  }

  /* 3. ★ [핵심 해결] 컨텐츠 영역 계산 */
  #page-content-wrapper {
      /* 왼쪽을 사이드바 너비만큼 밉니다 */
      margin-left: 250px !important; 
      
      /* ★ [중요] 전체 폭에서 250px를 뺀 만큼만 차지해라! */
      /* 이걸 안 하면 오른쪽으로 250px만큼 튀어나갑니다. */
      width: calc(100% - 250px) !important; 
  }
}

#app-view {
  padding-top: 0 !important; /* app-view 상단 여백 강제 제거 */
  z-index: 1;
}


#main-top-nav {
  position: sticky;
  transition: all 0.3s ease;
  width: 100%;
  height: 60px; /* 고정 높이 */
  z-index: 1000;
}

@media (min-width: 992px) {
  /* 대시보드 메인 상단바 */
  #main-top-nav .navbar-brand { 
      margin-left: 260px !important;
  }

}

#main-top-nav.d-none {
  display: none !important;
}

.btn-back-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-back-circle:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.4);
  color: #d4af37;
  transform: translateX(-3px); /* 뒤로 가는 듯한 시각적 피드백 */
}

.sub-page-header .header-title h4 {
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

/* --- 5. 하단 투명 플로팅 버튼 (New!) --- */
#bottom-menu-toggle {
  position: fixed;
  top: 5px;       /* 상단에서 약간 띄움 */
  right: 5px;     /* 우측에서 약간 띄움 */
  left: auto;      /* 기존 중앙 정렬 해제 */
  transform: none; /* 기존 중앙 정렬 해제 */
  z-index: 1060;
  
  /* 투명도 높임 (컨텐츠가 비쳐 보이도록) */
  background: rgba(15, 23, 42, 0.4); 
  backdrop-filter: blur(4px); /* 뒤에 글씨가 살짝 흐리게 비침 */
  -webkit-backdrop-filter: blur(4px);
  
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px; /* 알약 모양 */
  padding: 8px 20px;
  
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* 스크롤 유도를 위한 미세한 움직임 */
#bottom-menu-toggle:active {
  transform: translateX(-50%) scale(0.95);
  background: rgba(15, 23, 42, 0.6);
}

/* 텍스트 & 아이콘 스타일 */
.toggle-text {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.toggle-icon {
  color: var(--krona-cyan);
  font-size: 18px;
}

/* [Referral Modal Styles] */

.btn-social {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.btn-social:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  color: white;
}

/* 브랜드별 색상 */
.telegram { background: #0088cc; } /* 텔레그램 파랑 */
.twitter  { background: #1DA1F2; } /* 트위터 하늘 */
.whatsapp { background: #25D366; } /* 왓츠앱 초록 */

/* 인풋창 포커스 시 효과 */
.referral-popup input:focus {
  box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
  border-color: var(--primary-gold);
}

.preload * {
  transition: none !important;
}

