.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
}

.header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
}

.header h1 {
  margin: 0 0 10px 0;
  font-size: 2.5rem;
}

.subtitle {
  margin: 10px 0;
  opacity: 0.9;
  font-size: 1.1rem;
}

.status {
  background: rgba(255, 255, 255, 0.2);
  padding: 10px;
  border-radius: 4px;
  margin-top: 15px;
  font-weight: 500;
}

.demo-nav {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.demo-nav h3 {
  margin: 0 0 15px 0;
  color: #333;
}

.nav-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-button {
  background: white;
  border: 2px solid #dee2e6;
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-button:hover {
  border-color: #007bff;
  background: #f8f9ff;
}

.nav-button.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.demo-content {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  min-height: 400px;
}

.demo-section {
  margin-bottom: 25px;
}

.demo-section h3 {
  color: #495057;
  margin: 0 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.demo-section p {
  color: #6c757d;
  margin: 0 0 15px 0;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.demo-button {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.9rem;
}

.demo-button:hover {
  background: #218838;
}

.demo-button.danger {
  background: #dc3545;
}

.demo-button.danger:hover {
  background: #c82333;
}

.demo-button.warning {
  background: #ffc107;
  color: #212529;
}

.demo-button.warning:hover {
  background: #e0a800;
}

.demo-button.info {
  background: #17a2b8;
}

.demo-button.info:hover {
  background: #138496;
}

.form-demo {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  margin: 15px 0;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.logs-display {
  background: #1a1a1a;
  color: #00ff00;
  padding: 15px;
  border-radius: 4px;
  font-family: 'Monaco', 'Consolas', monospace;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
  margin: 15px 0;
  border: 1px solid #333;
}

.performance-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 15px 0;
}

.metric-card {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #dee2e6;
}

.metric-card h4 {
  margin: 0 0 10px 0;
  color: #495057;
  font-size: 0.9rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #007bff;
}

.metric-unit {
  font-size: 0.8rem;
  color: #6c757d;
}

.error-fallback {
  background: #f8d7da;
  color: #721c24;
  padding: 20px;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  text-align: center;
}

.footer {
  text-align: center;
  padding: 20px;
  color: #6c757d;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 0.9rem;
}

.api-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-left: 10px;
}

.api-status.success {
  background: #d4edda;
  color: #155724;
}

.api-status.error {
  background: #f8d7da;
  color: #721c24;
}

.api-status.loading {
  background: #d1ecf1;
  color: #0c5460;
}

@media (max-width: 768px) {
  .app {
    padding: 10px;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .nav-buttons {
    flex-direction: column;
  }
  
  .nav-button {
    text-align: center;
  }
  
  .performance-metrics {
    grid-template-columns: 1fr;
  }
}