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

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

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

/* Header */
.demo-header {
  background: #111111;
  border-bottom: 1px solid #222;
  padding: 20px 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-header h1 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.demo-header p {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.demo-header .badge {
  font-size: 11px;
  color: #555;
  background: #1a1a1a;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #333;
}

/* Main Layout */
.demo-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
}

/* Section Title */
.section-title {
  font-size: 14px;
  font-weight: 600;
  color: #aaa;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Five Column Layout */
.five-col {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr 1fr 1.2fr;
  gap: 16px;
  margin-bottom: 32px;
}

.panel {
  background: #111111;
  border: 1px solid #222;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.panel-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;
}

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

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

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

.yaml-key { color: #7dd3fc; }
.yaml-string { color: #86efac; }
.yaml-number { color: #fca5a5; }
.yaml-comment { color: #666; font-style: italic; }
.yaml-tag { color: #f0abfc; }

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

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

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

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

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

.val-layer {
  padding: 8px 10px;
  background: #1a1a1a;
  border-radius: 6px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.val-layer-name { color: #888; }
.val-layer-status {
  font-weight: 600;
  font-size: 11px;
}

.val-layer-status.pass { color: #10b981; }
.val-layer-status.block { color: #ef4444; }
.val-layer-status.warn { color: #f59e0b; }

.val-layer-detail {
  font-size: 10px;
  color: #666;
  padding-left: 10px;
  margin-bottom: 8px;
}

/* UI Preview */
.ui-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  min-height: 300px;
}

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

.alert-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.alert-content { flex: 1; }
.alert-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}
.alert-desc {
  font-size: 11px;
  opacity: 0.85;
  line-height: 1.5;
}

.alert-critical {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.alert-info {
  background: rgba(59, 130, 246, 0.12);
  border-color: 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); }
}

/* Input Section */
.input-section {
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
}

.input-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: #aaa;
  margin-bottom: 12px;
}

.input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.input-group label {
  font-size: 12px;
  color: #888;
  min-width: 100px;
  display: flex;
  align-items: center;
}

.input-group input,
.input-group select {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 8px 12px;
  color: #e5e5e5;
  font-size: 13px;
  font-family: 'Menlo', monospace;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #10b981;
}

.btn-run {
  background: #10b981;
  color: #000;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-run:hover {
  background: #34d399;
}

/* Footer */
.demo-footer {
  text-align: center;
  padding: 40px 32px;
  border-top: 1px solid #222;
  margin-top: 40px;
}

.demo-footer p {
  font-size: 12px;
  color: #555;
}

.demo-footer a {
  color: #10b981;
  text-decoration: none;
}

.demo-footer a:hover {
  text-decoration: underline;
}

/* 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;
}

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

@media (max-width: 768px) {
  .five-col {
    grid-template-columns: 1fr;
  }
  .demo-main {
    padding: 16px;
  }
  .demo-header {
    padding: 16px;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}
