/* ============================================
   THE AI VALLEY PODCAST - MAIN STYLES
   Retro-Industrial Tech Theme
   ============================================ */

/* CSS Variables */
:root {
  /* Primary - Deep industrial blacks */
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --bg-card: #0f0f0f;

  /* Accent - Electric/neon highlights */
  --accent-primary: #00ff88;
  /* Matrix green / AI green */
  --accent-secondary: #ff3366;
  /* Warning red */
  --accent-tertiary: #00d4ff;
  /* Cyan/electric blue */
  --accent-yellow: #ffcc00;
  /* Terminal yellow */

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #c8c8c8;
  --text-muted: #9a9a9a;
  --text-dim: #666666;

  /* Effects */
  --glow-green: 0 0 20px rgba(0, 255, 136, 0.5);
  --glow-red: 0 0 20px rgba(255, 51, 102, 0.5);
  --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.5);
  --glow-yellow: 0 0 20px rgba(255, 204, 0, 0.5);
  --scanline-opacity: 0.03;

  /* Borders */
  --border-color: #2a2a2a;
  --border-accent: #00ff88;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Typography */
  --font-display: 'Space Mono', 'Courier New', monospace;
  --font-body: 'JetBrains Mono', 'Fira Code', monospace;
  --font-pixel: 'VT323', monospace;

  /* Container */
  --container-max: 1400px;
  --container-padding: 1.5rem;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Z-index layers */
  --z-background: -1;
  --z-matrix: 1;
  /* Above background, below content */
  --z-content: 10;
  --z-nav: 100;
  --z-player: 200;
  --z-modal: 300;
  --z-overlay: 400;
  --z-scanlines: 9999;
}

/* Matrix Canvas */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 5;
  pointer-events: none;
  opacity: 0.15;
  background: transparent;
}

/* Ensure content sits above matrix */
/* Ensure content sits above matrix but is transparent to see it */
main,
.main,
.container {
  position: relative;
  z-index: var(--z-content);
  background: transparent !important;
  /* Force visibility of matrix behind */
}

/* Ensure sections don't block rain unless they are cards */
section {
  background: transparent;
}

/* Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border: 1px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-tertiary);
}

/* Links */
a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-tertiary);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Lists */
ul,
ol {
  list-style: none;
}

/* Focus States */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 8vw, 5rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--space-md);
}

.highlight {
  color: var(--accent-primary);
  text-shadow: var(--glow-green);
}

/* ============================================
   NOISE OVERLAY
   ============================================ */

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-overlay);
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Matrix canvas styles are defined earlier in this file */

/* ============================================
   NAVIGATION
   ============================================ */

.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-md) var(--container-padding);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
}

.logo-img {
  width: 40px;
  height: 40px;
  border: 2px solid var(--accent-primary);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.1em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
  text-shadow: var(--glow-green);
}

/* Subscribe Dropdown */
.subscribe-dropdown {
  position: relative;
}

.subscribe-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.subscribe-toggle .arrow {
  font-size: 0.625rem;
  transition: transform var(--transition-fast);
}

.subscribe-dropdown:hover .arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--space-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
}

.subscribe-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  color: var(--text-secondary);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.dropdown-menu li:last-child a {
  border-bottom: none;
}

.dropdown-menu li a:hover {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
}

.platform-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: background var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition-fast);
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
  margin-bottom: var(--space-3xl);
}

.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--accent-primary);
  margin-bottom: var(--space-md);
  letter-spacing: 0.15em;
  animation: terminalFlicker 4s infinite;
}

@keyframes terminalFlicker {

  0%,
  100% {
    opacity: 1;
  }

  92% {
    opacity: 1;
  }

  93% {
    opacity: 0.7;
  }

  94% {
    opacity: 1;
  }

  95% {
    opacity: 0.8;
  }

  96% {
    opacity: 1;
  }
}

.section-title {
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  font-size: clamp(2rem, 5vw, 3rem);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 80px;
  height: 3px;
  background: var(--accent-primary);
  box-shadow: var(--glow-green);
}

/* ============================================
   TERMINAL WINDOW
   ============================================ */

.terminal-window {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 0;
}

.terminal-dot.red {
  background: var(--accent-secondary);
}

.terminal-dot.yellow {
  background: var(--accent-yellow);
}

.terminal-dot.green {
  background: var(--accent-primary);
}

.terminal-title {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.terminal-body {
  padding: var(--space-lg);
}

.terminal-line {
  margin-bottom: var(--space-md);
  font-family: var(--font-body);
}

.terminal-output {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.prompt {
  color: var(--accent-primary);
  margin-right: var(--space-sm);
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  gap: var(--space-xl);
  min-height: 300px;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-right-color: var(--accent-tertiary);
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--accent-primary);
  letter-spacing: 0.15em;
  text-shadow: var(--glow-green);
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s infinite;
}

@keyframes dots {

  0%,
  20% {
    content: '.';
  }

  40% {
    content: '..';
  }

  60%,
  100% {
    content: '...';
  }
}

/* Error State */
.error-container {
  text-align: center;
  padding: var(--space-3xl);
  background: var(--bg-card);
  border: 2px solid var(--accent-secondary);
  max-width: 500px;
  margin: 0 auto;
}

.error-icon {
  font-size: 4rem;
  color: var(--accent-secondary);
  margin-bottom: var(--space-lg);
  animation: errorPulse 2s ease-in-out infinite;
}

@keyframes errorPulse {

  0%,
  100% {
    text-shadow: 0 0 20px rgba(255, 51, 102, 0.5);
  }

  50% {
    text-shadow: 0 0 40px rgba(255, 51, 102, 0.8);
  }
}

.error-container h3 {
  color: var(--accent-secondary);
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.error-container p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: var(--space-xl);
}

/* ============================================
   FOOTER
   ============================================ */

.main-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-3xl);
}

/* Removed footer-ascii to allow components.css to take precedence */

.footer-middle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-section {
  padding: var(--space-md) 0;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--accent-primary);
  margin-bottom: var(--space-md);
  letter-spacing: 0.1em;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-xl);
}

.footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin-bottom: var(--space-xl);
}

.copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.copyright-symbol {
  color: var(--accent-primary);
}

.footer-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: var(--space-md);
}

.mb-2 {
  margin-bottom: var(--space-xl);
}

.mb-3 {
  margin-bottom: var(--space-2xl);
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}