/* =========================================================
   Apex Ecosystem Marketing Platform - CSS Core Design System
   Hyper-Modern Cyberpunk Dark Theme & Glassmorphism Aesthetics
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&family=Outfit:wght@300;400;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-dark: #050714;
  --bg-card: rgba(13, 18, 43, 0.7);
  --bg-glass: rgba(18, 26, 59, 0.55);
  --border-glass: rgba(0, 243, 255, 0.2);
  --border-glow: rgba(157, 78, 221, 0.4);

  --cyan-glow: #00f3ff;
  --purple-glow: #9d4edd;
  --emerald-glow: #06d6a0;
  --pink-glow: #ff007f;
  --yellow-glow: #ffb703;

  --text-main: #f0f4f8;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-code: 'Fira Code', monospace;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Global Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  background: radial-gradient(circle at 50% 0%, #0d122e 0%, #050714 80%);
}

/* Custom Glowing Cursor */
#cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--cyan-glow);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  box-shadow: 0 0 12px var(--cyan-glow);
}

#cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(0, 243, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9998;
  transition: width 0.2s, height 0.2s, border-color 0.2s;
}

/* Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--cyan-glow) 50%, var(--purple-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-alt {
  background: linear-gradient(135deg, var(--emerald-glow) 0%, var(--cyan-glow) 50%, var(--pink-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 75px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 1000;
  background: rgba(5, 7, 20, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
}

.brand-icon {
  font-size: 1.6rem;
  color: var(--cyan-glow);
  filter: drop-shadow(0 0 10px var(--cyan-glow));
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--cyan-glow);
  text-shadow: 0 0 8px var(--cyan-glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  background: rgba(0, 243, 255, 0.15);
  border-color: var(--cyan-glow);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.icon-btn.muted {
  color: var(--text-dim);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-glow) 0%, var(--purple-glow) 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 243, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 243, 255, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--cyan-glow);
  transform: translateY(-2px);
}

.btn-json {
  background: rgba(6, 214, 160, 0.12);
  border: 1px solid var(--emerald-glow);
  color: var(--emerald-glow);
}

.btn-json:hover {
  background: rgba(6, 214, 160, 0.25);
  box-shadow: 0 0 15px rgba(6, 214, 160, 0.4);
}

/* Glass Panels */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(0, 243, 255, 0.4);
  box-shadow: 0 12px 40px rgba(0, 243, 255, 0.15);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Hero Section & 3D Galaxy Canvas */
.hero-section {
  position: relative;
  width: 100%;
  height: 90vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 75px;
  overflow: hidden;
}

#three-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-overlay-content {
  position: relative;
  z-index: 10;
  pointer-events: none;
  text-align: center;
  max-width: 850px;
  padding: 0 20px;
}

.hero-overlay-content * {
  pointer-events: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(0, 243, 255, 0.1);
  border: 1px solid var(--cyan-glow);
  border-radius: 30px;
  color: var(--cyan-glow);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* 3D Holodeck Mode Switcher Bar */
.holodeck-mode-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 10px;
}

/* Voice Waveform Animation */
.voice-waveform {
  display: none;
  align-items: center;
  gap: 4px;
  height: 24px;
}

.wave-bar {
  width: 4px;
  height: 100%;
  background: var(--cyan-glow);
  border-radius: 2px;
  animation: waveAnim 0.8s infinite ease-in-out alternate;
}

.wave-bar:nth-child(2) { animation-delay: 0.2s; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; }
.wave-bar:nth-child(4) { animation-delay: 0.1s; }

@keyframes waveAnim {
  from { height: 6px; }
  to { height: 24px; }
}

/* 3D Hover Badge */
#planet-hover-badge {
  position: fixed;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(10, 15, 36, 0.9);
  border: 1px solid var(--cyan-glow);
  border-radius: 8px;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 900;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

/* Planet Focused Detail Drawer Panel */
#planet-detail-panel {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 420px;
  padding: 28px;
  z-index: 950;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

#planet-detail-panel.visible {
  transform: translateX(0);
  opacity: 1;
}

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

.detail-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.detail-brand i {
  font-size: 2rem;
}

.detail-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.detail-close:hover {
  color: var(--pink-glow);
}

.detail-subtitle {
  color: var(--cyan-glow);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.detail-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Section Header Structure */
.section-padding {
  padding: 100px 60px;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 60px auto;
}

.section-tag {
  color: var(--cyan-glow);
  font-family: var(--font-code);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

.section-title {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.category-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 50px;
}

.filter-btn {
  padding: 10px 22px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: rgba(0, 243, 255, 0.15);
  border-color: var(--cyan-glow);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.project-card {
  position: relative;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform-style: preserve-3d;
}

.recommended-card {
  border-color: var(--cyan-glow);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.25);
}

.recommendation-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(135deg, var(--cyan-glow), var(--purple-glow));
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 243, 255, 0.4);
}

.card-real-stats {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-family: var(--font-code);
  color: var(--cyan-glow);
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.icon-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.card-title-group {
  flex: 1;
}

.card-title-group h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.badge-cat {
  font-size: 0.78rem;
  color: var(--cyan-glow);
  font-weight: 600;
}

.rating-pill {
  background: rgba(255, 183, 3, 0.15);
  border: 1px solid var(--yellow-glow);
  color: var(--yellow-glow);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
}

.card-description {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.card-metrics {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.m-label {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.m-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.m-fill {
  height: 100%;
  border-radius: 6px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 8px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

/* Dedicated Analytics Dashboard Section Styling */
.analytics-dashboard-card {
  max-width: 1400px;
  margin: 0 auto;
  padding: 36px;
}

.telemetry-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.telemetry-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.t-icon {
  font-size: 2rem;
}

.t-data {
  display: flex;
  flex-direction: column;
}

.t-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.t-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
}

.project-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.telemetry-item-card {
  padding: 16px;
  background: rgba(10, 16, 40, 0.6);
  border: 1px solid rgba(0, 243, 255, 0.15);
  border-radius: 14px;
}

/* Modal Overlay & Windows */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 5, 15, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  width: 92vw;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-navbar {
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.modal-controls {
  display: flex;
  gap: 12px;
}

.modal-iframe-container {
  flex: 1;
  width: 100%;
  height: 100%;
  background: #ffffff;
}

.modal-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 60px 40px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Responsive Rules */
@media (max-width: 1024px) {
  .hero-title { font-size: 2.8rem; }
  .section-padding { padding: 60px 24px; }
  .navbar { padding: 0 20px; }
  .nav-links { display: none; }
}
