/* Developer Tools - Responsive CSS */
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --bg: #ffffff;
  --text: #1f2937;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --text: #f3f4f6;
  --border: #1e293b;
  --gray-50: #1e293b;
  --gray-100: #334155;
  --gray-200: #475569;
  --gray-300: #64748b;
  --gray-400: #94a3b8;
  --gray-500: #cbd5e1;
  --gray-600: #e2e8f0;
  --gray-700: #f1f5f9;
  --gray-800: #f8fafc;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  transition: var(--transition);
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text);
  opacity: 0.95;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Navigation Bar */
.navbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.navbar-brand h1 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--primary);
}

.navbar-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--gray-100);
  color: var(--primary);
}

[data-theme="dark"] .nav-link:hover {
  background: var(--gray-100);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  font-weight: 600;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius);
  font-size: 1.2rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--gray-100);
}

[data-theme="dark"] .theme-toggle:hover {
  background: var(--gray-100);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

main.container {
  padding: 3rem 2rem;
}

/* Content Sections */
.content-section {
  animation: fadeIn 0.3s ease;
}

.content-section.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-section h2 {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary);
}

/* Cards */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
}

.tab-button {
  background: none;
  border: none;
  color: var(--gray-600);
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.tab-button:hover {
  color: var(--primary);
}

.tab-button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  animation: slideDown 0.3s ease;
}

.tab-content.hidden {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Code Blocks */
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  background: var(--gray-100);
  color: var(--text);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

[data-theme="dark"] code {
  background: var(--gray-100);
  color: var(--text);
}

pre {
  background: var(--gray-900);
  color: #e0e0e0;
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  position: relative;
}

[data-theme="dark"] pre {
  background: var(--gray-900);
  color: #e0e0e0;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

.copy-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(59, 130, 246, 0.8);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  z-index: 10;
}

.copy-button:hover {
  background: var(--primary);
}

/* Code Block Component */
.code-block {
  margin: 1.5rem 0;
}

/* Step List */
.step-list {
  list-style: none;
  padding: 0;
}

.step-list li {
  margin-bottom: 2rem;
  padding-left: 0;
  position: relative;
}

.step-list li strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.step-list li p {
  margin-left: 0;
}

.step-list li pre {
  margin-top: 1rem;
}

/* Command List */
.command-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.command-item {
  background: var(--gray-50);
  padding: 1.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  transition: var(--transition);
}

[data-theme="dark"] .command-item {
  background: var(--gray-50);
}

.command-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.command-item code {
  display: block;
  background: var(--bg);
  padding: 0.75rem;
  margin-bottom: 1rem;
  white-space: pre-wrap;
  word-break: break-all;
}

.command-item p {
  font-size: 0.9rem;
  margin-bottom: 0;
  color: var(--gray-600);
}

/* Explanation Grid */
.explanation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.explain-item {
  background: var(--gray-50);
  padding: 1.5rem;
  border-radius: var(--radius);
  border-top: 3px solid var(--primary);
}

[data-theme="dark"] .explain-item {
  background: var(--gray-50);
}

.explain-item h4 {
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.explain-item p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Deployment Steps */
.deployment-steps {
  margin: 2rem 0;
}

.step {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}

[data-theme="dark"] .step {
  background: var(--gray-50);
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.step-content h4 {
  margin-top: 0;
  color: var(--text);
}

/* Checklist */
.checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

[data-theme="dark"] .checkbox-item {
  background: var(--gray-50);
}

.checkbox-item:hover {
  background: rgba(59, 130, 246, 0.1);
}

.checkbox-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-item span {
  flex: 1;
}

/* FAQ Items */
.faq-items {
  margin: 1.5rem 0;
}

.faq-item {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: var(--gray-50);
  border: none;
  padding: 1.5rem;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  color: var(--text);
  font-size: 1rem;
}

[data-theme="dark"] .faq-question {
  background: var(--gray-50);
}

.faq-question:hover {
  background: rgba(59, 130, 246, 0.05);
}

.faq-question .toggle {
  font-size: 1.5rem;
  transition: var(--transition);
}

.faq-item.active .faq-question .toggle {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 1.5rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.faq-answer.hidden {
  display: none;
}

.faq-answer ul {
  list-style: none;
  padding-left: 0;
}

.faq-answer li {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.faq-answer li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Quick Links */
.quick-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.btn-link:hover {
  background: var(--primary-dark);
  transform: translateX(5px);
  text-decoration: none;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  font-size: 1rem;
}

.btn.primary {
  background: var(--primary);
  color: white;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.ghost:hover {
  background: var(--gray-100);
}

/* Footer */
.footer {
  background: var(--gray-50);
  border-top: 1px solid var(--border);
  padding: 2rem;
  margin-top: 4rem;
  text-align: center;
}

[data-theme="dark"] .footer {
  background: var(--gray-50);
}

.footer p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.footer a {
  color: var(--primary);
}

.footer a:hover {
  text-decoration: underline;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .navbar-menu {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .nav-link {
    width: 100%;
    text-align: center;
  }

  main.container {
    padding: 1.5rem 1rem;
  }

  .container {
    padding: 0 1rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .tabs {
    gap: 0.5rem;
  }

  .tab-button {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .command-list {
    grid-template-columns: 1fr;
  }

  .explanation-grid {
    grid-template-columns: 1fr;
  }

  .step {
    flex-direction: column;
    gap: 1rem;
  }

  .faq-question {
    padding: 1rem;
  }

  .faq-answer {
    padding: 1rem;
  }

  .quick-links {
    flex-direction: column;
  }

  .btn-link {
    width: 100%;
    text-align: center;
  }

  .checklist {
    grid-template-columns: 1fr;
  }

  pre {
    padding: 1rem;
    font-size: 0.8rem;
  }

  .copy-button {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }

  .navbar-brand h1 {
    font-size: 1.25rem;
  }

  .navbar-menu {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .card {
    padding: 1.5rem 1rem;
  }

  main.container {
    padding: 1rem;
  }

  pre {
    padding: 0.75rem;
    font-size: 0.75rem;
  }

  .step {
    padding: 1rem;
  }

  .step-number {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .deployment-steps {
    margin: 1rem 0;
  }
}

/* Print Styles */
@media print {
  .navbar, .footer, .theme-toggle {
    display: none;
  }

  .card {
    page-break-inside: avoid;
  }

  pre {
    page-break-inside: avoid;
    background: #f5f5f5 !important;
    color: #000 !important;
  }

  a {
    color: #0066cc;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: more) {
  :root {
    --border: #000;
  }

  [data-theme="dark"] {
    --border: #fff;
  }

  .card {
    border-width: 2px;
  }

  .nav-link.active {
    border: 2px solid var(--primary);
  }
}

/* Light color scheme preference */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
  }
}

/* Dark color scheme preference */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}

/* Animation utilities */
.fade-in {
  animation: fadeIn 0.3s ease;
}

.slide-up {
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth transitions */
* {
  --transition: all 0.3s ease;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-600);
}

/* Loading state */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Error state */
.error {
  background: #fee;
  color: var(--danger);
  padding: 1rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--danger);
  margin: 1rem 0;
}

/* Success state */
.success {
  background: #efe;
  color: var(--success);
  padding: 1rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--success);
  margin: 1rem 0;
}

/* Warning state */
.warning {
  background: #ffeaa7;
  color: #1f2937;
  padding: 1rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--warning);
  margin: 1rem 0;
}
