:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #100c1e;
  color: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #30204f, #100c1e 75%);
}

.experiment {
  width: min(100% - 32px, 620px);
  margin: 0 auto;
  padding: 28px 0 40px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 30px;
  color: #c4b5fd;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
}

header a, footer a {
  color: inherit;
  text-decoration: none;
}

header span {
  font-size: 26px;
}

.panel {
  background: #1b1530;
  border: 1px solid #3d315b;
  border-radius: 22px;
  padding: 30px 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.eyebrow {
  color: #bba5ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

h1 {
  font-size: clamp(25px, 5vw, 36px);
  line-height: 1.25;
  letter-spacing: -.6px;
  margin: 0 0 20px;
}

.description {
  color: #bdb0d4;
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 28px;
}

.vote-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 17px;
  color: white;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}

button:active { transform: scale(.97); }
button:disabled { opacity: .5; cursor: wait; }

.yes { background: #16a34a; }
.no { background: #dc2626; }

.hint {
  color: #a99bc2;
  font-size: 13px;
  text-align: center;
  margin-top: 22px;
}

.notice {
  color: #c8bce0;
  line-height: 1.6;
}

.result-label {
  display: flex;
  justify-content: space-between;
  margin: 24px 0 10px;
  font-size: 15px;
}

.bar {
  height: 14px;
  background: #362b4d;
  border-radius: 20px;
  overflow: hidden;
}

.yes-bar, .no-bar {
  height: 100%;
  width: 0;
  border-radius: 20px;
  transition: width .6s ease;
}

.yes-bar { background: #16a34a; }
.no-bar { background: #dc2626; }

.share-area { margin-top: 30px; }

.share {
  width: 100%;
  background: #7651e8;
}

footer {
  color: #bba5ff;
  text-align: center;
  margin-top: 30px;
  font-size: 14px;
}

[hidden] { display: none !important; }

@media (max-width: 480px) {
  .experiment { padding-top: 18px; }
  .panel { padding: 26px 20px; }
  header { padding-bottom: 22px; }
}

/* Create Experiment form */

.field-label,
.visibility-options legend {
  display: block;
  color: #e5dbff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

textarea,
#shareLink {
  width: 100%;
  background: #110d20;
  border: 1px solid #51416f;
  border-radius: 12px;
  color: #fff;
  padding: 16px;
  font: inherit;
  font-size: 16px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 130px;
}

textarea:focus,
#shareLink:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167,139,250,.15);
}

textarea::placeholder {
  color: #897c9f;
}

.visibility-options {
  border: 0;
  padding: 0;
  margin: 30px 0;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin: 10px 0;
  border: 1px solid #45375f;
  border-radius: 12px;
  cursor: pointer;
}

.option:has(input:checked) {
  border-color: #a78bfa;
  background: rgba(118,81,232,.12);
}

.option input {
  margin-top: 4px;
  accent-color: #a78bfa;
}

.option span {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.option strong {
  font-size: 15px;
}

.option small {
  color: #bdb0d4;
  line-height: 1.5;
}

#createForm > button,
#copyLink {
  width: 100%;
}

#createError {
  margin-top: 20px;
  color: #fca5a5;
}

#createSuccess h2 {
  font-size: 26px;
  margin: 0 0 12px;
}

#shareLink {
  margin-bottom: 14px;
}

#createSuccess > a {
  display: block;
  margin-top: 24px;
  color: #c4b5fd;
  text-align: center;
}


/* Report Question */

.report-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #403354;
  text-align: center;
}

.report-toggle {
  background: transparent;
  color: #a99bc2;
  border: 0;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.report-toggle:hover {
  color: #fca5a5;
}

#reportForm {
  margin-top: 18px;
  padding: 20px;
  background: #140f25;
  border: 1px solid #45375f;
  border-radius: 12px;
  text-align: left;
}

.report-label {
  display: block;
  color: #e5dbff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

#reportReason {
  width: 100%;
  padding: 14px;
  background: #211936;
  color: #ffffff;
  border: 1px solid #51416f;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
}

#reportReason:focus {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.report-submit {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  background: #6d4358;
  color: #ffffff;
  font-size: 14px;
}

.report-submit:hover {
  background: #89536e;
}

.report-message {
  margin-top: 14px;
  color: #c4b5fd;
  font-size: 14px;
  line-height: 1.5;
}

.report-message.error {
  color: #fca5a5;
}
