/* bitcoinhoy.cl — estilos
   Fuentes de sistema (sin requests externos) para máxima velocidad.
   Paleta: negro + naranja Bitcoin (#F7931A) + verde/rojo para variación. */

:root {
  --bg: #0b0b0d;
  --bg-card: #141416;
  --border: #232326;
  --text: #f2f2f2;
  --text-dim: #9a9a9f;
  --orange: #F7931A;
  --green: #2FBF71;
  --red: #E5484D;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  scroll-behavior: smooth;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: rgba(11,11,13,0.92);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo span { color: var(--orange); }

nav a {
  color: var(--text-dim);
  margin-left: 22px;
  font-size: 0.92rem;
  font-weight: 500;
}
nav a:hover { color: var(--text); }

/* Hero / price */
.hero {
  padding: 48px 0 24px;
  text-align: center;
}

.hero .eyebrow {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.price-display {
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 8vw, 4rem);
  font-weight: 700;
  margin: 4px 0;
  line-height: 1.1;
}

.price-sub {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 1rem;
}

.change.positive { color: var(--green); }
.change.negative { color: var(--red); }

.price-clp {
  color: var(--text-dim);
}

.price-updated {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 10px;
}

/* Sections */
section {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

h2.section-title {
  font-size: 1.15rem;
  margin: 0 0 16px;
  font-weight: 700;
}

/* Chart (click-to-load) */
.chart-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  min-height: 420px;
  position: relative;
}

.chart-placeholder {
  height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  color: var(--text-dim);
}

.chart-placeholder .play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--orange);
  color: #0b0b0d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

#tv-container {
  height: 420px;
  width: 100%;
}

/* Converter */
.converter {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: end;
}

.converter .field label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.converter input, .converter select {
  width: 100%;
  background: #0e0e10;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 1rem;
}

.converter .swap-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  height: 42px;
}

.converter .swap-btn:hover { color: var(--orange); border-color: var(--orange); }

@media (max-width: 560px) {
  .converter { grid-template-columns: 1fr; }
  .converter .swap-btn { justify-self: center; width: 42px; }
}

/* News */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.news-item a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.news-item a:hover { color: var(--orange); }

.news-item .news-date {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-top: 4px;
}

.news-empty, .price-error {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  color: var(--text-dim);
  font-size: 0.82rem;
  text-align: center;
}

footer.site-footer a { color: var(--text-dim); }
footer.site-footer a:hover { color: var(--orange); }
