* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0d10;
  color: #f5f5f5;
  font-family: Arial, Helvetica, sans-serif;
  position: relative;
}

.centre {
  text-align: center;
  padding: 40px;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 10vw, 7rem);
  letter-spacing: 0.18em;
  font-weight: 700;
}

.line {
  width: 70px;
  height: 2px;
  background: #f5f5f5;
  margin: 28px auto;
  opacity: 0.65;
}

p {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.12em;
  opacity: 0.65;
}

.build-mark {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  opacity: 0.22;
  user-select: none;
}

.experiments-link {
  position: absolute;
  left: 12px;
  bottom: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #f5f5f5;
  opacity: 0.22;
  text-decoration: none;
}

.experiments-link:hover {
  opacity: 0.65;
}

.experiment-page {
  display: block;
  min-height: 100vh;
  padding: 48px 24px;
  background: #0b0d10;
  color: #f5f5f5;
}

.home-link {
  position: absolute;
  top: 18px;
  left: 24px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: #f5f5f5;
  opacity: 0.28;
  text-decoration: none;
}

.home-link:hover {
  opacity: 0.7;
}

.experiment {
  max-width: 980px;
  margin: 110px auto 0;
}

.experiment-number {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  opacity: 0.3;
  margin-bottom: 18px;
}

.experiment h2 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4.5rem);
  letter-spacing: 0.08em;
  font-weight: 700;
}

.experiment-intro {
  margin-top: 18px;
  max-width: 640px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  opacity: 0.48;
}

.question-area {
  margin-top: 72px;
  max-width: 620px;
}

.question-area label {
  display: block;
  margin-bottom: 18px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.input-row {
  display: flex;
  gap: 14px;
}

.input-row input {
  flex: 1;
  min-width: 0;
  padding: 14px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245,245,245,0.28);
  color: #f5f5f5;
  font-size: 1.1rem;
  outline: none;
}

.input-row input:focus {
  border-bottom-color: rgba(245,245,245,0.75);
}

.input-row button {
  padding: 0 18px;
  background: transparent;
  border: 1px solid rgba(245,245,245,0.22);
  color: #f5f5f5;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.input-row button:hover {
  border-color: rgba(245,245,245,0.65);
}

.results {
  margin-top: 64px;
  max-width: 820px;
}

@media (max-width: 640px) {
  .input-row {
    flex-direction: column;
  }

  .input-row button {
    min-height: 44px;
  }
}

/* ==========================================================
   EXPERIMENT LOADING / RESULT CONTROLS
   ========================================================== */

.loader-area {
  margin-top: 40px;
  width: 160px;
  text-align: center;
}

.triangle-loader {
  position: relative;
  width: 58px;
  height: 48px;
  margin: 0 auto 18px;
}

.triangle-loader .dot {
  position: absolute;
  font-size: 1.4rem;
  line-height: 1;
  opacity: 0.25;
  transform: scale(1);
  transform-origin: center;
  animation: trianglePulse 1.35s infinite ease-in-out;
}

.triangle-loader .dot-one {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 0s;
}

.triangle-loader .dot-two {
  right: 5px;
  bottom: 0;
  animation-delay: 0.45s;
}

.triangle-loader .dot-three {
  left: 5px;
  bottom: 0;
  animation-delay: 0.9s;
}

@keyframes trianglePulse {
  0%,
  55%,
  100% {
    opacity: 0.22;
    font-size: 1.4rem;
    text-shadow: none;
  }

  20% {
    opacity: 1;
    font-size: 2rem;
    text-shadow: 0 0 9px rgba(245,245,245,0.5);
  }
}

.loader-text {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  opacity: 0.38;
}

.result-entry {
  animation: resultAppear 0.35s ease-out;
}

@keyframes resultAppear {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-label {
  margin-bottom: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  opacity: 0.35;
}

.result-value {
  margin-bottom: 28px;
  font-size: 2rem;
  letter-spacing: 0.06em;
}

.api-result {
  max-width: 760px;
  line-height: 1.75;
  letter-spacing: 0.025em;
  opacity: 0.78;
}

.result-actions {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-top: 42px;
}

.action-link {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f5f5f5;
  font-family: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  opacity: 0.55;
  text-decoration: none;
  cursor: pointer;
}

.action-link:hover {
  opacity: 1;
}

.action-link.secondary {
  opacity: 0.25;
}

.action-link.secondary:hover {
  opacity: 0.7;
}

.experiment-finished {
  margin-top: 40px;
}