/* coin-page.css — 다크테마, 모바일 375px 기준 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0f14;
  --bg2: #151820;
  --bg3: #1c2030;
  --border: #2a2e3f;
  --text: #e8eaf0;
  --text2: #8890a4;
  --accent: #4f8ef7;
  --accent2: #3d7de8;
  --up: #22c55e;
  --down: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 16px rgba(0,0,0,.4);
}

body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.6; min-height: 100vh; }
body[dir="rtl"] { text-align: right; }

/* NAV */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--bg2); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-logo { font-size: 18px; font-weight: 700; color: var(--accent); text-decoration: none; }
.nav-links { display: none; gap: 20px; }
.nav-links a { color: var(--text2); text-decoration: none; font-size: 14px; }
.nav-links a.active { color: var(--text); }
@media (min-width: 640px) { .nav-links { display: flex; } }

/* LANG SWITCHER */
.lang-switcher { position: relative; }
.lang-btn { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); padding: 6px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; }
.lang-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 4px); background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 120px; z-index: 200; max-height: 280px; overflow-y: auto; }
.lang-dropdown.open { display: block; }
.lang-item { display: block; padding: 8px 14px; color: var(--text2); text-decoration: none; font-size: 13px; }
.lang-item:hover, .lang-item.active { color: var(--accent); background: var(--bg3); }

/* MAIN */
.main { max-width: 640px; margin: 0 auto; padding: 0 16px 80px; }

/* COIN HEADER */
.coin-header { display: flex; align-items: center; gap: 14px; padding: 20px 0 16px; }
.coin-logo { width: 56px; height: 56px; border-radius: 50%; object-fit: contain; background: var(--bg3); }
.coin-title h1 { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.coin-symbol-badge { font-size: 13px; font-weight: 600; background: var(--bg3); border: 1px solid var(--border); padding: 2px 8px; border-radius: 20px; color: var(--text2); }
.coin-rank { font-size: 13px; color: var(--text2); margin-top: 2px; }

/* PRICE CARD */
.price-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.price-main { margin-bottom: 14px; }
.price-label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.price-value { font-size: 32px; font-weight: 700; letter-spacing: -1px; }
.price-krw { display: block; font-size: 16px; color: var(--text2); margin-top: 2px; }
.price-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 12px; }
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 11px; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; }
.meta-value { font-size: 15px; font-weight: 600; }
.meta-value.up { color: var(--up); }
.meta-value.down { color: var(--down); }

/* ALERT CTA */
.alert-cta { background: linear-gradient(135deg, #1a2340 0%, #0f1629 100%); border: 1px solid #2a3a5c; border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.alert-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.alert-cta-text { display: flex; flex-direction: column; gap: 2px; }
.alert-cta-text strong { font-size: 15px; }
.alert-cta-text span { font-size: 12px; color: var(--text2); }

/* TABS */
.tabs-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.tab-bar { display: flex; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; padding: 12px 16px; background: none; border: none; color: var(--text2); cursor: pointer; font-size: 14px; white-space: nowrap; border-bottom: 2px solid transparent; transition: all .15s; }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; padding: 20px; }
.tab-content.active { display: block; }

/* ALERT FORM */
.alert-form-card h2 { font-size: 18px; margin-bottom: 8px; }
.alert-desc { color: var(--text2); font-size: 14px; margin-bottom: 16px; }
.alert-type-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.alert-type-btn { padding: 8px 14px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg3); color: var(--text2); cursor: pointer; font-size: 13px; transition: all .15s; }
.alert-type-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.alert-input-row { display: flex; align-items: center; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 14px; margin-bottom: 14px; }
.alert-input-prefix { color: var(--text2); font-size: 18px; margin-right: 8px; }
.alert-input { flex: 1; background: none; border: none; color: var(--text); font-size: 20px; font-weight: 600; padding: 12px 0; outline: none; }

/* CTA BUTTON */
.cta-btn { display: inline-block; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); padding: 14px 20px; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; transition: background .15s; }
.cta-btn:hover { background: var(--accent2); }
.cta-btn.full-width { display: block; width: 100%; }
.cta-subtext { font-size: 12px; color: var(--text2); text-align: center; margin-top: 8px; }
.disclaimer { font-size: 11px; color: var(--text2); text-align: center; margin-top: 8px; }

/* CHART PLACEHOLDER */
.chart-placeholder { height: 300px; display: flex; align-items: center; justify-content: center; }
.chart-loading { color: var(--text2); font-size: 14px; }

/* INDICATORS */
.indicators-placeholder { display: flex; flex-direction: column; gap: 10px; }
.indicator-card { height: 72px; border-radius: var(--radius-sm); background: var(--bg3); }
.indicator-card.skeleton { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:.6} 50%{opacity:1} }

/* SEO TAGS (검색엔진에 노출, 사용자에게 최소화) */
.seo-tags { padding: 12px 0; margin-top: 8px; }
.hashtag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.hashtag { font-size: 12px; color: var(--text2); background: var(--bg3); padding: 3px 8px; border-radius: 12px; }
.seo-kw { font-size: 11px; color: var(--bg3); background: var(--bg3); padding: 2px 6px; border-radius: 8px; user-select: none; }

/* INFO */
.info-content .info-block { margin-bottom: 16px; }
.info-block h3 { font-size: 15px; margin-bottom: 6px; }
.info-block p { color: var(--text2); font-size: 14px; line-height: 1.7; }
.info-block a { color: var(--accent); text-decoration: none; }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1000; display: flex; align-items: flex-end; }
@media (min-width: 480px) { .modal-overlay { align-items: center; } }
.modal-box { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; padding: 24px 20px; width: 100%; max-width: 480px; margin: 0 auto; position: relative; }
@media (min-width: 480px) { .modal-box { border-radius: var(--radius); } }
.modal-close { position: absolute; top: 14px; right: 14px; background: none; border: none; color: var(--text2); font-size: 18px; cursor: pointer; }
.modal-box h2 { font-size: 18px; margin-bottom: 8px; }
.modal-box p { color: var(--text2); font-size: 14px; margin-bottom: 16px; }
.telegram-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.step { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.step-num { background: var(--accent); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.step a { color: var(--accent); }
.step code { background: var(--bg3); padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* SSE 가격 변경 플래시 (Phase 1-5) */
.price-value.flash-up { color: #00ff88 !important; transition: color 0.8s; }
.price-value.flash-down { color: #ff4444 !important; transition: color 0.8s; }


/* Hamburger Menu (Phase fix) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: 0.25s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0; right: 0;
  background: #11151f;
  border-bottom: 1px solid #1f2536;
  z-index: 200;
  padding: 12px;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 15px;
  color: #e8eaed;
  text-decoration: none;
}
.mobile-menu a:hover, .mobile-menu a.active { background: #1f2536; color: #fff; }
.mobile-menu-lang {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 8px 4px;
  border-top: 1px solid #1f2536;
  margin-top: 8px;
}
.mobile-menu-lang a.m-lang {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 6px;
  background: #1f2536;
  font-size: 12px;
  font-weight: 600;
}
.mobile-menu-lang a.m-lang.active { background: #2962ff; color: #fff; }

@media (max-width: 768px) {
  .nav-links, .nav-right { display: none; }
  .hamburger { display: flex; }
}
