* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #111827;
  padding: 24px;
}

.app {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.top-bar {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  padding: 18px 24px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: conic-gradient(
    #ef4444,
    #f97316,
    #eab308,
    #22c55e,
    #14b8a6,
    #3b82f6,
    #8b5cf6,
    #ec4899,
    #ef4444
  );
}

h1 {
  font-size: 32px;
}

.top-clear-btn,
.secondary-btn,
.danger-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.top-clear-btn {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.main-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}

.wheel-panel,
.entries-panel,
.info-card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 14px 35px rgba(17, 24, 39, 0.08);
}

.wheel-panel {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.wheel-wrapper {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

#wheel {
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.18);
}

.pointer {
  position: absolute;
  top: -4px;
  z-index: 4;
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 40px solid #ef4444;
  filter: drop-shadow(0 4px 4px rgba(17, 24, 39, 0.25));
}

.spin-center-btn {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 8px solid #ffffff;
  background: linear-gradient(135deg, #8b5cf6, #ec4899, #f97316);
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.25);
}

.spin-center-btn:hover {
  transform: scale(1.04);
}

.spin-center-btn:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.winner-box {
  max-width: 520px;
  margin: 20px auto 0;
  padding: 18px;
  border-radius: 18px;
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  text-align: center;
}

.winner-box.celebrate {
  background: #ecfdf5;
  border-color: #86efac;
}

.winner-label {
  color: #6366f1;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

#winnerText {
  font-size: 34px;
  color: #047857;
}

.entries-panel {
  padding: 24px;
}

.entries-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.entries-header h2 {
  font-size: 24px;
}

.entry-count {
  background: #6366f1;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 900;
}

textarea {
  width: 100%;
  height: 360px;
  border: 2px solid #dbe3ef;
  border-radius: 16px;
  padding: 16px;
  font-size: 18px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.tip-text {
  margin: 14px 0 20px;
  color: #6b7280;
}

.side-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.secondary-btn {
  background: #eef2ff;
  color: #4338ca;
}

.danger-btn {
  background: #fee2e2;
  color: #b91c1c;
  grid-column: span 2;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.info-card {
  padding: 24px;
}

.info-card h2 {
  font-size: 22px;
  margin-bottom: 18px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.steps div {
  display: flex;
  gap: 12px;
  align-items: center;
}

.steps span {
  background: #eef2ff;
  color: #4338ca;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.steps p {
  color: #4b5563;
  line-height: 1.4;
}

.tag-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tag-grid span {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 12px;
  text-align: center;
  font-weight: 700;
  color: #374151;
}

.confetti {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 20;
}

.confetti span {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  border-radius: 3px;
  animation: fall 2.6s linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

@media (max-width: 850px) {
  body {
    padding: 16px;
  }

  .top-bar {
    flex-direction: column;
    gap: 16px;
  }

  .main-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }

  .spin-center-btn {
    width: 94px;
    height: 94px;
    font-size: 22px;
    border-width: 6px;
  }

  #winnerText {
    font-size: 28px;
  }

  textarea {
    height: 280px;
  }

  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .side-buttons {
    grid-template-columns: 1fr;
  }

  .danger-btn {
    grid-column: auto;
  }

  .tag-grid {
    grid-template-columns: 1fr;
  }
}