:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: #252530;
  --border-light: #35354a;
  --text-primary: #e8e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #f7931a;
  --accent-dim: rgba(247, 147, 26, 0.15);
  --accent-glow: rgba(247, 147, 26, 0.08);
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.1);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.1);
  --yellow: #eab308;
  --orange: #f97316;
  --purple: #a855f7;
  --cyan: #06b6d4;
  --btc-gradient: linear-gradient(135deg, #f7931a 0%, #e2711d 100%);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -2px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.5);
  --radius: 12px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  font-size: 32px;
  color: var(--accent);
  filter: drop-shadow(0 0 12px rgba(247, 147, 26, 0.5));
}

.header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.accent { color: var(--accent); }
.btc-orange { color: var(--accent) !important; }

/* Site Navigation */
.site-nav {
  display: flex;
  gap: 4px;
  margin-left: 24px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Difficulty hero card highlight */
.diff-hero-card {
  border-color: rgba(247, 147, 26, 0.25);
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.04) 0%, var(--bg-card) 60%);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(247, 147, 26, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(247, 147, 26, 0); }
}

.last-update {
  color: var(--text-muted);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
}

.refresh-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.currency-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  appearance: auto;
  transition: all 0.2s;
}

.currency-select:hover, .currency-select:focus {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.refresh-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

/* Settings Button */
.settings-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  position: relative;
}

.settings-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

.settings-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

/* Settings Dropdown */
.settings-dropdown {
  display: none;
  position: absolute;
  top: 70px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  z-index: 100;
  min-width: 220px;
  box-shadow: var(--shadow-lg);
}

.settings-dropdown.open { display: block; }

.settings-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.settings-toggle:last-of-type { border-bottom: none; }
.settings-toggle:hover { color: var(--text-primary); }

.settings-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.settings-reset {
  margin-top: 12px;
  padding: 8px 0;
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  text-align: center;
  border-top: 1px solid var(--border);
  transition: opacity 0.2s;
}

.settings-reset:hover { opacity: 0.8; }

/* Hidden sections */
.section-panel.section-hidden { display: none !important; }

/* Fear & Greed Banner */
.fng-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.fng-banner.extreme-fear {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, var(--bg-card) 60%);
  animation: fear-pulse 3s ease-in-out infinite;
}

@keyframes fear-pulse {
  0%, 100% { border-color: rgba(239, 68, 68, 0.2); }
  50% { border-color: rgba(239, 68, 68, 0.5); }
}

.fng-banner.extreme-greed {
  border-color: rgba(34, 197, 94, 0.3);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, var(--bg-card) 50%);
}

.fng-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--red);
  transition: border-color 0.5s;
}

.fng-value {
  font-size: 28px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}

.fng-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fng-label {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.fng-class {
  font-size: 18px;
  font-weight: 700;
}

.fng-context {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.fng-chart-container {
  flex: 1;
  max-width: 400px;
  margin-left: auto;
}

/* Stats Bar */
.stats-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.stat {
  flex: 1;
  min-width: 140px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.highlight-stat {
  border-color: rgba(247, 147, 26, 0.3);
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.05) 0%, var(--bg-card) 100%);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.stat-change {
  font-size: 13px;
  font-weight: 600;
}

/* Main Grid */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  margin-bottom: 40px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}

.card:hover { border-color: var(--border-light); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

/* BTC Hero */
.btc-hero {
  grid-column: 1;
  border-color: rgba(247, 147, 26, 0.15);
}

.coin-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coin-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.coin-identity h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.ticker {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  font-style: italic;
}

.price-block {
  text-align: right;
}

.price {
  font-size: 32px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -1px;
  color: var(--accent);
}

.change {
  font-size: 16px;
  font-weight: 600;
  margin-left: 8px;
}

/* Chart */
.chart-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}

.tab:hover { color: var(--text-primary); border-color: var(--border-light); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 700; }

.mini-tabs { margin-bottom: 12px; }
.tab.mini { padding: 4px 10px; font-size: 11px; }

.chart-wrapper {
  height: 380px;
  margin-bottom: 16px;
}

.btc-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.btc-stat-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.btc-stat-item .label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btc-stat-item .value {
  font-size: 15px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
}

/* TA Card */
.ta-card {
  grid-column: 2;
  grid-row: 1;
}

.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.bearish { background: var(--red-bg); color: var(--red); }
.badge.bullish { background: var(--green-bg); color: var(--green); }
.badge.neutral { background: rgba(234, 179, 8, 0.1); color: var(--yellow); }

.ta-content { display: flex; flex-direction: column; gap: 16px; }

.ta-section h4 {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.ta-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.ta-indicator:last-child { border-bottom: none; }
.ta-indicator .name { color: var(--text-secondary); }
.ta-indicator .val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.ta-meter {
  width: 100%;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

.ta-meter-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease, background 0.5s;
}

/* Vitals Card */
.vitals-card {
  grid-column: 2;
  grid-row: 2;
}

.vitals-content { display: flex; flex-direction: column; gap: 0; }

.supply-bar-wrapper {
  padding: 12px 0 4px;
}

.supply-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.supply-bar-labels .mined {
  color: var(--accent);
  font-weight: 600;
}

.supply-bar {
  width: 100%;
  height: 10px;
  background: var(--bg-primary);
  border-radius: 5px;
  overflow: hidden;
}

.supply-bar-fill {
  height: 100%;
  background: var(--btc-gradient);
  border-radius: 5px;
  transition: width 1s ease;
}

.vital-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.vital-row:last-child { border-bottom: none; }
.vital-row .vital-label { color: var(--text-secondary); }
.vital-row .vital-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

/* Price Table */
.price-table-card {
  grid-column: 1 / -1;
}

.shitcoin-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

.table-wrapper { overflow-x: auto; }

.price-table {
  width: 100%;
  border-collapse: collapse;
}

.price-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
}

.price-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.price-table tr:hover { background: var(--bg-card-hover); }

.price-table .coin-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-table .coin-cell img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.price-table .coin-name { font-weight: 600; }

.price-table .coin-ticker {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 6px;
}

.price-table .price-cell {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.price-table .mcap-cell, .price-table .vol-cell {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
  font-size: 13px;
}

.sparkline-col { width: 120px; }
.sparkline-cell canvas { display: block; }

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

/* News Feed */
.news-card {
  grid-column: 1 / -1;
}

.news-count {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.news-feed { }

.news-top-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

/* Compact news list */
.news-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.news-list-item {
  display: grid;
  grid-template-columns: 60px 1fr 100px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.news-list-item:hover {
  background: var(--bg-card-hover);
  padding-left: 8px;
  padding-right: 8px;
  margin-left: -8px;
  margin-right: -8px;
}

.news-list-item.btc-news {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.news-list-time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

.news-list-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-list-source {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
}

.news-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.2s;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
}

.news-item:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.news-item.btc-news {
  border-left: 3px solid var(--accent);
}

.news-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: var(--bg-primary);
}

.news-image-fallback {
  width: 100%;
  height: 150px;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-card) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.news-content {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.news-source {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.news-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-body {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.news-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 500;
}

/* ===== Mining & Difficulty Section ===== */
.mining-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.mining-card .diff-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.diff-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.diff-gauge {
  position: relative;
  width: 100px;
  height: 100px;
}

.diff-gauge svg {
  width: 100px;
  height: 100px;
  transform: rotate(-90deg);
}

.diff-gauge-bg {
  fill: none;
  stroke: var(--bg-primary);
  stroke-width: 8;
}

.diff-gauge-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease, stroke 0.5s;
}

.diff-gauge-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}

.diff-info {
  flex: 1;
}

.diff-projected {
  font-size: 22px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}

.diff-est-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.diff-remaining {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.diff-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.diff-row:last-child { border-bottom: none; }
.diff-row .diff-label { color: var(--text-secondary); }
.diff-row .diff-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.hashrate-chart-wrapper {
  height: 200px;
  margin-bottom: 12px;
}

.hashrate-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hashrate-stat {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.hashrate-stat .label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hashrate-stat .value {
  font-size: 14px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
}

/* ===== Macro Section ===== */
.macro-section {
  margin-bottom: 24px;
}

.macro-context {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.macro-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.macro-tile {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: border-color 0.2s;
  min-height: 160px;
  display: flex;
  flex-direction: column;
}

.macro-tile:hover {
  border-color: var(--border-light);
}

.macro-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.macro-tile-name {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.macro-tile-change {
  font-size: 12px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.macro-tile-value {
  font-size: 22px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.macro-tile-spark {
  flex: 1;
  min-height: 36px;
  max-height: 50px;
  position: relative;
  overflow: hidden;
}

.macro-tile-spark canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}

.macro-tile-context {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

.macro-tile.bullish-btc { border-left: 3px solid var(--green); }
.macro-tile.bearish-btc { border-left: 3px solid var(--red); }
.macro-tile.neutral-btc { border-left: 3px solid var(--yellow); }

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

@media (max-width: 640px) {
  .macro-grid { grid-template-columns: 1fr; }
}

/* ===== Bitcoin Metrics Row ===== */
.metrics-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.btc-gold-value {
  font-size: 32px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  margin-bottom: 4px;
}

.btc-gold-context {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.metric-chart-wrapper {
  height: 150px;
}

/* Cycle Card */
.cycle-progress-wrapper {
  margin-bottom: 16px;
}

.cycle-bar-outer {
  width: 100%;
  height: 14px;
  background: var(--bg-primary);
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 6px;
  position: relative;
}

.cycle-bar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 1s ease;
}

.cycle-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

.cycle-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cycle-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.cycle-row:last-child { border-bottom: none; }
.cycle-row .cycle-label { color: var(--text-secondary); }
.cycle-row .cycle-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.cycle-phase {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cycle-phase.accumulation { background: var(--green-bg); color: var(--green); }
.cycle-phase.expansion { background: var(--accent-dim); color: var(--accent); }
.cycle-phase.distribution { background: var(--red-bg); color: var(--red); }
.cycle-phase.markdown { background: rgba(168, 85, 247, 0.1); color: var(--purple); }

/* Lightning */
.lightning-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ln-hero {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.ln-stat-big {
  flex: 1;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.ln-stat-big .label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ln-stat-big .value {
  font-size: 18px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
  color: var(--accent);
}

.ln-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.ln-row:last-child { border-bottom: none; }
.ln-row .ln-label { color: var(--text-secondary); }
.ln-row .ln-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 12px;
}

@media (max-width: 1024px) {
  .metrics-section { grid-template-columns: 1fr; }
}

/* ===== News + Vitals Grid ===== */
.news-vitals-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  margin-bottom: 40px;
}

.news-vitals-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== X Posts Section ===== */
.x-posts-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.x-posts-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.x-logo {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-primary);
}

.x-post {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.x-post:hover {
  border-color: var(--border-light);
}

.x-post a {
  text-decoration: none;
  color: inherit;
}

.x-post-source {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.x-post-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
}

.x-post-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.x-post-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
  font-family: 'JetBrains Mono', monospace;
}

/* ===== Responsive updates ===== */
@media (max-width: 1024px) {
  .mining-section { grid-template-columns: 1fr; }
  .news-vitals-grid { grid-template-columns: 1fr; }
  .hashrate-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .hashrate-stats { grid-template-columns: 1fr; }
  .diff-hero { flex-direction: column; text-align: center; }
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 1024px) {
  .main-grid { grid-template-columns: 1fr; }
  .btc-hero, .ta-card, .vitals-card, .price-table-card, .news-card { grid-column: 1; grid-row: auto; }
  .btc-stats { grid-template-columns: repeat(3, 1fr); }
  .fng-banner { flex-wrap: wrap; }
  .news-top-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .app { padding: 0 12px; }
  .header { flex-direction: column; gap: 12px; }
  .site-nav { display: none; }
  .stats-bar { flex-wrap: wrap; }
  .price { font-size: 24px; }
  .news-top-grid { grid-template-columns: 1fr; }
  .news-list-item { grid-template-columns: 50px 1fr; }
  .news-list-source { display: none; }
}

@media (max-width: 1024px) {
  .site-nav { display: none; }
}

.ta-loading {
  color: var(--text-muted);
  text-align: center;
  padding: 40px 0;
  font-size: 13px;
  animation: shimmer-text 1.5s ease-in-out infinite;
}

@keyframes shimmer-text {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
