:root {
  --bg-start: #f8f5ef;
  --bg-end: #fcfaf7;
  --card-bg: rgba(255, 255, 255, 0.92);

  --main-color: #d96c3f;
  --main-hover: #c85d31;
  --sub-color: #e9c46a;

  --text-color: #2f2a26;
  --muted-text: #7a726b;

  --line-color: #e7ded6;
  --soft-bg: #f6f1ea;

  --danger-bg: #fce8e3;
  --danger-text: #b6472b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  color: var(--text-color);
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
  padding: 60px 0;
}

.intro {
  text-align: center;
  margin-bottom: 36px;
}

.badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--main-color);
  color: white;
  font-weight: 700;
  margin: 0 0 16px;
  box-shadow: 0 8px 18px rgba(217, 108, 63, 0.25);
}

h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--text-color);
}

.description {
  margin-top: 18px;
  font-size: 18px;
  color: var(--muted-text);
}

.app {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}

.input-card,
.roulette-card {
  background: var(--card-bg);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(80, 60, 40, 0.08);
  border: 1px solid rgba(231, 222, 214, 0.7);
}

.input-card h2 {
  margin: 0 0 18px;
  font-size: 24px;
  color: var(--text-color);
}

.input-row {
  display: flex;
  gap: 10px;
}

#menuInput {
  flex: 1;
  height: 48px;
  border: 1px solid var(--line-color);
  border-radius: 14px;
  padding: 0 14px;
  font-size: 16px;
  outline: none;
  background: #fffdfb;
  color: var(--text-color);
}

#menuInput::placeholder {
  color: #a09790;
}

#menuInput:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 0 4px rgba(217, 108, 63, 0.12);
}

button {
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s;
  font-family: inherit;
}

button:hover {
  transform: translateY(-2px);
}

#addBtn {
  width: 80px;
  border-radius: 14px;
  background: var(--main-color);
  color: white;
  box-shadow: 0 8px 18px rgba(217, 108, 63, 0.22);
}

#addBtn:hover {
  background: var(--main-hover);
}

.quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.quick-buttons button {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f7ede2;
  color: var(--main-color);
}

.quick-buttons button:hover {
  background: #f0dfd0;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  max-height: 220px;
  overflow-y: auto;
}

.menu-list::-webkit-scrollbar {
  width: 8px;
}

.menu-list::-webkit-scrollbar-thumb {
  background: #d9cfc4;
  border-radius: 999px;
}

.menu-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--soft-bg);
}

.menu-list li span {
  font-weight: 700;
  color: var(--text-color);
}

.delete-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #efe7de;
  color: #6f655d;
}

.delete-btn:hover {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.action-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.sub-btn,
.main-btn {
  height: 50px;
  border-radius: 16px;
  font-size: 16px;
}

.sub-btn {
  flex: 1;
  background: #ece4db;
  color: #4f463f;
}

.sub-btn:hover {
  background: #e2d6ca;
}

.main-btn {
  flex: 2;
  background: var(--main-color);
  color: white;
  box-shadow: 0 10px 22px rgba(217, 108, 63, 0.25);
}

.main-btn:hover {
  background: var(--main-hover);
}

.main-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.roulette-card {
  position: relative;
  text-align: center;
}

.pointer {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 34px solid var(--text-color);
}

canvas {
  width: 100%;
  max-width: 420px;
  transition: transform 4s cubic-bezier(0.12, 0.8, 0.2, 1);
}

.result-text {
  min-height: 32px;
  margin: 18px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--main-color);
}

.share-btn {
  margin-top: 14px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--text-color);
  color: white;
  font-size: 15px;
  box-shadow: 0 10px 22px rgba(47, 42, 38, 0.18);
}

.share-btn:hover {
  background: #1f1b18;
}

.share-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 850px) {
  .container {
    padding: 36px 0;
  }

  h1 {
    font-size: 36px;
  }

  .description {
    font-size: 16px;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .input-card,
  .roulette-card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 32px;
  }

  .input-row {
    flex-direction: column;
  }

  #addBtn {
    width: 100%;
    height: 46px;
  }

  .action-row {
    flex-direction: column;
  }

  .sub-btn,
  .main-btn {
    width: 100%;
    flex: none;
  }

  .pointer {
    top: 20px;
    border-left-width: 14px;
    border-right-width: 14px;
    border-top-width: 28px;
  }
}