html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', 'Helvetica', sans-serif;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}

body { 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center; 
  background: url('./assets/images/top.back.image.png') no-repeat top center;
  background-size: cover; 
  background-attachment: fixed; 
  color: #3d2a1a;
  min-height: 100vh; 
  padding: 20px 0 60px 0; /* 下に余白 */
}

/* サムネイル */
.thumbnail {
  width: 700px;
  max-width: 85%;      
  height: auto;
  margin: 15px 0 20px 0;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  border: 3px solid #d2691e; 
  transition: transform 0.3s ease-in-out;
  animation: subtleMove 4s ease-in-out infinite;
}

/* 説明文 */
.top-description {
  font-size: 1.3rem;
  text-align: center;
  margin: 10px 20px 20px 20px;
  color: #ff8c00; 
  text-shadow: 1px 1px 2px #fff, 0 0 8px #ffd700; 
  font-weight: bold;
}


/* フリップカード */
.flip-card {
  background-color: transparent;
  width: 600px;
  max-width: 95%;
  perspective: 1000px;
  margin: 20px auto 20px auto; /* 下余白 */
  transition: margin-bottom 0.3s ease-in-out;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card-inner.flipped {
  transform: rotateY(180deg);
}

/* 裏面表示時に下余白を増やす */
.flip-card-inner.flipped {
  margin-bottom: 60px;
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-sizing: border-box;
}

/* 遊び方カード */
.flip-card-front {
  background: #fffaf0; 
  color: #8b4513; 
  border: 3px solid #ffa500; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.flip-card-front ul {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  list-style-position: inside;
  margin-top: 15px;
  font-size: 1rem;
  line-height: 1.6;
  color: #8b4513;
  text-align: left; /* 左寄せ */
}

/* フリップカード裏（あらすじ） */
.flip-card-back {
  background: #fff8dc; 
  color: #2f4f4f; 
  transform: rotateY(180deg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  border: 3px solid #ffa500; 
}

.flip-card-back p {
  margin: 12px 0;
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
  padding: 0 10px;
}


/* タイトル右寄せ調整 */
.flip-header {
  display: flex;
  justify-content: flex-start;  
  align-items: center;
  margin-bottom: 20px;
  transform: translateX(25px);
}

.flip-header h2 {
  margin: 0 auto;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  flex-grow: 0;
  padding-left: 0;
  transform: translateX(25px);
}

/* 「あらすじを読む」「遊び方を読む」ボタン */
.flip-toggle {
  font-size: 14px;
  font-weight: bold;
  background: #ffa500; 
  border: 2px solid #ff8c00; 
  color: #fffaf0; 
  cursor: pointer;
  padding: 5px 18px;
  border-radius: 8px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
  transition: all 0.2s ease-in-out;
  margin-left: 12px; /* さらに左に寄せる */
}

.flip-toggle:hover {
  background: #ff8c00;
}

/* 軽く動くアニメーション */
@keyframes subtleMove {
  0% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-3px) scale(1.01); }
  50% { transform: translateY(0) scale(1); }
  75% { transform: translateY(3px) scale(1.01); }
  100% { transform: translateY(0) scale(1); }
}

/* ======================= */
/* スタートボタン */
.start-button-container {
  margin: 20px 0;
}

.button {
  display: inline-block;
  padding: 18px 40px;
  font-size: 20px;
  font-weight: bold;
  color: #ffffff; 
  background: #ff4500; 
  border: 2px solid #ffa500; 
  border-radius: 15px;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
}

.button::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255,255,255,0.2);
  transform: rotate(45deg);
  transition: all 0.5s ease-in-out;
}

.button:hover::after {
  top: -30%;
  left: -30%;
}

.button:hover {
  background: #ff6347; 
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* フッター */
footer {
  font-size: 0.9rem;
  margin-top: 40px;
  padding: 20px;
  color: #444;
  font-weight: 500;
  font-style: italic;
  text-align: center;
  opacity: 0.85;
  letter-spacing: 0.5px;
}

footer a {
  color: #ff4500;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease-in-out;
}

footer a:hover {
  color: #ff6347;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .top-description { font-size: 1.1rem; }
  .flip-card { width: 90%; }
  .flip-card-front ul, .flip-card-back p { font-size: 0.95rem; }
  .button { font-size: 18px; padding: 14px 32px; }
  .flip-header h2 { font-size: 1.3rem; padding-left: 15px; }
  footer { font-size: 0.85rem; }
}

@media (max-width: 480px) {
  .top-description { font-size: 1rem; }
  .flip-card-front ul, .flip-card-back p { font-size: 0.9rem; }
  .button { font-size: 16px; padding: 12px 25px; }
  .flip-header h2 { font-size: 1.2rem; padding-left: 10px; }
  footer { font-size: 0.8rem; }
}
