/* 全体スタイルReset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  background-color: #82cddb; /* 指定の背景カラー */
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  justify-content: space-between;
  padding: 24px 16px;
}

/* ヘッダー */
.header {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 20px;
}

.main-title {
  font-size: 1.8rem;
  color: #ffffff;
  font-weight: bold;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.sub-title {
  font-size: 1rem;
  color: #f7f9fa;
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.95;
}

/* メインコンテンツ */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 600px;
}

.instruction {
  font-size: 1rem;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 16px;
  background-color: rgba(0, 0, 0, 0.15);
  padding: 6px 16px;
  border-radius: 20px;
  animation: pulse 2s infinite;
}

/* フリップカード構造（サイズ拡大） */
.card-container {
  width: 100%;
  max-width: 480px; /* 400pxから480pxにサイズアップ */
  aspect-ratio: 1706 / 2048; /* 元画像の縦横比を維持 */
  perspective: 1000px; /* 3D効果の奥行き */
  cursor: pointer;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.card-container:hover .card {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

/* カードがひっくり返ったときのクラス */
.card.is-flipped {
  transform: rotateY(180deg);
}

/* 面（表・裏共通） */
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden; /* 裏返ったときに非表示にする */
  border-radius: 20px;
  overflow: hidden;
  background-color: #ffffff;
}

.card-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 裏面（レモシシくん）をあらかじめ180度回転しておく */
.card-back {
  transform: rotateY(180deg);
}

/* Instagram リンクボタン */
.instagram-container {
  margin-top: 28px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.instagram-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.05rem;
  padding: 12px 28px;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.instagram-btn i {
  font-size: 1.4rem;
}

.instagram-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* フッター */
.footer {
  margin-top: 30px;
  font-size: 0.8rem;
  color: #ffffff;
  opacity: 0.8;
}

/* アニメーション */
@keyframes pulse {
  0%, 100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(-4px);
    opacity: 0.85;
  }
}

/* スマホ対応の微調整 */
@media (max-width: 480px) {
  .main-title {
    font-size: 1.5rem;
  }
  .sub-title {
    font-size: 0.9rem;
  }
  .card-container {
    max-width: 92vw; /* スマホ画面いっぱいに大きく表示 */
  }
}
