/* chart.html — page-specific styles */

* { color: #c9d1d9 !important; }
.change-up { color: #26a69a !important; }
.change-dn { color: #ef5350 !important; }

.nav, .nav * { color: var(--text) !important; }

body { background: #000000; }

.chart-header, .trade-panel-card, .chart-frame,
.dex-link, .tf-btn, .live-badge { border-radius: 0 !important; }

.chart-page {
  padding: 68px 20px 20px;
  max-width: 1600px;
  margin: 0 auto;
}

.chart-layout {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.chart-main { flex: 1; min-width: 0; }

.trade-panel {
  width: 190px;
  flex-shrink: 0;
}
.trade-panel-card {
  background: #000000;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 14px 13px;
}
.trade-panel-title {
  font-size: 0.62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .5;
  margin-bottom: 10px;
  font-weight: 700;
}
.dex-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  text-decoration: none;
  margin-bottom: 7px;
  transition: background .15s, border-color .15s;
  cursor: pointer;
}
.dex-link:last-child { margin-bottom: 0; }
.dex-link:hover {
  background: rgba(184,132,26,.15);
  border-color: rgba(184,132,26,.4);
}
.dex-icon {
  width: 24px; height: 24px;
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  overflow: hidden;
}
.dex-info { display: flex; flex-direction: column; }
.dex-name { font-size: 0.75rem; font-weight: 700; line-height: 1.2; }
.dex-sub  { font-size: 0.6rem; opacity: .55; margin-top: 1px; }

.dex-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 10px 0;
}
.pool-note {
  font-size: 0.58rem;
  opacity: .45;
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

.chart-header {
  background: #000000;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 8px;
}
.chart-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chart-price-main {
  font-size: 1.55rem; font-weight: 700; line-height: 1;
  font-family: 'Consolas', 'Courier New', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.chart-change {
  font-size: 0.75rem; font-weight: 600;
  font-family: 'Consolas', 'Courier New', monospace;
  font-variant-numeric: tabular-nums;
}

.live-badge {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  padding: 2px 9px;
  background: rgba(220,38,38,0.12);
  border: 1px solid rgba(220,38,38,0.35);
  border-radius: 100px;
}
.live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #dc2626 !important;
  animation: blink 1s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }

.chart-stats { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.cs-item { display: flex; flex-direction: column; }
.cs-label { font-size: 0.57rem; letter-spacing: .08em; text-transform: uppercase; opacity: .5; margin-bottom: 1px; }
.cs-value {
  font-size: 0.78rem; font-weight: 600;
  font-family: 'Consolas', 'Courier New', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.tf-bar { display: flex; gap: 3px; flex-wrap: wrap; }
.tf-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.68rem;
  font-family: 'Consolas', 'Courier New', monospace;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background .13s, border-color .13s;
}
.tf-btn:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255,255,255,0.2); }
.tf-btn.active { background: rgba(184,132,26,.25); border-color: rgba(184,132,26,.7); font-weight: 700; }

#candle-pane a,
#volume-pane a { display: none !important; }

#candle-pane,
#volume-pane {
  width: 100%;
  position: relative;
}

.chart-frame {
  background: #000000;
  border-radius: var(--radius);
  overflow: hidden;
  height: calc(100vh - 225px);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  width: 100%;
}

#candle-pane {
  flex: 7;
  min-height: 0;
}

.pane-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

#volume-pane {
  flex: 3;
  min-height: 0;
}

/* English typography — trade panel prose */
html[lang="en"] .trade-panel-title,
html[lang="en"] .dex-sub,
html[lang="en"] .pool-note,
html[lang="en"] .dex-name,
html[lang="en"] .cs-label {
  font-family: var(--font-en);
  font-variant-numeric: normal;
}

html[lang="en"] .dex-sub,
html[lang="en"] .pool-note {
  line-height: 1.65;
  letter-spacing: 0.02em;
}

html[lang="en"] .dex-sub {
  font-size: 0.65rem;
}

html[lang="en"] .pool-note {
  font-size: 0.62rem;
}

@media (max-width: 768px) {
  .chart-page {
    padding: 60px 0 20px;
    box-sizing: border-box;
    max-width: none;
  }

  .chart-header {
    margin: 0 16px 8px;
  }

  .chart-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .chart-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .trade-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 16px;
  }

  .chart-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .price-row {
    justify-content: center;
  }

  .chart-stats {
    justify-content: center;
  }

  .tf-bar {
    justify-content: center;
  }

  .chart-frame {
    width: 100%;
    height: 360px;
    min-height: 360px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    touch-action: pan-y pinch-zoom;
  }

  #candle-pane,
  #volume-pane {
    min-width: 0;
  }

  .nav {
    background: rgba(0, 0, 0, 0.92) !important;
  }

  .nav-drawer {
    background: #0d0d0d;
    border-left-color: rgba(255, 255, 255, 0.1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
  }

  .nav-drawer-top {
    background: #0a0a0a;
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  .nav-links a {
    color: #c9d1d9 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  }

  .nav-links a:hover {
    color: var(--gold) !important;
    background: rgba(184, 132, 26, 0.12);
  }

  .nav-toggle {
    background: #1a1a1a;
    border-left-color: rgba(255, 255, 255, 0.12);
  }

  .nav-lang .lang-menu {
    background: #0d0d0d;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    min-width: 152px;
    width: max-content;
    max-width: calc(100vw - var(--nav-toggle-w) - 12px);
    white-space: nowrap;
  }

  .nav-lang .lang-option {
    color: #c9d1d9 !important;
    white-space: nowrap;
    padding: 8px 14px;
  }

  .nav-lang .lang-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
  }

  .nav-lang .lang-option.active {
    background: rgba(184, 132, 26, 0.15);
    color: var(--gold) !important;
  }
}
