.container { width: 1180px; margin: 0 auto; padding: 0 16px; }

.header { border-bottom: 1px solid #eaeaea; background: #fff; position: sticky; top: 0; z-index: 10; }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }

.logo { font-weight: 800; letter-spacing: .5px; }

.gnb { display: flex; gap: 18px; align-items: center; }
.gnb a { padding: 10px 6px; font-weight: 600; opacity: .9; }
.gnb a:hover { opacity: 1; }

.header__right { display: flex; align-items: center; gap: 16px; }
.lang { display: flex; gap: 10px; font-size: 12px; opacity: .75; }
.auth { display: flex; gap: 10px; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 10px; border: 1px solid #ddd; background: #fff; }
.btn--primary { border-color: #111; background: #111; color: #fff; }

.card { border: 1px solid #eaeaea; border-radius: 14px; background: #fff; }
.card__hd { padding: 14px 16px; border-bottom: 1px solid #f0f0f0; font-weight: 800; }
.card__bd { padding: 14px 16px; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid #f2f2f2; text-align: left; font-size: 14px; }
.table th { font-size: 12px; opacity: .7; font-weight: 700; }

.footer { border-top: 1px solid #eaeaea; margin-top: 40px; padding: 24px 0; background: #fff; }
.footer__inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.footer__brand { font-weight: 900; margin-bottom: 8px; }
.footer__meta { font-size: 13px; opacity: .75; display: grid; gap: 6px; }

:root{
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;

  --brand: #1d4ed8;
  --shadow: 0 10px 25px rgba(0,0,0,.06);
}

/* 다크모드 */
:root[data-theme="dark"]{
  --bg: #0b1220;
  --panel: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --border: rgba(255,255,255,.12);

  --brand: #60a5fa;
  --shadow: 0 10px 25px rgba(0,0,0,.35);
}

/* 공통 적용 */
body{ background: var(--bg); color: var(--text); }

/* 카드/패널류(대표적으로 exchange/crypto-info에 있는 카드들) */
.card2, .coinDetail, .coinList, .qtableWrap, .rightbox2, .gfooter, .gheader {
  background: var(--panel);
  color: var(--text);
  border-color: var(--border);
}

/* 테두리 쓰는 곳들 기본 보정 */
table, th, td, .markethead, .rpanel, .panel2 {
  border-color: var(--border);
}

/* 토글 버튼 스타일 */
.gutil__theme{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  margin-right:10px;
  border:1px solid var(--border);
  border-radius:999px;
  background: transparent;
  cursor:pointer;
}
.gutil__theme:hover{ filter: brightness(1.05); }
.themeIcon{ font-size:18px; line-height:1; }

/* =========================
   THEME TOKENS (GLOBAL)
   ========================= */
:root {
  /* base */
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface2: #f1f4f9;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.10);

  /* brand */
  --primary: #2563eb;
  --primary2: #1d4ed8;

  /* status */
  --up: #e11d48;   /* 빨강(상승) */
  --down: #2563eb; /* 파랑(하락) */

  /* header/footer */
  --header-bg: #081a31;
  --header-text: #ffffff;

  --footer-bg: #081a31;
  --footer-text: rgba(255,255,255,.9);
  --footer-muted: rgba(255,255,255,.65);

  /* shadow */
  --shadow: 0 10px 30px rgba(2, 8, 23, .08);

  /* hero (홈에서 사용) */
  --hero-veil: rgba(0,0,0,.45);
}

/* DARK */
html[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #101a2d;
  --surface2: #0d1628;
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);
  --border: rgba(255,255,255,.10);

  --primary: #4f8bff;
  --primary2: #3b82f6;

  --up: #ff4d6d;
  --down: #5aa6ff;

  --header-bg: #071427;
  --header-text: #ffffff;

  --footer-bg: #071427;
  --footer-text: rgba(255,255,255,.9);
  --footer-muted: rgba(255,255,255,.65);

  --shadow: 0 12px 40px rgba(0,0,0,.35);

  --hero-veil: rgba(0,0,0,.55);
}

/* =========================
   GLOBAL APPLY
   ========================= */
html, body {
  background: var(--bg);
  color: var(--text);
}

a { color: var(--primary); }
a:hover { color: var(--primary2); }

hr { border-color: var(--border); }

/* 공통 카드/박스류가 있으면 다 따라오게 */
.card,
.card2,
.qtableWrap,
.coinDetail,
.coinList,
.rightbox2,
.panel2,
.hpanel,
.rpanel,
.cryptoInfo__layout > * {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

/* 테이블/리스트 계열 */
table { color: var(--text); }
th { color: var(--muted); }
td { color: var(--text); }
thead th { border-bottom: 1px solid var(--border); }
tbody td { border-bottom: 1px solid var(--border); }

/* 입력류 */
input, select, textarea {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
input::placeholder, textarea::placeholder {
  color: rgba(100,116,139,.9);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: rgba(255,255,255,.45);
}

/* 상승/하락 색 */
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }

/* 스크롤바(선택) */
html[data-theme="dark"] ::-webkit-scrollbar { width: 10px; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 10px; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: rgba(255,255,255,.05); }

/* =========================
   WOWOTC Login Modal
   (independent from theme)
========================= */

.loginModal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 7000;
}

.loginModal.is-open{
  display: block;
}

.loginModal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.loginModal__panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100% - 28px));
  border-radius: 18px;

  background:
    radial-gradient(1000px 380px at 30% 0%, rgba(45,108,223,.20), transparent 55%),
    radial-gradient(900px 380px at 80% 0%, rgba(0,160,255,.12), transparent 55%),
    rgba(10, 18, 32, 0.94);

  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 90px rgba(0,0,0,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  padding: 18px 18px 16px;
  animation: loginPop 180ms ease-out;
}

@keyframes loginPop{
  from{ opacity: 0; transform: translate(-50%, -54%) scale(0.98); }
  to{ opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.loginModal__x{
  position: absolute;
  right: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.loginModal__head{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 2px 14px;
}

.loginModal__logo{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(120,255,180,0.35), transparent 55%),
    radial-gradient(circle at 75% 20%, rgba(45,108,223,0.35), transparent 55%),
    rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

.loginModal__title{
  font-size: 18px;
  font-weight: 900;
  color: rgba(255,255,255,0.95);
}

.loginModal__desc{
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255,255,255,0.70);
}

.loginModal__form{
  display: grid;
  gap: 12px;
}

.loginModal__field{
  display: grid;
  gap: 6px;
}

.loginModal__label{
  font-size: 12px;
  font-weight: 800;
  color: rgba(255,255,255,0.78);
}

.loginModal__input{
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.92);
  padding: 0 14px;
  outline: none;
}

.loginModal__input::placeholder{
  color: rgba(255,255,255,0.40);
}

.loginModal__input:focus{
  border-color: rgba(110,190,255,0.35);
  box-shadow: 0 0 0 3px rgba(110,190,255,0.12);
}

.loginModal__pw{
  position: relative;
  display: grid;
}

.loginModal__pwToggle{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.loginModal__row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.loginModal__check{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.78);
}

.loginModal__link{
  font-size: 12px;
  color: rgba(110,190,255,0.9);
  text-decoration: none;
  font-weight: 800;
}

.loginModal__link:hover{
  text-decoration: underline;
}

.loginModal__submit{
  height: 48px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
  color: rgba(255,255,255,0.95);
  background: linear-gradient(90deg, rgba(45,108,223,0.95), rgba(0,160,255,0.80));
  box-shadow: 0 12px 26px rgba(0,0,0,0.30);
}

.loginModal__submit:active{
  transform: translateY(1px);
}

.loginModal__divider{
  display: grid;
  place-items: center;
  position: relative;
  padding: 6px 0;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  font-weight: 800;
}

.loginModal__divider::before{
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255,255,255,0.10);
}

.loginModal__divider span{
  position: relative;
  padding: 0 10px;
  background: rgba(10, 18, 32, 0.94);
  border-radius: 999px;
}

.loginModal__alt{
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  font-weight: 900;
}

.loginModal__alt:hover{
  background: rgba(255,255,255,0.10);
}

.loginModal__foot{
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.70);
  padding-top: 2px;
}
