/* Neural Networks & LLMs Interactive Presentation Styles */

/* CSS Variables for Theme Management */
:root {
  /* Light Theme Colors */
  --primary-bg: #ffffff;
  --secondary-bg: #f8fafc;
  --accent-bg: rgba(255, 255, 255, 0.8);
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: rgba(226, 232, 240, 0.8);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  
  /* Interactive Colors */
  --color-blue: #4A90E2;
  --color-orange: #FF9800;
  --color-green: #4CAF50;
  --color-red: #F44336;
  --color-purple: #9C27B0;
  --color-yellow: #FFC107;
  --color-teal: #4ECDC4;
  --color-pink: #E91E63;
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  --glass-backdrop: blur(8px);
}

/* Dark Theme Colors */
.dark-theme {
  --primary-bg: #0f172a;
  --secondary-bg: #1e293b;
  --accent-bg: rgba(30, 41, 59, 0.8);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: rgba(51, 65, 85, 0.8);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  
  /* Dark Glassmorphism */
  --glass-bg: rgba(30, 41, 59, 0.4);
  --glass-border: rgba(148, 163, 184, 0.18);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --glass-backdrop: blur(12px);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: all 0.3s ease;
  overflow-x: hidden;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
  z-index: -1;
  animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(-20px) translateY(-10px); }
  50% { transform: translateX(20px) translateY(10px); }
  75% { transform: translateX(-10px) translateY(20px); }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.nav-brand i {
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  transition: left 0.3s ease;
  z-index: -1;
  opacity: 0.1;
}

.nav-link:hover::before,
.nav-link.active::before {
  left: 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Dropdown Navigation */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dropdown-icon {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"] .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  backdrop-filter: var(--glass-backdrop);
  box-shadow: var(--glass-shadow);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

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

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border-radius: 0.25rem;
  margin: 0.25rem;
}

.dropdown-item:hover,
.dropdown-item.active {
  background: var(--accent-bg);
  color: var(--text-primary);
  transform: translateX(4px);
}

.theme-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: var(--glass-backdrop);
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: var(--glass-shadow);
}

.theme-toggle i {
  color: var(--text-primary);
  font-size: 1.1rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 4rem;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(30deg); }
}

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

.cta-button {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.cta-button:active {
  transform: translateY(-1px);
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.neural-network-preview {
  width: 400px;
  height: 300px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  backdrop-filter: var(--glass-backdrop);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.neural-network-preview::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  animation: rotate 10s linear infinite;
}

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

/* Explanation boxes */
.explanation-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2rem;
  backdrop-filter: var(--glass-backdrop);
  margin-top: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.explanation-box h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.explanation-box p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.explanation-box ul {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.explanation-box li {
  margin-bottom: 0.5rem;
}

.explanation-box strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Sections */
.section {
  padding: 6rem 0;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.section.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Demo Containers */
.demo-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.demo-container.full-width .visualization-panel {
  grid-column: 1 / -1;
}

.visualization-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2rem;
  backdrop-filter: var(--glass-backdrop);
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
}

.visualization-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.visualization-panel.full-width {
  grid-column: 1 / -1;
}

.controls-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2rem;
  backdrop-filter: var(--glass-backdrop);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Canvas Styles */
canvas {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
}

/* Control Elements */
.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-group label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  outline: none;
  transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--gradient-primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--gradient-primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

select {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: var(--glass-backdrop);
}

select:hover,
select:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.value-display {
  background: var(--gradient-accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  min-width: 60px;
}

/* Buttons */
.demo-button {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.demo-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.demo-button:active {
  transform: translateY(0);
}

.demo-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.demo-button.secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-backdrop);
}

.demo-button.secondary:hover {
  background: var(--accent-bg);
  box-shadow: var(--glass-shadow);
}

/* Output Displays */
.output-display,
.error-display {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  padding: 1rem;
  backdrop-filter: var(--glass-backdrop);
  text-align: center;
}

.output-label,
.error-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.output-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-green);
}

.error-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-red);
}

/* Parameter Stats */
.parameter-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  backdrop-filter: var(--glass-backdrop);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Architecture Selector */
.architecture-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.arch-button {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: var(--glass-backdrop);
  font-size: 0.9rem;
}

.arch-button:hover {
  background: var(--accent-bg);
  transform: translateY(-2px);
}

.arch-button.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
}

/* Playground Styles */
.playground-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.playground-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2rem;
  backdrop-filter: var(--glass-backdrop);
  box-shadow: var(--glass-shadow);
}

.playground-controls {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.control-section {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  backdrop-filter: var(--glass-backdrop);
}

.control-section h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.live-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.metric {
  background: var(--accent-bg);
  padding: 0.75rem;
  border-radius: 0.5rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Model Selector */
.model-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.model-option {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: var(--glass-backdrop);
  text-align: center;
}

.model-option:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow);
}

.model-option.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
}

.model-name {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.model-params {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Thinking Models Section */
.model-comparison {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.model-comparison .thinking-model-card:nth-child(6) {
  grid-column: 1 / -1;
  max-width: 50%;
  margin: 0 auto;
}

.model-comparison h3 {
  grid-column: 1 / -1;
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.thinking-model-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  padding: 1rem;
  backdrop-filter: var(--glass-backdrop);
  transition: all 0.3s ease;
}

.thinking-model-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow);
}

.thinking-model-card h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.thinking-model-card ul {
  list-style: none;
  padding: 0;
}

.thinking-model-card li {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
}

.thinking-model-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-teal);
}

.thinking-process {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  backdrop-filter: var(--glass-backdrop);
  margin-bottom: 1.5rem;
}

.thinking-process h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.thinking-process ol {
  padding-left: 1.5rem;
}

.thinking-process li {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.thinking-process strong {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .model-comparison {
    grid-template-columns: 1fr;
  }
  
  .explanation-box {
    padding: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .explanation-box h3 {
    font-size: 1.2rem;
  }
}

/* Capability Metrics */
.capability-metrics {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.metric-bar {
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.metric-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 4px;
  transition: width 1s ease;
  position: relative;
}

.metric-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Progress Elements */
.epoch-info {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  padding: 1rem;
  backdrop-filter: var(--glass-backdrop);
}

.epoch-counter {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

.progress-bar {
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Speed Control */
.speed-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.speed-control label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Footer */
.footer {
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-backdrop);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-section p,
.footer-section li {
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 1rem 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Navigation responsiveness for medium screens */
@media (max-width: 1200px) {
  .nav-menu {
    gap: 0.5rem;
  }
  
  .nav-link {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .nav-menu {
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav-link {
    padding: 0.35rem 0.4rem;
    font-size: 0.75rem;
  }
  
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 2rem 1rem;
    min-height: auto;
    margin-top: 80px;
  }
  
  .demo-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .visualization-panel {
    padding: 1rem;
    overflow-x: auto;
  }
  
  .playground-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .model-selector {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .architecture-selector {
    grid-template-columns: repeat(2, 1fr);
  }
  
  canvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .navbar {
    position: sticky;
    padding: 0.5rem 0;
  }
  
  .nav-container {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .nav-brand {
    font-size: 1.1rem;
  }
  
  /* Mobile hamburger menu */
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 0.75rem;
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-link {
    width: 100%;
    text-align: center;
    padding: 0.6rem;
  }
  
  /* Mobile dropdown adjustments */
  .nav-dropdown {
    width: 100%;
  }
  
  .dropdown-toggle {
    width: 100%;
    justify-content: center;
  }
  
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 0;
    box-shadow: none;
    border: none;
    background: transparent;
    backdrop-filter: none;
    display: none;
  }
  
  .dropdown-menu.show {
    display: block;
  }
  
  .dropdown-item {
    text-align: center;
    margin: 0.1rem 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
  }
  
  .mobile-menu-toggle {
    display: block;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    padding-top: 1rem;
    min-height: auto;
  }
  
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
  
  .neural-network-preview {
    width: 100%;
    max-width: 320px;
    height: 220px;
  }
  
  .controls-panel {
    padding: 1rem;
  }
  
  .visualization-panel {
    padding: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
  }
  
  .parameter-stats {
    grid-template-columns: 1fr;
  }
  
  .live-metrics {
    grid-template-columns: 1fr;
  }
  
  .model-selector {
    grid-template-columns: 1fr;
  }
  
  .architecture-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
  
  canvas {
    touch-action: pan-x pan-y;
  }
}

@media (max-width: 480px) {
  .nav-brand span {
    font-size: 0.95rem;
  }
  
  .hero-title {
    font-size: 1.65rem;
    margin-bottom: 1rem;
  }
  
  .gradient-text {
    font-size: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  .section-subtitle {
    font-size: 0.9rem;
  }
  
  .cta-button {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }
  
  .demo-button {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    width: 100%;
  }
  
  .control-group label {
    font-size: 0.85rem;
  }
  
  .value-display {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    min-width: 50px;
  }
  
  input[type="range"] {
    height: 8px;
  }
  
  input[type="range"]::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
  }
  
  .output-display,
  .error-display {
    padding: 0.75rem;
  }
  
  .output-value {
    font-size: 1.25rem;
  }
  
  .error-value {
    font-size: 1rem;
  }
  
  .stat-item {
    padding: 0.75rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  .stat-value {
    font-size: 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-section h3,
  .footer-section h4 {
    font-size: 1.1rem;
  }
  
  .footer-section p,
  .footer-section li {
    font-size: 0.9rem;
  }
  
  /* Canvas responsiveness */
  canvas {
    max-width: none; /* Allow horizontal scrolling */
    height: auto;
    touch-action: pan-x pan-y; /* Allow panning in canvas wrapper */
  }
  
  .canvas-wrapper {
    max-height: 400px;
    overflow: auto; /* Allow both horizontal and vertical scrolling if needed */
  }
  
  .canvas-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  .zoom-control {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    min-width: auto;
  }
  
  .canvas-info {
    position: sticky;
    top: 0.25rem;
    right: 0.25rem;
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

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

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

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-secondary);
}

/* Mobile menu toggle (hidden by default) */
.mobile-menu-toggle {
  display: none;
}

/* Canvas container for better responsiveness */
.canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--secondary-bg);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  padding: 1rem;
  margin: 0.5rem 0;
}

/* Special handling for transformer canvas - allow vertical scrolling */
#transformer .canvas-wrapper {
  overflow-y: auto;
  max-height: 80vh;
}

/* Scrollbar styling for canvas wrapper */
.canvas-wrapper::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.canvas-wrapper::-webkit-scrollbar-track {
  background: var(--secondary-bg);
  border-radius: 4px;
}

.canvas-wrapper::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

.canvas-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-secondary);
}

/* Canvas zoom controls */
.canvas-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.zoom-control {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: var(--glass-backdrop);
  color: var(--text-primary);
}

.zoom-control:hover {
  background: var(--accent-bg);
  transform: translateY(-1px);
}

.zoom-control.active {
  background: var(--gradient-primary);
  color: white;
}

/* Canvas scaling indicators */
.canvas-info {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  z-index: 10;
}

/* Ensure canvases are responsive */
canvas {
  display: block;
  margin: 0 auto;
}

/* Better touch interaction for mobile */
@media (pointer: coarse) {
  input[type="range"] {
    height: 10px;
  }
  
  input[type="range"]::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
  }
  
  .demo-button,
  .arch-button,
  .zoom-control {
    min-height: 44px;
    min-width: 44px;
  }
  
  .canvas-wrapper {
    padding: 0.5rem;
  }
  
  .canvas-controls {
    margin-bottom: 1rem;
  }
  
  .zoom-control {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}

/* Landscape mode adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 2rem 1rem;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .neural-network-preview {
    height: 180px;
  }
}

/* Focus Styles */
*:focus {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

button:focus,
input:focus,
select:focus {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Better scroll behavior on mobile */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 80px;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .theme-toggle,
  .demo-button,
  .controls-panel {
    display: none;
  }
  
  .section {
    page-break-inside: avoid;
  }
  
  body {
    background: white;
    color: black;
  }
}

