:root {
  --bg: #0b0f14;
  --bg-alt: #111820;
  --card: #161e29;
  --text: #e8eef7;
  --text-muted: #8b9bb4;
  --accent: #f7931a; /* Bitcoin orange */
  --accent-dim: #c77815;
  --border: #243044;
  --green: #22c55e;
  --red: #ef4444;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  position: sticky;
  top: 0;
  background: rgba(11, 15, 20, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

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

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.95rem;
}

nav a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.75rem;
  min-width: 200px;
}

.stat .label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat .value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.stat .change {
  display: block;
  font-size: 0.9rem;
  color: var(--accent);
  margin-top: 0.25rem;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section.alt {
  background: var(--bg-alt);
}

.section h2 {
  font-size: 1.9rem;
  margin-bottom: 0.75rem;
}

.section-intro {
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 2.5rem;
}

/* Charts */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}

.chart-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.chart-card canvas {
  max-height: 280px;
}

.source {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Countries */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.country-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.country-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.country-card.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.country-card .flag {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 0.4rem;
}

.country-card strong {
  display: block;
  margin-bottom: 0.25rem;
}

.country-card span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Why */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.why-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.why-card h3 {
  margin-bottom: 0.6rem;
  color: var(--accent);
}

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

footer .small {
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Country page specifics */
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--accent);
  text-decoration: none;
}

.country-hero {
  padding: 3rem 0 2rem;
}

.country-hero h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.metric {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.metric .label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.metric .value {
  font-size: 1.35rem;
  font-weight: 700;
}

/* Donate section */
.donate-box {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  max-width: 700px;
}

.donate-qr img {
  border-radius: 8px;
  background: white;
  padding: 8px;
}

.donate-info {
  flex: 1;
  min-width: 240px;
}

.donate-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.address-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.address-row code {
  background: var(--bg);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  word-break: break-all;
  border: 1px solid var(--border);
}

.copy-btn {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

.copy-btn:hover {
  background: var(--accent-dim);
}

.donate-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* CTA section */
.cta-box {
  background: linear-gradient(135deg, #1a120b 0%, #161e29 100%);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-box h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.cta-box p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.9rem 1.8rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.cta-button:hover {
  background: #ffb347;
  transform: translateY(-1px);
}

.cta-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  opacity: 0.8;
}

/* Footer donation (compact) */
.footer-donate {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-donate-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.footer-donate-row {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.footer-donate-row code {
  background: var(--card);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  word-break: break-all;
}

.footer-qr {
  border-radius: 6px;
  background: white;
  padding: 4px;
  margin-top: 0.5rem;
}

/* Floating donation widget */
.donate-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.2rem 1.2rem;
  width: 200px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  transition: opacity 0.25s, transform 0.25s;
}

.donate-float.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.donate-float-close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.donate-float-close:hover {
  color: var(--text);
}

.donate-float-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.donate-float-qr {
  border-radius: 6px;
  background: white;
  padding: 5px;
  margin-bottom: 0.6rem;
}

.donate-float-address {
  display: block;
  font-size: 0.65rem;
  word-break: break-all;
  background: var(--bg);
  padding: 0.35rem 0.4rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.donate-float .copy-btn {
  width: 100%;
  font-size: 0.85rem;
  padding: 0.4rem;
}

/* Hide on very small screens or make smaller */
@media (max-width: 600px) {
  .donate-float {
    bottom: 12px;
    right: 12px;
    width: 160px;
    padding: 0.8rem;
  }
  .donate-float-qr {
    width: 110px;
    height: 110px;
  }
}

/* Featured video */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 1rem;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.9rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }
.prose { max-width: 720px; padding: 3rem 0 4rem; }
.prose h1 { font-size: 2rem; margin-bottom: 0.75rem; }
.prose h2 { font-size: 1.25rem; margin: 2rem 0 0.6rem; }
.prose p, .prose li { color: var(--text-muted); margin-bottom: 0.9rem; }
.prose ul, .prose ol { padding-left: 1.2rem; margin-bottom: 1rem; }
.prose a { color: var(--accent); }
.cta-guide {
  display: block;
  margin-top: 1.1rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.cta-guide:hover { color: #ffb347; }
.prose strong { color: var(--text); }

.donate-float-title { cursor: pointer; }
.donate-float.collapsed .donate-float-qr,
.donate-float.collapsed .donate-float-address,
.donate-float.collapsed .copy-btn {
  display: none;
}
.donate-float.collapsed {
  width: auto;
  padding: 0.7rem 1rem 0.8rem;
}

.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.calc-grid label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.calc-grid input, .calc-grid select {
  width: 100%; background: var(--card); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.6rem 0.7rem; font-size: 1rem;
}
.calc-result { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem 1.4rem; margin: 1rem 0 1.5rem; }
.calc-result .big { font-size: 1.8rem; font-weight: 800; color: var(--accent); }
.calc-result p { margin: 0.4rem 0; color: var(--text-muted); }
