/* Schema-As-Code Showcase Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0a0a;
  color: #e5e5e5;
  overflow-x: hidden;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: #111111;
  border-right: 1px solid #222;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 50;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 20px 24px;
  border-bottom: 1px solid #222;
}

.sidebar-logo h1 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.sidebar-logo p {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  font-size: 13px;
  color: #999;
}

.nav-item:hover {
  background: #1a1a1a;
  color: #ccc;
}

.nav-item.active {
  background: #1a1a1a;
  color: #fff;
  border-left-color: #10b981;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* Main Content */
.main-content {
  margin-left: 240px;
  min-height: 100vh;
}

.scene-container {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.scene-container.active {
  display: block;
}

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

/* Hero Section */
.hero-section {
  padding: 60px 48px 40px;
  background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  border-bottom: 1px solid #222;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 16px;
  color: #888;
  max-width: 600px;
  line-height: 1.6;
}

/* Comparison Cards */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 48px;
}

.compare-card {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.3s;
}

.compare-card:hover {
  border-color: #333;
}

.compare-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  margin-bottom: 12px;
}

.compare-card .before {
  font-size: 13px;
  color: #ef4444;
  line-height: 1.5;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #333;
}

.compare-card .after {
  font-size: 13px;
  color: #10b981;
  line-height: 1.5;
}

.compare-card .metric {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-top: 16px;
}

.compare-card .metric-desc {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

/* Five Column Layout */
.five-col-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr 1fr 1.2fr;
  gap: 16px;
  padding: 32px 48px;
  min-height: 500px;
}

.col-panel {
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.col-header {
  padding: 12px 16px;
  background: #161616;
  border-bottom: 1px solid #222;
  font-size: 12px;
  font-weight: 600;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 8px;
}

.col-header .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.col-body {
  padding: 16px;
  flex: 1;
  font-size: 12px;
  line-height: 1.6;
  overflow-y: auto;
}

/* YAML Syntax Highlighting */
.yaml-code {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.7;
  color: #ccc;
}

.yaml-key { color: #7dd3fc; }
.yaml-string { color: #86efac; }
.yaml-comment { color: #666; font-style: italic; }
.yaml-tag { color: #fca5a5; }
.yaml-highlight {
  background: rgba(16, 185, 129, 0.15);
  border-left: 2px solid #10b981;
  padding-left: 8px;
  margin-left: -8px;
  display: block;
}

/* JSON Syntax */
.json-code {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.7;
  color: #ccc;
}
.json-key { color: #93c5fd; }
.json-string { color: #86efac; }
.json-bool { color: #fca5a5; }

/* Tool Tabs */
.tool-tabs {
  display: flex;
  gap: 8px;
  padding: 0 48px 16px;
}

.tool-tab {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #888;
  transition: all 0.2s;
}

.tool-tab:hover {
  border-color: #444;
  color: #ccc;
}

.tool-tab.active {
  background: #10b981;
  border-color: #10b981;
  color: #000;
}

/* Validation Result */
.validation-result {
  padding: 12px;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 12px;
}

.validation-result.pass {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.validation-result.block {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.validation-result.warn {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

/* UI Preview */
.ui-preview {
  background: #0d0d0d;
  border-radius: 8px;
  padding: 20px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

/* Button Components for Preview */
.btn-preview {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: default;
  transition: all 0.2s;
}

.btn-contained {
  background: #3b82f6;
  color: white;
  border: none;
}

.btn-outline-danger {
  background: transparent;
  color: #ef4444;
  border: 1px solid #ef4444;
}

.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Alert Cards */
.alert-card {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alert-fatal {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-transient {
  background: rgba(107, 114, 128, 0.15);
  border: 1px solid rgba(107, 114, 128, 0.4);
  color: #9ca3af;
}

.alert-retryable {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.alert-degraded {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

/* Pulse Animation */
.pulse-red {
  animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #4b5563;
  border-top-color: #9ca3af;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Diff View */
.diff-view {
  font-family: 'Menlo', monospace;
  font-size: 11px;
  line-height: 1.7;
}

.diff-add {
  background: rgba(16, 185, 129, 0.15);
  color: #86efac;
  padding: 2px 4px;
  border-radius: 3px;
}

.diff-remove {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  text-decoration: line-through;
  padding: 2px 4px;
  border-radius: 3px;
}

/* Scene Title */
.scene-title {
  padding: 32px 48px 0;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.scene-desc {
  padding: 8px 48px 0;
  font-size: 14px;
  color: #888;
  max-width: 700px;
  line-height: 1.6;
}

/* Bottom JSON Panel */
.json-panel {
  margin: 32px 48px;
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
  overflow: hidden;
}

.json-panel-header {
  padding: 12px 16px;
  background: #161616;
  border-bottom: 1px solid #222;
  font-size: 12px;
  font-weight: 600;
  color: #aaa;
}

.json-panel-body {
  padding: 16px;
  font-family: 'Menlo', monospace;
  font-size: 11px;
  line-height: 1.7;
  color: #ccc;
  max-height: 300px;
  overflow-y: auto;
}

/* Responsive */
@media (max-width: 1200px) {
  .five-col-layout {
    grid-template-columns: 1fr 1fr;
  }
  .compare-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #222;
  }
  .main-content {
    margin-left: 0;
  }
  .five-col-layout {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .compare-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .hero-section {
    padding: 40px 16px;
  }
  .scene-title, .scene-desc {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #111;
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #444;
}
