/* リセットと基本設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
  background-color: #ffffff;
  color: #000000;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* セクション共通 */
.section {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* ===== 1. カウントダウンセクション ===== */
.countdown-section {
  background-color: #000000;
  color: #ffffff;
}

.countdown-display {
  text-align: center;
}

#countdown-timer {
  font-size: clamp(48px, 15vw, 80px);
  font-weight: 900;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

/* ===== 2. メインメッセージセクション ===== */
.message-section {
  background-color: #ffffff;
  position: relative;
  overflow: hidden;
}

.birthday-title {
  font-size: clamp(32px, 10vw, 56px);
  font-weight: 900;
  text-align: center;
  margin-bottom: 40px;
  animation: slideInUp 1s ease-out forwards;
  opacity: 0;
}

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

.birthday-photo {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.birthday-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== 3. フォトギャラリーセクション ===== */
.gallery-section {
  background-color: #f8f8f8;
  padding: 0;
  overflow: hidden;
}

.gallery-scroll {
  width: 100%;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  gap: 20px;
  animation: scrollGallery 20s linear infinite;
}

@keyframes scrollGallery {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.gallery-item {
  min-width: 280px;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== 4. プレゼントセクション ===== */
.present-section {
  background-color: #ffffff;
}

.present-title {
  font-size: clamp(28px, 8vw, 48px);
  font-weight: 900;
  margin-bottom: 40px;
}

.present-box {
  margin-bottom: 40px;
}

.box-visual {
  width: 180px;
  height: 180px;
  animation: bounce 2s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

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

.random-button {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 24px;
  font-weight: 700;
  padding: 16px 48px;
  background-color: #000000;
  color: #ffffff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.random-button:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.random-button:active {
  transform: scale(0.98);
}

/* ===== モーダル ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 40px 30px;
  max-width: 90%;
  width: 350px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-present-text {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 30px;
  line-height: 1.5;
  color: #000000;
}

.close-button {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 18px;
  font-weight: 700;
  padding: 12px 36px;
  background-color: #000000;
  color: #ffffff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s;
}

.close-button:hover {
  transform: scale(1.05);
}

.close-button:active {
  transform: scale(0.98);
}

/* レスポンシブ調整 */
@media (max-width: 414px) {
  .section {
    padding: 15px;
  }

  .gallery-item {
    min-width: 240px;
    height: 240px;
  }
}
