body {
  font-family: system-ui, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  margin: 0;
  padding: 28px;
  color: #111827;
}

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

.container.narrow {
  max-width: 520px;
}

.card {
  background: white;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
  margin-bottom: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

h1, h2, h3, h4 {
  margin-top: 0;
}

h1 {
  color: #c2185b;
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.6;
}

.badge {
  display: inline-block;
  background: #fce7f3;
  color: #be185d;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  margin-right: 8px;
  margin-bottom: 8px;
}

.small {
  color: #64748b;
  font-size: 0.95rem;
}

.safe {
  background: linear-gradient(180deg, #4b5563 0%, #374151 100%);
  border-radius: 30px;
  padding: 22px;
  border: 8px solid #9ca3af;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.08), 0 18px 28px rgba(0,0,0,.15);
}

.safe-grid {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 18px;
  align-items: center;
}

.panel {
  background: rgba(255,255,255,.12);
  border-radius: 22px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.15);
}

.param-row {
  margin-bottom: 16px;
}

.param-title {
  color: white;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: .04em;
}

.dark-text {
  color: #111827;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-form {
  display: inline;
}

.choice {
  min-width: 88px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,.14);
  background: #f3f4f6;
  color: #111827;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

.choice.selected {
  outline: 4px solid rgba(255,255,255,.2);
  border-color: #111827;
}

.choice.red {
  background: #ef4444;
  color: white;
}

.choice.blue {
  background: #3b82f6;
  color: white;
}

.choice.green {
  background: #22c55e;
  color: white;
}

.choice.dark {
  background: #111827;
  color: white;
}

.wheel-box {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100%;
}

.wheel {
  width: 108px;
  height: 108px;
  border-radius: 999px;
  background: radial-gradient(circle at 40% 40%, #d1d5db 0%, #6b7280 45%, #1f2937 100%);
  position: relative;
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.12);
}

.wheel:before,
.wheel:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #d1d5db;
  border-radius: 999px;
}

.wheel:before {
  width: 14px;
  height: 70px;
  transform: translate(-50%, -50%) rotate(20deg);
}

.wheel:after {
  width: 70px;
  height: 14px;
  transform: translate(-50%, -50%) rotate(20deg);
}

.display {
  margin-top: 16px;
  background: #0f172a;
  color: #f87171;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
  letter-spacing: .08em;
  border-radius: 16px;
  padding: 14px 16px;
  text-align: center;
}

.current-code {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.current-code span,
.attempt-values span {
  background: #f8fafc;
  color: #0f172a;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid #e5e7eb;
}

.controls {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action,
.link-button {
  border: none;
  border-radius: 16px;
  padding: 13px 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.primary {
  background: #c2185b;
  color: white;
}

.secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.status {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  font-weight: 700;
  background: #eef2ff;
}

.status.success {
  background: #dcfce7;
  color: #166534;
}

.status.error {
  background: #fee2e2;
  color: #991b1b;
}

.text-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  font-size: 1rem;
  box-sizing: border-box;
}

.attempt-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.attempt,
.session-row {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 14px;
  background: #fafafa;
  margin-bottom: 12px;
}

.attempt.opened {
  border-color: #22c55e;
  background: #f0fdf4;
}

.attempt-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 1100px) {
  .safe-grid,
  .attempt-list,
  .topbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
}

.code-red {
  color: #ef4444;
  font-weight: 800;
}

.code-blue {
  color: #3b82f6;
  font-weight: 800;
}

.code-green {
  color: #22c55e;
  font-weight: 800;
}

.bug-highlight {
  background: #fff200;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 900;
}
.mission-highlight {
  color: #c2185b;
}
