body {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  margin: 0;
  padding: 20px;
  background: #f5f5f5;
}

/* Header styles */
header {
  margin-bottom: 30px;
}

header h1 {
  margin: 0 0 10px 0;
  color: #333;
}

header h1 a {
  text-decoration: none;
  color: inherit;
  margin-right: 10px;
}

header p {
  margin: 0;
  color: #666;
  font-size: 1.1em;
}

/* Demo section styles */
.demo-section {
  background: white;
  margin: 20px 0;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.demo-section h2,
.demo-section h3 {
  margin-top: 0;
  color: #333;
}

.main-menu {
  margin-bottom: 20px;
}

.main-menu ul {
  list-style: none;
  padding: 0;
}

.main-menu ul li {
  margin: 10px 0;
}

.main-menu ul ul li {
  margin-left: 20px;
  font-size: 0.9em;
}

.main-menu ul a {
  text-decoration: none;
  color: #007bff;
  font-size: 1.2em;
}

.main-menu ul a:hover {
  text-decoration: underline;
}

/* Output/result styles */
.output,
.result {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 10px;
  margin-top: 10px;
  font-family: monospace;
  font-size: 12px;
}

.result {
  padding: 0.75rem;
  font-size: 14px;
  min-height: 1.5rem;
}

/* Button styles */
.demo-button {
  padding: 0.5rem 1rem;
  border: 1px solid #007bff;
  border-radius: 4px;
  background: #007bff;
  color: black;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 10px;
  margin-bottom: 10px;
}

.demo-button:hover {
  background: #0056b3;
  border-color: #0056b3;
}

.demo-button.secondary {
  background: #6c757d;
  border-color: #6c757d;
}

.demo-button.secondary:hover {
  background: #5a6268;
  border-color: #5a6268;
}

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

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

.demo-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Controls */
.controls {
  margin-top: 20px;
  padding: 15px;
  background: #f8f8f8;
  border-radius: 4px;
}

.controls button {
  margin-right: 10px;
  margin-bottom: 10px;
  padding: 8px 16px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
  border-radius: 3px;
}

.controls button:hover {
  background: #f0f0f0;
}

/* Theme controls */
.theme-controls {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 1000;
}

.theme-button {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 12px;
}

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

/* Collapsible panel specific styles */
.panels-container {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.vertical-panel-demo {
  flex: 1;
  min-width: 300px;
}

.horizontal-panel-demo {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.sample-content {
  margin: 0;
}

.sample-content h4 {
  margin: 0 0 10px 0;
  color: #666;
}

.sample-content p {
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.sample-content ul {
  margin: 0;
  padding-left: 20px;
}

.dark-theme-demo {
  background: #1e1e1e;
  padding: 20px;
  border-radius: 4px;
}

.dark-theme-demo h3 {
  color: #fff;
}

/* Markup/code example styles */
.markup-section,
.code-example {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 4px;
}

.markup-section h3,
.code-example h3 {
  margin-top: 0;
  font-size: 1rem;
  color: #495057;
}

.markup-section pre,
.code-example pre {
  margin: 0;
  padding: 0.5rem;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  overflow-x: auto;
  font-size: 13px;
}

/* Copy button for code examples */
.code-example {
  position: relative;
}

.copy-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
}

.copy-button:hover {
  background: #0056b3;
}

/* Dark theme styles */
body.theme-dark {
  background: #1a1a1a;
  color: #fff;
}

body.theme-dark .demo-section {
  background: #2d2d2d;
  border-color: #555;
}

body.theme-dark .demo-section h2,
body.theme-dark .demo-section h3 {
  color: #fff;
}

body.theme-dark .result,
body.theme-dark .output {
  background: #404040;
  color: #fff;
  border-color: #555;
}

body.theme-dark .markup-section,
body.theme-dark .code-example {
  background: #333;
}

body.theme-dark .markup-section h3,
body.theme-dark .code-example h3 {
  color: #ccc;
}

body.theme-dark .markup-section pre,
body.theme-dark .code-example pre {
  background: #1a1a1a;
  border-color: #555;
  color: #fff;
}

body.theme-dark header h1 {
  color: #fff;
}

body.theme-dark header p {
  color: #ccc;
}
