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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #fafafa;
  min-height: 100vh;
  padding: 20px;
}

.main-container {
  max-width: 900px;
  margin: 0 auto;
}

.header {
  text-align: center;
  color: #1a1a1a;
  margin-bottom: 40px;
  position: relative;
}

.back-link-container {
  position: absolute;
  left: 0;
  top: 10px;
}

.back-link {
  color: #0066ff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.back-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.header-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.025em;
}

.header-subtitle {
  font-size: 16px;
  color: #6b7280;
}

.demo-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 800px) {
  .demo-content {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 16px;
}

.steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 34px;
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eef2ff;
  color: #0066ff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps strong {
  color: #1a1a1a;
  font-weight: 600;
}

.note {
  margin-top: 16px;
  padding: 12px 14px;
  background: #f9fafb;
  border-left: 3px solid #d1d5db;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  line-height: 1.6;
  color: #6b7280;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin: 16px 0 6px;
}

label:first-of-type {
  margin-top: 0;
}

input[type='text'] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
}

input[type='text']:focus {
  outline: 2px solid #0066ff;
  outline-offset: -1px;
  border-color: #0066ff;
}

input.flash {
  background: #fef9c3;
  transition: background 0.6s;
}

#event-log {
  max-height: 220px;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.7;
  color: #4b5563;
}

#event-log div {
  padding: 2px 0;
  border-bottom: 1px solid #f3f4f6;
}

#event-log div:last-child {
  border-bottom: none;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}
