:root{
  --bg:#0b0e16;
  --panel:#121726;
  --panel2:#0f1220;
  --card:#161b2e;
  --text:#e6e8f0;
  --muted:#9aa0b5;
  --primary:#00d2ff;
  --border:#1f2540;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --radius:16px;

  --topbar-h: 64px;
  --tabs-h: 48px;
  --footer-h: 56px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: Inter, Pretendard, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* APP FRAME */
.app{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* TOPBAR */
.topbar{
  height: var(--topbar-h);
  display:flex;
  align-items:center;
  gap:16px;
  padding:0 16px;
  background:var(--panel2);
  border-bottom:1px solid var(--border);
}
.topbar .left{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 180px;
}
.logo{
  font-weight:900;
  letter-spacing:.4px;
  font-size:20px;
}
.topbar .center{ flex:1; display:flex; justify-content:center; }
.search{
  width: min(560px, 100%);
  padding:10px 14px;
  border-radius:999px;
  border:1px solid transparent;
  background:#1a1f36;
  color:var(--text);
  outline:none;
}
.search:focus{ border-color: rgba(0,210,255,.35); }
.topbar .right{
  display:flex;
  align-items:center;
  gap:10px;
}


/* BUTTONS */
.btn{
  padding:8px 14px;
  border-radius:999px;
  border:1px solid transparent;
  cursor:pointer;
  user-select:none;
}
.btn.primary{
  background:linear-gradient(135deg,#00d2ff,#7f5cff);
  color:#070a12;
  font-weight:700;
}
.btn.outline{
  background:transparent;
  border-color:rgba(0,210,255,.65);
  color:var(--primary);
}
.btn.ghost{
  background:transparent;
  color:var(--muted);
}
.btn.ghost:hover{ color:var(--text); }
.btn.full{ width:100%; }

.icon-btn{
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:#141935;
  color:var(--text);
  cursor:pointer;
}
.icon-btn:hover{ background:#1a2040; }

.hide-mobile{ display:inline-flex; }

/* ===== 핵심: LAYOUT 높이를 "footer까지 포함"해서 고정 계산 =====
   화면 전체 높이(100vh) - (topbar + tabs)  만큼 layout이 차지
   footer는 fixed로 따로 떠있으니, layout은 그 아래까지 쭉 이어져 보이게 됨
*/
.layout{
  height: calc(100vh - var(--topbar-h) - var(--tabs-h));
  display:flex;
  position:relative;
  min-height:0;
}

/* OVERLAY (mobile) */
.overlay{
  display:none;
  position: fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  z-index:2000;
}
.overlay.show{ display:block; }

/* SIDEBAR */
.sidebar{
  width:260px;
  background:var(--panel);
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
  justify-content:space-between;

  /* ✅ footer가 fixed라서 안 가리게 */
  padding-bottom: var(--footer-h);
}
.sidebar-top{ padding:16px; flex:1; }
.sidebar-bottom{
  padding:14px 16px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:12px;
  margin-top:auto;
}
.ver{ display:flex; justify-content:flex-end; opacity:.9; }

/* TOKEN BOX */
.token-box{
  background:linear-gradient(135deg,#6a5cff,#9b7cff);
  padding:16px;
  border-radius:14px;
  box-shadow: var(--shadow);
  margin-bottom:18px;
}
.token-title{
  font-weight:900;
  font-size:18px;
  margin-bottom:6px;
  color:#0a0718;
}
.token-sub{
  font-size:12px;
  color:rgba(10,7,24,.75);
  margin-bottom:10px;
}

/* MENU */
.menu-title{
  margin:14px 0 8px;
  font-size:12px;
  color:var(--muted);
  letter-spacing:.6px;
}
.menu a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 10px;
  color:var(--muted);
  text-decoration:none;
  border-radius:10px;
  cursor:pointer;
}
.menu a:hover{
  background:#1c2240;
  color:var(--text);
}
.menu a.active{
  background:#1c2240;
  color:var(--text);
}
.pill{
  font-size:11px;
  padding:2px 8px;
  border-radius:999px;
  background:#242b4f;
  color:var(--text);
}

/* CONTENT */
.content{
  flex:1;
  padding:20px;
  overflow:auto;
  min-width:0;

  /* ✅ fixed footer 겹침 방지 */
  padding-bottom: calc(var(--footer-h) + 14px);
}

/* FEATURED */
.featured{
  position:relative;
  border-radius: var(--radius);
  padding:28px;
  min-height:240px;
  background:
    radial-gradient(circle at 80% 40%, rgba(127,92,255,.45), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(0,210,255,.35), transparent 55%),
    linear-gradient(180deg, #13183a, #0e1124);
  border:1px solid rgba(255,255,255,.06);
  box-shadow: var(--shadow);
  margin-bottom:22px;
}
.badge{
  display:inline-block;
  font-size:12px;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(0,210,255,.16);
  border:1px solid rgba(0,210,255,.35);
  color:var(--primary);
}
.featured h1{
  margin:14px 0 10px;
  font-size:42px;
  line-height:1.05;
}
.featured p{
  max-width:520px;
  color:var(--muted);
  margin:0;
}
.actions{
  margin-top:18px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.featured-live{
  position:absolute;
  top:18px;
  right:18px;
  background:#ff3b3b;
  color:#fff;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

/* SECTION HEAD */
.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin: 6px 0 12px;
}
.section-head h2{ margin:0; font-size:18px; }
.view-all{ color:var(--muted); cursor:pointer; }
.view-all:hover{ color:var(--text); }

/* CARDS */
.card-grid{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap:14px;
  padding-bottom: 10px;
}
.card{
  background:var(--card);
  border:1px solid rgba(255,255,255,.06);
  border-radius:14px;
  overflow:hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover{
  transform: translateY(-2px);
  border-color: rgba(0,210,255,.25);
}
.thumb{
  height:140px;
  background:
    linear-gradient(135deg, rgba(0,210,255,.20), rgba(127,92,255,.22)),
    #2a2f55;
  position:relative;
}
.thumb.live::after{
  content:"LIVE";
  position:absolute;
  top:10px;
  left:10px;
  font-size:11px;
  padding:3px 8px;
  border-radius:999px;
  background:#ff3b3b;
  color:#fff;
  font-weight:800;
}
.card-info{ padding:12px; }
.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.name{ font-weight:800; }
.flag{
  font-size:11px;
  padding:3px 8px;
  border-radius:999px;
  background:#232949;
  color:var(--text);
}
.meta{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
}
.tags{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.tags span{
  font-size:11px;
  padding:4px 8px;
  border-radius:999px;
  background:#252b4d;
  color:var(--text);
  border:1px solid rgba(255,255,255,.05);
}

/* FOOTER: fixed */
.footer{
  position: fixed;
  left:0;
  right:0;
  bottom:0;
  height: var(--footer-h);
  display:flex;
  align-items:center;

  background: rgba(11,14,22,.88);
  backdrop-filter: blur(10px);
  border-top:1px solid var(--border);
  padding: 0 18px;
  z-index: 5000;
}
.footer-inner{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:13px;
  color:var(--muted);
}
.footer-links a{ margin-left:12px; cursor:pointer; }
.footer-links a:hover{ color:var(--text); }

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 1200px){
  .card-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .featured h1{ font-size:36px; }
}

@media (max-width: 1024px){
  .card-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .hamburger{ display:inline-flex; }

  .sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 2100;

    transform: translateX(-105%);
    transition: transform .18s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open{ transform: translateX(0); }
}

@media (max-width: 640px){
  .topbar{ padding:0 12px; gap:10px; }
  .topbar .left{ min-width:auto; }
  .hide-mobile{ display:none; }
  .content{ padding:14px; padding-bottom: calc(var(--footer-h) + 14px); }



  .featured{ padding:18px; min-height:220px; }
  .featured h1{ font-size:28px; }
  .featured-live{ top:12px; right:12px; }

  .card-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px; }
  .thumb{ height:120px; }

  .footer-inner{
    flex-direction:column;
    align-items:flex-start;
  }
}

@media (max-width: 380px){
  .card-grid{ grid-template-columns: 1fr; }
}

/* sidebar menu icon + label layout */
.menu a{
  display:flex;
  align-items:center;
  gap:10px;
}

/* icon box */
.micon{
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:7px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  flex: 0 0 22px;
}

/* svg icon base */
.micon svg{
  width:14px;
  height:14px;
  fill: currentColor;
}

/* label grows */
.mlabel{
  flex:1;
}

/* mini text icon (KR 같은거) */
.micon .mini-text{
  font-size:10px;
  font-weight:800;
  letter-spacing:.6px;
  color: currentColor;
}

/* color tones (샘플처럼 항목별 아이콘 느낌) */
.tone-blue   { color: #59b9ff; }
.tone-gray   { color: #aeb6cf; }
.tone-orange { color: #ffb14a; }
.tone-cyan   { color: #35e0ff; }
.tone-purple { color: #b58cff; }
.tone-pink   { color: #ff6db3; }

/* CATEGORY TABS - refined */
.category-tabs{
  height: var(--tabs-h);
  display:flex;
  align-items:center;
  gap: 18px;
  padding: 0 16px;
  background: var(--panel2);
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: relative;
}

/* 스크롤 가능한 탭(모바일) */
.category-tabs{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar{ display:none; }

.category-tabs button{
  position: relative;
  background: transparent;
  border: 0;
  color: rgba(230,232,240,.72);
  font-size: 14px;
  padding: 10px 6px;
  cursor: pointer;
  letter-spacing: .2px;
  transition: color .15s ease, transform .15s ease;
  white-space: nowrap;
}

/* hover */
.category-tabs button:hover{
  color: rgba(230,232,240,.92);
  transform: translateY(-1px);
}

/* active: 텍스트는 더 밝게 + 밑줄 인디케이터 */
.category-tabs button.active{
  color: var(--text);
  font-weight: 700;
}

.category-tabs button.active::after{
  content:"";
  position:absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #00d2ff, #7f5cff);
  box-shadow: 0 6px 16px rgba(0,210,255,.22);
}

/* 탭 영역 상단에 은은한 라이트 */
.category-tabs::before{
  content:"";
  position:absolute;
  inset: 0;
  /* pointer-events:none; */
  background: radial-gradient(circle at 10% 50%, rgba(0,210,255,.10), transparent 45%);
  opacity: .9;
}




/* ===== Form controls (force) ===== */
.input{
  width:100%;
  height: 42px;
  padding: 10px 12px;
  border-radius: 12px;

  background: rgba(26,31,54,.75);
  color: var(--text);

  border: 1px solid rgba(255,255,255,.08);
  outline: none;

  font-size: 14px;
  font-weight: 700;

  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.input::placeholder{
  color: rgba(230,232,240,.45);
  font-weight: 600;
}

.input:focus{
  border-color: rgba(0,210,255,.35);
  box-shadow: 0 0 0 4px rgba(0,210,255,.12);
  background: rgba(26,31,54,.90);
}

/* select는 기본 UI가 강해서 appearance 제거 + 커스텀 화살표 */
select.input{
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  padding-right: 42px; /* 화살표 자리 */
  cursor: pointer;

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(230,232,240,.7) 50%),
    linear-gradient(135deg, rgba(230,232,240,.7) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 12px) 18px,
    100% 0;
  background-size:
    6px 6px,
    6px 6px,
    2.6em 2.6em;
  background-repeat: no-repeat;
}

select.input:hover{
  border-color: rgba(255,255,255,.14);
}

/* option 기본 색 */
select.input option{
  background: #0f1220;
  color: var(--text);
}

/* label 살짝 정리 */
.field label{
  display:block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(230,232,240,.70);
  letter-spacing: .2px;
}

/* form grid가 너무 붙어보이면 */
.hb-form .field{
  min-width: 0;
}

/* ===== Brand (logo image + text) ===== */
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: inherit;
}

.brand-logo{
  width: 100%;
  height: 34px;
  /* border-radius: 10px; */
  object-fit: cover;
  /* border: 1px solid rgba(255,255,255,.10); */
  background: rgba(255,255,255,.0);
  /* box-shadow: 0 10px 24px rgba(0,0,0,.25); */
}

/* 텍스트 로고는 기존 .logo 그대로 쓰되 살짝 정렬만 */
.brand .logo{
  margin:0; /* 기존에 margin 있으면 제거 */
  line-height:1;
}