@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer utillities {
  body {
    font-family: 'Nunito', "源暎ゴシック", "GenEiGothic", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    @apply text-gray-800 touch-manipulation;
  }

  .static-page {
    @apply px-4;
  }

  .static-page .title {
    @apply !text-2xl text-center;
  }

  .pricing .selected-frequency {
    @apply bg-green-500 text-white;
  }

  .pricing .unselected-frequency {
    @apply bg-white text-gray-500;
  }

  .onboarding .active-step {
    @apply bg-gradient-to-br from-green-500 to-green-300 text-white;
  }

  .onboarding .inactive-step {
    @apply bg-gray-300 text-gray-800;
  }

  .required-label::after {
    content: ' *';
    @apply text-red-500;
  }

  .help-text {
    @apply text-xs text-gray-400;
  }

  .btn {
    @apply bg-green-500 hover:bg-green-300 text-white rounded-xl cursor-pointer flex items-center justify-center;
  }

  .btn-light {
    @apply bg-gray-100 hover:bg-gray-200 text-gray-800 border rounded-xl cursor-pointer flex items-center justify-center;
  }

  .btn-disabled {
    @apply bg-gray-200 text-gray-500 border rounded-xl flex items-center justify-center cursor-not-allowed;
  }

  *:disabled {
    @apply !bg-gray-200 !text-gray-500 !cursor-not-allowed;
  }

  .hide-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .hide-scrollbar::-webkit-scrollbar {
    display: none;
  }

  @keyframes float {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-20px);
    }
  }

  .float-animation {
    animation: float 6s infinite ease-in-out;
  }

  .float-delay-1 {
    animation-delay: 0.5s;
  }

  .float-delay-2 {
    animation-delay: 1s;
  }

  .float-delay-3 {
    animation-delay: 1.5s;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .fade-in-up {
    animation: fadeInUp 1s ease-out;
  }

  .fade-delay-1 {
    animation-delay: 0.2s;
    animation-fill-mode: both;
  }

  .fade-delay-2 {
    animation-delay: 0.4s;
    animation-fill-mode: both;
  }

  .fade-delay-3 {
    animation-delay: 0.6s;
    animation-fill-mode: both;
  }

  .fade-delay-4 {
    animation-delay: 0.8s;
    animation-fill-mode: both;
  }

  .fade-delay-5 {
    animation-delay: 1.0s;
    animation-fill-mode: both;
  }

  @keyframes confettiFall {
    0% {
      transform: translateY(-100px) rotate(0deg);
      opacity: 1;
    }
    100% {
      transform: translateY(50vh) rotate(360deg);
      opacity: 0;
    }
  }

  .confetti-1 {
    animation: confettiFall 4s infinite linear;
  }

  .confetti-2 {
    animation: confettiFall 5.5s infinite linear;
  }

  .confetti-3 {
    animation: confettiFall 5s infinite linear;
  }

  .confetti-4 {
    animation: confettiFall 7s infinite linear;
  }

  .confetti-5 {
    animation: confettiFall 6s infinite linear;
  }

  .confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    opacity: 0.8;
    animation: confetti 5s ease-in-out infinite;
  }

  @keyframes float-up {
    0% {
      transform: translateY(0) scale(1);
      opacity: 0;
    }
    30% {
      opacity: 1;
    }
    100% {
      transform: translateY(-100px) scale(1.2);
      opacity: 0;
    }
  }

  .floating-1 {
    animation: float-up 5s ease-in-out infinite;
    animation-delay: 0s;
  }

  .floating-2 {
    animation: float-up 5s ease-in-out infinite;
    animation-delay: 0.5s;
  }

  .floating-3 {
    animation: float-up 5s ease-in-out infinite;
    animation-delay: 1s;
  }

  .floating-4 {
    animation: float-up 5s ease-in-out infinite;
    animation-delay: 1.5s;
  }

  .floating-5 {
    animation: float-up 5s ease-in-out infinite;
    animation-delay: 2s;
  }

  .modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
  }

  .bounce {
    animation: bounce 0.5s ease infinite alternate;
  }

  .spin-slow {
    animation: spin 8s linear infinite;
  }

  .tada-animation {
    animation: tada 1s ease;
  }

  .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
  }

  @keyframes confetti {
    0% { transform: translateY(-50px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100px) rotate(720deg); opacity: 0; }
  }

  @keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
  }

  @keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }

  @keyframes tada {
    0% { transform: scale(1); }
    10%, 20% { transform: scale(0.9) rotate(-3deg); }
    30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg); }
    40%, 60%, 80% { transform: scale(1.1) rotate(-3deg); }
    100% { transform: scale(1) rotate(0); }
  }

  @keyframes confetti-fall {
    0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(600px) rotate(360deg); opacity: 0; }
  }
}