* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, #fff4c7 0, transparent 34%),
    radial-gradient(circle at bottom right, #c7f0ff 0, transparent 35%),
    linear-gradient(135deg, #f7f7fb, #eef3ff);
  color: #222;
}

.app {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #6b6f80;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.1;
}

.lead {
  margin: 14px auto 0;
  max-width: 640px;
  color: #596070;
  line-height: 1.8;
}

.card,
.roulette-card {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  box-shadow: 0 18px 45px rgba(50, 67, 100, 0.14);
  padding: 24px;
  margin-bottom: 22px;
}

label {
  display: inline-block;
  margin-bottom: 10px;
  font-weight: 800;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 180px;
  padding: 16px;
  border: 2px solid #dde5f5;
  border-radius: 18px;
  font-size: 1rem;
  line-height: 1.7;
  outline: none;
  background: #fff;
}

textarea:focus {
  border-color: #7c8cff;
  box-shadow: 0 0 0 4px rgba(124, 140, 255, 0.16);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(1px) scale(0.99);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, #6d5dfc, #f45bb3);
  box-shadow: 0 10px 24px rgba(109, 93, 252, 0.26);
  margin-left: auto;
}

.secondary {
  color: #394052;
  background: #edf1fa;
}

.hint {
  margin: 14px 0 0;
  color: #6a7283;
}

.roulette-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 24px;
}

.roulette-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 330px;
}

.pointer {
  position: absolute;
  top: 8px;
  z-index: 2;
  font-size: 38px;
  color: #30364a;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.12));
}

.roulette {
  width: min(300px, 76vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(
      from 0deg,
      #ff7ab6 0 45deg,
      #ffd166 45deg 90deg,
      #70e1f5 90deg 135deg,
      #7cffc4 135deg 180deg,
      #b388ff 180deg 225deg,
      #ff9f7a 225deg 270deg,
      #9be15d 270deg 315deg,
      #5d9bff 315deg 360deg
    );
  box-shadow:
    inset 0 0 0 12px rgba(255,255,255,0.7),
    inset 0 0 0 18px rgba(0,0,0,0.05),
    0 22px 46px rgba(48, 54, 74, 0.22);
  transition: transform 3s cubic-bezier(0.12, 0.7, 0.08, 1);
}

.roulette::before {
  content: "";
  position: absolute;
  width: 46px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.roulette-text {
  z-index: 1;
  width: 58%;
  min-height: 58%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  font-weight: 900;
  color: #30364a;
  word-break: break-word;
}

.result-box {
  padding: 24px;
  border-radius: 22px;
  background: #f7f8fc;
  border: 1px solid #e7ebf4;
}

.result-label {
  margin: 0 0 10px;
  color: #687083;
  font-weight: 800;
}

.result {
  min-height: 92px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  border-radius: 20px;
  background: #fff;
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 900;
  color: #2b3043;
  word-break: break-word;
}

.shake {
  animation: shake 0.25s ease-in-out 2;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@media (max-width: 760px) {
  .app {
    width: min(100% - 20px, 960px);
    padding: 24px 0;
  }

  .card,
  .roulette-card {
    border-radius: 22px;
    padding: 18px;
  }

  .roulette-card {
    grid-template-columns: 1fr;
  }

  .primary {
    margin-left: 0;
    width: 100%;
  }

  .secondary {
    flex: 1;
  }
}
