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

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  background: linear-gradient(135deg, #ffeef8 0%, #fff0f5 50%, #ffe4e1 100%);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.game-container {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.game-header {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  text-align: center;
  color: #d63384;
  font-size: 24px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.timer {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  font-size: 32px;
  font-weight: bold;
  color: #ff6b9d;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.score {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  font-size: 20px;
  color: #c2185b;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.timer.urgent {
  color: #e53935;
  animation: timerPulse 0.5s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.1); }
}

.miss-text {
  position: absolute;
  font-size: 18px;
  font-weight: bold;
  color: #e53935;
  z-index: 15;
  animation: missFade 1.2s ease-out forwards;
  pointer-events: none;
}

@keyframes missFade {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-30px); }
}

.rare-alert {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
  z-index: 80;
  animation: rareAlert 1s ease-out forwards;
  pointer-events: none;
}

@keyframes rareAlert {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

.game-area {
  width: 100%;
  height: 100%;
  position: relative;
}

.petal {
  position: absolute;
  font-size: 30px;
  pointer-events: none;
  z-index: 10;
  transition: transform 0.1s ease-out;
}

.petal.rare {
  font-size: 35px;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
}

.petal.caught {
  animation: catchEffect 0.5s ease-out forwards;
}

@keyframes catchEffect {
  0% {
      transform: scale(1);
      opacity: 1;
  }
  50% {
      transform: scale(1.5);
      opacity: 0.8;
  }
  100% {
      transform: scale(2);
      opacity: 0;
  }
}

.basket {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 60px;
  background: linear-gradient(180deg, #8b4513 0%, #654321 100%);
  border-radius: 0 0 15px 15px;
  border: 3px solid #5d2f0a;
  z-index: 50;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s ease-out;
}

.basket::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 8px;
  width: 74px;
  height: 12px;
  background: linear-gradient(180deg, #8b4513 0%, #654321 100%);
  border-radius: 8px 8px 0 0;
  border: 2px solid #5d2f0a;
}

.basket::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background: #5d2f0a;
}

.start-screen, .result-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 240, 245, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 200;
  text-align: center;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.start-screen h1 {
  font-size: 36px;
  color: #d63384;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.start-screen p {
  font-size: 18px;
  color: #c2185b;
  margin-bottom: 30px;
  line-height: 1.6;
}

.start-screen .rules {
  background: rgba(255, 255, 255, 0.8);
  padding: 40px;
  border-radius: 15px;
  margin-bottom: 30px;
  max-width: 500px;
}

.start-screen .rules h2 {
  font-size: 20px;
  color: #d63384;
  margin-bottom: 15px;
}

.start-screen .rules .rules-lead {
  font-size: 14px;
  color: #d63384;
  margin-bottom: 12px;
  font-weight: bold;
}

.start-screen .rules .rules-coupon {
  font-size: 13px;
  color: #c2185b;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(214, 51, 132, 0.4);
}

.start-screen .rules ul {
  list-style: none;
  text-align: center;
  color: #666;
}

.start-screen .rules li {
  margin-bottom: 10px;
  position: relative;
}

.btn {
  padding: 15px 40px;
  color: white;
  font-size: 20px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-weight: bold;
}
.coupon-copy-btn{
  box-shadow: 0 4px 15px rgba(214, 51, 132, 0.4);
  background: linear-gradient(135deg, #ff6b9d 0%, #d63384 100%);
  margin-bottom: 20px;
}
.btn-close{
  background: #ccc;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(214, 51, 132, 0.6);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}

.result-screen h2 {
  font-size: 32px;
  color: #d63384;
  margin-bottom: 20px;
}

.result-screen .result-message {
  font-size: 24px;
  color: #c2185b;
  margin-bottom: 30px;
  min-height: 60px;
}

.result-screen .prize {
  font-size: 28px;
  color: #ff6b9d;
  font-weight: bold;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
}

.result-screen .caught-count {
  font-size: 18px;
  color: #666;
  margin-bottom: 20px;
}

.hidden {
  display: none;
}

@keyframes sway {
  0%, 100% {
      transform: translateX(0) translateY(0);
  }
  25% {
      transform: translateX(-10px) translateY(0);
  }
  75% {
      transform: translateX(10px) translateY(0);
  }
}

@media (max-width: 768px) {
  .game-header {
      font-size: 20px;
      top: 10px;
  }

  .timer {
      font-size: 28px;
      top: 50px;
  }

  .score {
      font-size: 18px;
      top: 90px;
  }

  .basket {
      width: 75px;
      height: 52px;
  }

  .basket::before {
      width: 59px;
  }

  .start-screen h1 {
      font-size: 28px;
  }

  .start-screen p {
      font-size: 16px;
  }

  .result-screen h2 {
      font-size: 24px;
  }

  .result-screen .result-message {
      font-size: 20px;
  }

  .result-screen .prize {
      font-size: 24px;
  }
}

@media (max-height: 700px) {
  .start-screen, .result-screen {
      justify-content: flex-start;
      padding-top: 40px;
      padding-bottom: 40px;
  }
}