* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic UI", "Meiryo UI", sans-serif; /* 丸ゴシック系 */
  background: linear-gradient(135deg, #ffeef2 0%, #e6f7ff 100%); /* 薄いピンクから薄い青へのグラデ */
  background-attachment: fixed;
  color: #555;
  padding: 20px;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 900px;
  background: rgba(255, 255, 255, 0.8);
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  text-align: center;
  color: #ff85a1;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.controls label {
  font-weight: bold;
  color: #777;
}

.controls select {
  padding: 8px 14px;
  font-size: 1rem;
  border-radius: 10px;
  border: 2px solid #ffccd5;
  background-color: white;
}

button {
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 25px; /* コロンとした丸みのあるボタン */
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* ほんのり立体感 */
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 1. 「あみだくじを作成」ボタン */
.primary-btn {
  background-color: #3598db;
  color: #ffffff;
}

.primary-btn:hover:not(:disabled) {
  background-color: #2980b9;
}

/* 2. 「結果をたどる」ボタン */
.secondary-btn {
  background-color: #2ecc71;
  color: #ffffff;
}

.secondary-btn:hover:not(:disabled) {
  background-color: #27ae60;
}

/* 3. 「結果を画像で保存」ボタン */
#download-btn {
  background-color: #ff9f43;
  color: #ffffff;
}

#download-btn:hover:not(:disabled) {
  background-color: #ee5253;
}

button:disabled {
  background-color: #e0e0e0 !important;
  color: #a0a0a0 !important;
  box-shadow: none !important;
  cursor: not-allowed;
  transform: none !important;
  opacity: 0.7;
}

.inputs-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .inputs-wrapper {
    grid-template-columns: 1fr;
  }
}

.input-section h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #666;
  border-left: 5px solid #ffccd5;
  padding-left: 10px;
}

.inputs-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  background-color: rgba(255, 255, 255, 0.5);
}

.input-item label {
  font-size: 0.9rem;
  width: 28px;
  font-weight: bold;
  color: #aaa;
  text-align: center;
}

.input-item input {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.95rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: white;
}

.canvas-container {
  display: flex;
  justify-content: center;
  overflow-x: auto;
  border-radius: 15px;
  padding: 10px;
  border: 4px solid #ffccd5;
  background-color: #ffffff;
}

canvas {
  background-image: url('./../illust/bomb.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 10px;
}

.canvas-container::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  pointer-events: none;
  z-index: 1;
}

canvas {
  position: relative;
  z-index: 2;
}