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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  background: #f5f5f5;
}

h1 {
  color: #333;
  margin-bottom: 30px;
  text-align: center;
}

.example {
  background: white;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.example h2 {
  color: #2c3e50;
  margin-bottom: 10px;
  font-size: 1.5em;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
}

.example > p {
  color: #7f8c8d;
  margin-bottom: 20px;
}

.example-content {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
  margin-top: 20px;
  align-items: start;
}

.example-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.example-controls button {
  width: 100%;
  margin: 0;
}

.example-view {
  flex: 1;
  min-height: 400px;
}

button {
  background: #3498db;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  margin: 5px;
  transition: background 0.3s;
}

button:hover {
  background: #2980b9;
}

button.danger {
  background: #e74c3c;
}

button.danger:hover {
  background: #c0392b;
}

button.success {
  background: #2ecc71;
}

button.success:hover {
  background: #27ae60;
}

.controls {
  margin-top: 15px;
}

input, textarea {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  margin: 5px;
  width: 100%;
  max-width: 400px;
}

.logs {
  margin-top: 15px;
  padding: 15px;
  background: #2c3e50;
  color: #ecf0f1;
  border-radius: 5px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.log-entry {
  padding: 5px 0;
  border-bottom: 1px solid #34495e;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-time {
  color: #95a5a6;
  margin-right: 10px;
}

.log-showing {
  color: #2ecc71;
}

.log-hiding {
  color: #e74c3c;
}

.log-hidden {
  color: #95a5a6;
}

/* StackView Container Styles */
stack-view {
  position: relative;
  width: 100%;
  min-height: 400px;
  height: 100%;
  overflow: hidden;
  background: #ecf0f1;
  border-radius: 5px;
  border: 2px solid #ddd;
}

.stackview-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  visibility: visible;
  padding: 20px;
  background: white;
}

.stackview-back-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.stackview-back-button:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

/* View Content Styles */
.view-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 280px;
}

.view-content h3 {
  color: #2c3e50;
  margin-bottom: 15px;
}

.view-content p {
  color: #7f8c8d;
  margin-bottom: 20px;
  text-align: center;
}

.view-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Form Styles */
.form-group {
  margin-bottom: 15px;
  width: 100%;
  max-width: 400px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #2c3e50;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  margin: 0;
}

/* Step Indicator */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.step {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ecf0f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #95a5a6;
}

.step.active {
  background: #3498db;
  color: white;
}

.step.completed {
  background: #2ecc71;
  color: white;
}

/* Card Styles */
.card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin: 10px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card h4 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.card p {
  color: #7f8c8d;
  margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .example {
    padding: 15px;
  }

  .example-content {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .example-controls {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .example-controls button {
    width: auto;
    flex: 1;
    min-width: 120px;
  }

  .view-content {
    padding: 10px;
  }
}
