/* Modern Dynamic Web Server Landing Page */

:root {
  /* Botric Brand Colors - Matching logo.png */
  --primary: #DE0437;
  --primary-dark: #b50329;
  --primary-light: #ff0540;
  --secondary: #FCD305;
  --accent: #DE0437;
  --accent-light: #ff0540;
  --crimson: #DE0437;
  --gold: #FCD305;
  --french-gray: #B7BCC3;
  --licorice: #1B0C16;
  --navy-dark: #1B0C16;
  --navy-bg: #000000;
  
  /* Grays */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Surface colors */
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --background: #f9fafb;
  --border: #e5e7eb;
  
  /* Text colors */
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Gradients - Updated for Botric branding */
  --gradient-primary: linear-gradient(135deg, #DE0437 0%, #b50329 100%);
  --gradient-secondary: linear-gradient(135deg, #FCD305 0%, #DE0437 100%);
  --gradient-accent: linear-gradient(135deg, #DE0437 0%, #FCD305 100%);
  
  /* 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-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark theme variables */
[data-theme="dark"] {
  --surface: #1f2937;
  --surface-hover: #374151;
  --background: #111827;
  --border: #374151;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --gray-900: #f9fafb;
  --gray-800: #f3f4f6;
  --gray-700: #e5e7eb;
}

/* Dark mode header */
[data-theme="dark"] .header {
  background: rgba(31, 41, 55, 0.95);
  border-bottom: 1px solid var(--border);
}

/* Dark mode navigation */
[data-theme="dark"] .nav-link {
  color: var(--text-secondary);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
  color: var(secondary);
}

/* Dark mode buttons */
[data-theme="dark"] .btn-icon {
  background: var(--surface);
  color: var(--text-secondary);
}

[data-theme="dark"] .btn-icon:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

/* Dark mode sections */
[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
}

[data-theme="dark"] .features {
  background: var(--surface);
}

[data-theme="dark"] .feature-card {
  background: var(--background);
  border: 1px solid var(--border);
}

[data-theme="dark"] .website-card {
  background: var(--surface);
  border: 1px solid var(--border);
}

[data-theme="dark"] .stats {
  background: var(--surface);
}

[data-theme="dark"] .footer {
  background: linear-gradient(135deg, #0d1117 0%, var(--licorice) 100%);
  color: var(--text-primary);
  border-top: 1px solid rgba(252, 211, 5, 0.2);
}

[data-theme="dark"] .footer-bottom {
  border-top: 1px solid rgba(252, 211, 5, 0.2);
  color: var(--french-gray);
}

[data-theme="dark"] .footer-section a {
  color: var(--text-secondary);
}

[data-theme="dark"] .footer-section a:hover {
  color: var(--gold);
}

[data-theme="dark"] .status-dot {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Background elements */
.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--gradient-primary);
  opacity: 0.03;
  z-index: -2;
}

.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: var(--gradient-accent);
  opacity: 0.1;
  animation: float 20s ease-in-out infinite;
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 200px;
  height: 200px;
  top: 60%;
  right: 15%;
  animation-delay: -10s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  bottom: 20%;
  left: 60%;
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-30px) rotate(120deg); }
  66% { transform: translateY(30px) rotate(240deg); }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Header and Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand .logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-brand .logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-brand .logo svg {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Buttons */
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.5rem;
  line-height: 1;
}

.btn-icon:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  transform: scale(1.1);
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: var(--radius);
  background: var(--crimson);
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(222, 4, 55, 0.3);
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: linear-gradient(135deg, var(--crimson) 0%, var(--primary-dark) 100%);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(222, 4, 55, 0.4);
  border: 2px solid transparent;
}

.btn-hero:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--crimson) 100%);
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(222, 4, 55, 0.6);
  border-color: var(--gold);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--surface);
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-weight: 500;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--gray-300);
  transform: translateY(-1px);
}

/* Visitor Counter */
.visitor-counter {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.counter-item {
  text-align: center;
}

.counter-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.counter-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Main content */
.main {
  margin-top: 80px;
}

/* Hero section */
.hero {
  padding: var(--space-3xl) 0;
  position: relative;
  text-align: center;
  background: linear-gradient(135deg, var(--licorice) 0%, var(--navy-bg) 100%);
  color: white;
  min-height: 500px;
  display: flex;
  align-items: center;
}

.hero .container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero-content-center {
  max-width: 800px;
  text-align: center;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(222, 4, 55, 0.15);
  border: 1px solid rgba(222, 4, 55, 0.4);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: var(--space-lg);
}

.badge-icon {
  font-size: 1rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  color: white;
}

.gradient-text {
  background: linear-gradient(135deg, #DE0437 0%, #FCD305 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  justify-content: center;
}

/* Hero visualization */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.server-visualization {
  position: relative;
}

.server-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-xl);
  width: 300px;
  animation: float 6s ease-in-out infinite;
}

.server-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.server-dots {
  display: flex;
  gap: var(--space-xs);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.server-title {
  font-weight: 600;
  color: var(--text-primary);
}

.status-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { 
    opacity: 1; 
    box-shadow: 0 0 10px var(--crimson);
  }
  50% { 
    opacity: 0.5; 
    box-shadow: 0 0 20px var(--crimson);
  }
}

/* Sections */
section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.section-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Features section */
.features {
  background: var(--surface);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.feature-card {
  background: var(--background);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  color: white;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  color: var(--text-secondary);
}

/* Websites section */
.websites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.website-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.website-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.website-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.website-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.website-card p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-3xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Documentation section */
.docs {
  background: var(--surface);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.doc-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: relative;
}

.doc-number {
  position: absolute;
  top: -16px;
  left: var(--space-xl);
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.doc-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.doc-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.code-block {
  background: var(--gray-900);
  color: var(--gray-100);
  padding: var(--space-md);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  overflow-x: auto;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.file-item {
  padding: var(--space-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.feature-tags {
  display: flex;
  gap: var(--space-sm);
}

.tag {
  padding: var(--space-xs) var(--space-sm);
  background: var(--primary);
  color: white;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Stats section */
.stats {
  background: var(--gray-900);
  color: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-light);
  margin-bottom: var(--space-sm);
}

.stat-label {
  color: var(--gray-300);
  font-weight: 500;
}

/* Footer */
.footer {
  background: var(--gray-900);
  color: white;
  padding: var(--space-3xl) 0 var(--space-xl) 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3xl);
  margin-bottom: var(--space-xl);
}

.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

.footer-brand .logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.footer-brand .logo svg {
  color: var(--accent-light);
}

.footer-brand p {
  color: var(--gray-400);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.footer-section h4 {
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.footer-section a {
  display: block;
  color: var(--gray-400);
  text-decoration: none;
  margin-bottom: var(--space-sm);
  transition: var(--transition);
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(222, 4, 55, 0.2);
  color: var(--french-gray);
}

.server-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--crimson);
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 10px var(--crimson);
}

/* Status indicators */
.status-indicator-fixed {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 50;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
}

.status-indicator-fixed.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-container {
  position: fixed;
  top: var(--space-xl);
  right: var(--space-lg);
  z-index: 200;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--space-sm);
  transform: translateX(400px);
  opacity: 0;
  transition: var(--transition);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.success {
  border-left: 4px solid var(--accent);
}

.toast.error {
  border-left: 4px solid #ef4444;
}

/* Utility classes */
code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--gray-100);
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
}

/* Responsive design */
@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .nav-links {
    gap: var(--space-lg);
  }
  
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .features-grid,
  .websites-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .nav {
    padding: var(--space-md);
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}