/* Design System & Core Styles */
:root {
  --bg-color: #060913;
  --bg-secondary: #0d1322;
  --card-bg: rgba(15, 23, 42, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(56, 189, 248, 0.4);
  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.25);
  --accent-purple: #c084fc;
  --accent-emerald: #34d399;
  --accent-amber: #fbbf24;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(192, 132, 252, 0.08) 0%, transparent 40%);
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.glass-nav {
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
}

/* Animations */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes floatNormal {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(-1.5deg); }
}

@keyframes floatFast {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-24px) rotate(2deg); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; filter: blur(20px); }
  50% { opacity: 0.8; filter: blur(25px); }
}

@keyframes dashFlow {
  to {
    stroke-dashoffset: -40;
  }
}

.float-slow {
  animation: floatSlow 6s ease-in-out infinite;
}

.float-normal {
  animation: floatNormal 4.5s ease-in-out infinite;
}

.float-fast {
  animation: floatFast 3.2s ease-in-out infinite;
}

/* Tree Structure Floating Nodes */
.tree-node-card {
  position: absolute;
  z-index: 10;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 50px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  user-select: none;
}

.tree-node-card:hover {
  transform: translateY(-8px) scale(1.06) !important;
  border-color: var(--primary);
  box-shadow: 0 15px 35px var(--primary-glow), 0 0 20px rgba(56, 189, 248, 0.4);
  z-index: 30;
}

.node-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.tree-node-card:hover .node-icon-box {
  transform: rotate(15deg) scale(1.1);
  background: var(--primary);
  color: #000;
}

.node-title {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.node-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(56, 189, 248, 0.2);
  color: var(--primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Category Center Hub Node */
.center-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  backdrop-filter: blur(20px);
  border: 2px solid rgba(56, 189, 248, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 50px rgba(56, 189, 248, 0.3), inset 0 0 20px rgba(56, 189, 248, 0.2);
  text-align: center;
}

.center-hub::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  opacity: 0.3;
  z-index: -1;
  animation: pulseGlow 4s infinite alternate;
}

/* SVG Line Connections */
.tree-connector-line {
  stroke: rgba(56, 189, 248, 0.3);
  stroke-width: 2;
  stroke-dasharray: 6 6;
  animation: dashFlow 20s linear infinite;
  transition: all 0.3s ease;
}

/* Header & Nav Bar */
.header-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.nav-item-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.dropdown-trigger:hover, .dropdown-trigger.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  min-width: 260px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 120;
}

.nav-item-dropdown:hover .dropdown-menu,
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-main);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: rgba(56, 189, 248, 0.12);
  color: var(--primary);
}

.dropdown-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}

/* Admin Link Button */
.btn-admin-nav {
  padding: 8px 18px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(192, 132, 252, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-admin-nav:hover {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

/* Category Cards Section */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.category-card {
  padding: 28px;
  border-radius: 20px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-hover-border);
}

.link-pill-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.link-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.link-pill:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(4px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-container {
    padding: 12px 16px;
  }

  .hero-container {
    min-height: 650px;
    padding-top: 100px;
  }

  .tree-node-card {
    padding: 8px 14px;
    font-size: 12px;
  }

  .node-title {
    font-size: 12px;
  }

  .node-icon-box {
    width: 28px;
    height: 28px;
  }

  .center-hub {
    width: 100px;
    height: 100px;
  }
}
