/* ============ GOLD SIGNAL — dark trading dashboard ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0d0f;
  --panel: #11161a;
  --panel2: #151b20;
  --gold: #d4a643;
  --gold-dim: #8a6d2f;
  --up: #22c55e;
  --down: #ef4444;
  --text: #e8e6e1;
  --dim: #7d848c;
  --line: rgba(255,255,255,0.07);
  --font: 'Space Grotesk', system-ui, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
}

.app { max-width: 720px; margin: 0 auto; padding: 20px 16px 60px; }

/* header */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.logo { font-weight: 700; font-size: 20px; letter-spacing: 0.08em; }
.logo span { color: var(--gold); }

.tf-switch {
  display: flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px;
  gap: 2px;
}
.tf-btn {
  background: transparent;
  border: none;
  color: var(--dim);
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.15em;
  padding: 8px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}
.tf-btn.active {
  background: var(--gold);
  color: #1a1408;
  font-weight: 700;
}

/* signal card */
.signal-card {
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 24px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.signal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 200px at 80% -20%, rgba(212,166,67,0.12), transparent);
  pointer-events: none;
}
.sig-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.sig-label { color: var(--dim); font-size: 11px; letter-spacing: 0.3em; }
.sig-updated { color: var(--dim); font-size: 11px; }
.sig-main { text-align: center; }
.sig-arrow {
  font-size: 42px;
  line-height: 1;
  transition: color 0.4s;
}
.sig-direction {
  font-size: clamp(38px, 10vw, 64px);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 6px 0 14px;
  transition: color 0.4s;
}
.sig-price-row { display: flex; justify-content: center; align-items: baseline; gap: 12px; }
.sig-price { font-size: 26px; font-weight: 500; }
.sig-change { font-size: 14px; font-weight: 700; }

.up { color: var(--up); }
.down { color: var(--down); }
.neutral { color: var(--gold); }

.confidence-wrap { margin-top: 24px; }
.conf-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--dim);
  margin-bottom: 8px;
}
.conf-label span { color: var(--text); font-weight: 700; font-size: 13px; }
.conf-bar {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
}
.conf-fill {
  height: 100%;
  width: 0%;
  border-radius: 100px;
  transition: width 0.8s ease, background 0.4s;
}
.sig-score {
  margin-top: 14px;
  text-align: right;
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.15em;
}
.sig-score span { color: var(--text); font-weight: 700; }

/* panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}
.panel h3 {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
  margin-bottom: 16px;
}

/* reasons */
.reasons { list-style: none; }
.reasons li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.reasons li:last-child { border-bottom: none; }
.reasons li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--dim);
  flex-shrink: 0;
}
.reasons li.bull::before { background: var(--up); }
.reasons li.bear::before { background: var(--down); }
.reasons li.flat::before { background: var(--gold); }

/* indicators grid */
.ind-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ind-item {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.ind-item .k { font-size: 10px; color: var(--dim); letter-spacing: 0.15em; margin-bottom: 6px; }
.ind-item .v { font-size: 16px; font-weight: 700; }
.ind-item .v.good { color: var(--up); }
.ind-item .v.bad { color: var(--down); }

/* chart */
#chart { width: 100%; background: var(--panel2); border-radius: 12px; }

.disclaimer {
  text-align: center;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.05em;
  margin-top: 24px;
  line-height: 1.6;
}

/* loading */
.loading {
  text-align: center;
  padding: 40px 0;
  color: var(--dim);
  letter-spacing: 0.2em;
  font-size: 13px;
}
.loading .spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(212,166,67,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error {
  text-align: center;
  padding: 30px;
  color: var(--down);
}

@media (max-width: 520px) {
  .ind-grid { grid-template-columns: repeat(2, 1fr); }
}
