:root {
  --deep-blue: #050b26;
  --accent-cyan: #3de0ff;
  --accent-violet: #c77dff;
  --accent-sun: #ffd166;
  --chakra-green: #7cffb2;
  --text-primary: #f5f7ff;
  --text-muted: #adb6d9;
  --panel-bg: rgba(12, 19, 53, 0.76);
  --panel-border: rgba(61, 224, 255, 0.35);
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, 0.4);
  font-family: "Inter", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(61, 224, 255, 0.15) 0%,
      rgba(5, 11, 38, 1) 55%
    ),
    radial-gradient(
      circle at 80% 10%,
      rgba(199, 125, 255, 0.12) 0%,
      rgba(5, 11, 38, 1) 50%
    ),
    radial-gradient(
      circle at 50% 90%,
      rgba(124, 255, 178, 0.1) 0%,
      rgba(5, 11, 38, 1) 60%
    ),
    var(--deep-blue);
  color: var(--text-primary);
  background-attachment: fixed;
}

header {
  padding: 64px 8vw 48px;
  text-align: center;
}

header h1 {
  font-size: clamp(2.8rem, 4vw, 4rem);
  margin-bottom: 16px;
  text-shadow: 0 12px 40px rgba(61, 224, 255, 0.2);
}

header p {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.hero-badges {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-badge {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(61, 224, 255, 0.12);
  border: 1px solid rgba(61, 224, 255, 0.25);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--accent-cyan);
  backdrop-filter: blur(6px);
}

main {
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding: 0 6vw 96px;
}

.explorer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

#tree-container {
  position: relative;
  background: rgba(5, 9, 29, 0.7);
  border-radius: 28px;
  border: 1px solid rgba(61, 224, 255, 0.18);
  box-shadow: var(--shadow-pop);
  padding: 24px;
  overflow: hidden;
}

#branch-tree {
  width: 100%;
  height: auto;
  display: block;
}

.node circle {
  fill: rgba(255, 255, 255, 0.08);
  stroke-width: 1.5px;
  stroke: rgba(61, 224, 255, 0.6);
  transition: transform 0.18s ease, fill 0.18s ease, stroke 0.18s ease;
}

.node.energy circle {
  stroke: var(--accent-cyan);
}

.node.frequency circle {
  stroke: var(--accent-violet);
}

.node.coverage circle {
  stroke: var(--accent-sun);
}

.node.record circle {
  stroke: var(--chakra-green);
}

.node:hover circle,
.node.active circle {
  fill: rgba(61, 224, 255, 0.25);
  transform: scale(1.3);
  stroke-width: 2px;
}

.node text {
  font-size: 0.9rem;
  fill: var(--text-primary);
  letter-spacing: 0.02em;
  pointer-events: none;
  text-shadow: 0 0 10px rgba(5, 11, 38, 0.9);
}

.link {
  fill: none;
  stroke: rgba(173, 182, 217, 0.32);
  stroke-width: 1.4px;
}

.link.active {
  stroke: rgba(61, 224, 255, 0.85);
  stroke-width: 2.3px;
}

#detail-panel {
  position: sticky;
  top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border-radius: 24px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-pop);
}

#detail-panel h2 {
  margin: 0;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.meta-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(173, 182, 217, 0.32);
  background: rgba(173, 182, 217, 0.08);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.detail-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(61, 224, 255, 0.18);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(173, 182, 217, 0.66);
}

.stat-card strong {
  font-size: 1.3rem;
  color: var(--text-primary);
}

.audio-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.audio-stack figure {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(124, 255, 178, 0.2);
  background: rgba(124, 255, 178, 0.08);
}

.audio-stack figcaption {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--chakra-green);
  letter-spacing: 0.02em;
}

a.media-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-note {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 32px;
  border-radius: 24px;
  background: rgba(5, 11, 38, 0.6);
  border: 1px solid rgba(61, 224, 255, 0.18);
  box-shadow: var(--shadow-pop);
  color: var(--text-muted);
  line-height: 1.7;
}

footer {
  padding: 0 8vw 72px;
  text-align: center;
  color: rgba(173, 182, 217, 0.6);
  font-size: 0.85rem;
}

.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(5, 11, 38, 0.6);
  border: 1px solid var(--accent-cyan);
  border-radius: 20px;
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.back-home-btn:hover {
  background: rgba(61, 224, 255, 0.15);
  color: var(--text-primary);
  transform: translateX(-3px);
  box-shadow: 0 0 15px rgba(61, 224, 255, 0.2);
}

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

  #detail-panel {
    position: relative;
    top: 0;
  }

  #tree-container {
    padding: 12px;
  }
}

@media (max-width: 720px) {
  header {
    padding: 48px 20px 32px;
  }

  main {
    padding: 0 20px 72px;
  }

  #detail-panel {
    padding: 20px;
  }

  header h1 {
    font-size: 2.4rem;
  }
}
