/* TechStream Template - Critical CSS */
/* Load first for performance */

/* Base Variables */
:root {
  /* Neural Color Palette */
  --neural-primary: #00ffcc;
  --neural-secondary: #ff00ff;
  --neural-accent: #00ccff;
  --neural-warning: #ffaa00;
  --neural-danger: #ff0066;
  --neural-success: #00ff88;
  
  /* Dark Theme Base */
  --bg-primary: #0a0a0f;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-overlay: rgba(10, 10, 15, 0.8);
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #b8b8c8;
  --text-muted: #6b6b80;
  --text-accent: var(--neural-primary);
  
  /* Neural Effects */
  --glow-primary: 0 0 20px rgba(0, 255, 204, 0.5);
  --glow-secondary: 0 0 20px rgba(255, 0, 255, 0.5);
  --glow-accent: 0 0 20px rgba(0, 204, 255, 0.5);
  
  /* Typography */
  --font-primary: 'Rajdhani', sans-serif;
  --font-secondary: 'Orbitron', monospace;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;
}

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

/* Base Setup */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-normal);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Matrix Background */
.matrix-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.3;
}

/* Glow Overlay */
.glow-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, 
    rgba(0, 255, 204, 0.1) 0%, 
    transparent 50%);
  z-index: -1;
  pointer-events: none;
}

/* Cyber Grid */
.cyber-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 255, 204, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 204, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  opacity: 0.3;
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Neural Navigation */
.neuro-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-overlay);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 255, 204, 0.2);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Logo Section */
.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-hexagon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--neural-primary), var(--neural-accent));
  clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-secondary);
  font-weight: var(--font-weight-bold);
  font-size: 1.2rem;
  box-shadow: var(--glow-primary);
  animation: hexagon-pulse 3s ease-in-out infinite;
}

@keyframes hexagon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.logo-label {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-secondary);
  font-weight: var(--font-weight-bold);
  font-size: 1.5rem;
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

.brand-tagline {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
}

.nav-link-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.6rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: var(--font-weight-medium);
  transition: all 0.3s ease;
  border: 1px solid transparent;
  border-radius: 4px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--neural-primary);
  border-color: rgba(0, 255, 204, 0.3);
  background: rgba(0, 255, 204, 0.1);
  box-shadow: var(--glow-primary);
}

.link-icon {
  font-size: 0.9rem;
}

.link-indicator {
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--neural-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link.active .link-indicator {
  width: 80%;
}

/* Navigation Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Neural Search */
.neural-search-container {
  position: relative;
}

.search-trigger {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 255, 204, 0.1);
  border: 1px solid rgba(0, 255, 204, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-trigger:hover {
  background: rgba(0, 255, 204, 0.2);
  box-shadow: var(--glow-primary);
}

.search-icon {
  font-size: 1.2rem;
  color: var(--neural-primary);
}

.search-panel {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 1rem;
  width: 300px;
  background: var(--bg-secondary);
  border: 1px solid rgba(0, 255, 204, 0.3);
  border-radius: 8px;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: var(--glow-primary);
}

.search-trigger:hover .search-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.neural-input {
  width: 100%;
  padding: 0.8rem;
  background: var(--bg-primary);
  border: 1px solid rgba(0, 255, 204, 0.3);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.neural-input:focus {
  outline: none;
  border-color: var(--neural-primary);
  box-shadow: var(--glow-primary);
}

.neural-input::placeholder {
  color: var(--text-muted);
}

/* AI Assistant Button */
.ai-assistant-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--neural-secondary), var(--neural-accent));
  border: none;
  border-radius: 20px;
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--glow-secondary);
}

.ai-assistant-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.6);
}

.ai-core {
  width: 20px;
  height: 20px;
  background: var(--text-primary);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}

.ai-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--neural-secondary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ai-pulse 2s ease-in-out infinite;
}

@keyframes ai-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.5; }
}

/* User Neural Avatar */
.user-neural-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.avatar-ring {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid var(--neural-primary);
  border-radius: 50%;
  animation: ring-rotate 3s linear infinite;
}

@keyframes ring-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.avatar-core {
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  border: 1px solid rgba(0, 255, 204, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--neural-primary);
}

/* Neural Button */
.neural-btn {
  position: relative;
  padding: 1rem 2rem;
  background: transparent;
  border: 1px solid var(--neural-primary);
  border-radius: 4px;
  color: var(--neural-primary);
  font-family: var(--font-secondary);
  font-weight: var(--font-weight-medium);
  font-size: 1rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
}

.neural-btn:hover {
  background: rgba(0, 255, 204, 0.1);
  box-shadow: var(--glow-primary);
  transform: translateY(-2px);
}

.neural-btn.primary {
  background: linear-gradient(135deg, var(--neural-primary), var(--neural-accent));
  border-color: transparent;
  color: var(--bg-primary);
}

.neural-btn.secondary {
  background: transparent;
  border-color: var(--neural-secondary);
  color: var(--neural-secondary);
}

.neural-btn.secondary:hover {
  background: rgba(255, 0, 255, 0.1);
  box-shadow: var(--glow-secondary);
}

.btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-energy {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.neural-btn:hover .btn-energy {
  left: 100%;
}

/* Ripple Effect */
[data-ripple] {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--neural-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Critical */
@media (max-width: 768px) {
  .nav-container {
    padding: 1rem;
  }
  
  .nav-link-group {
    display: none;
  }
  
  .nav-actions {
    gap: 1rem;
  }
  
  .brand-name {
    font-size: 1.2rem;
  }
  
  .brand-tagline {
    display: none;
  }
}