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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #222;
  background: #fafafa;
}

/* Landing page */
.landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

.landing h1 {
  font-size: 1.4rem;
  font-weight: 400;
  color: #666;
  letter-spacing: 0.05em;
}

/* Testing pages layout */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: #555;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Card list for index pages */
.card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-list a {
  display: block;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card-list a:hover {
  border-color: #aaa;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.card-list .card-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.card-list .card-desc {
  font-size: 0.9rem;
  color: #666;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover {
  background: #f0f0f0;
  border-color: #aaa;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* Log panel */
.log-panel {
  margin-top: 2rem;
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: 6px;
  padding: 1rem;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-panel:empty::before {
  content: "Waiting for events\2026";
  color: #666;
}

.log-entry-success {
  color: #4ec9b0;
}

.log-entry-error {
  color: #f44747;
}

.log-entry-info {
  color: #569cd6;
}

/* Config inputs */
.config-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.config-group label {
  font-size: 0.85rem;
  color: #555;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.config-group input,
.config-group textarea {
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
}

/* Button row */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Content locker specific */
.locked-content {
  position: relative;
  overflow: hidden;
}

.locked-content.is-locked .locked-body {
  max-height: 80px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
}

.locked-content.is-locked .unlock-prompt {
  display: flex;
}

.unlock-prompt {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  margin-top: 0.5rem;
  background: #f5f5f5;
  border-radius: 6px;
  text-align: center;
}

.unlock-prompt p {
  color: #555;
  font-size: 0.95rem;
}

.status-msg {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  display: none;
}

.status-msg.visible {
  display: block;
}

.status-msg.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.status-msg.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Responsive */
@media (max-width: 600px) {
  .page {
    padding: 1.5rem 1rem;
  }
}
