:root {
  --main-color: #ff7bac;
  --secondary-color: #a2d9ff;
  --accent1: #ffde59;
  --accent2: #a5deff;
  --accent3: #ffbde5;
  --dark: #444444;
  --light: #ffffff;
  
  /* メンバーカラー */
  --jyueru-color: #ff9bca;  /* ピンク */
  --hiyori-color: #ffa042;  /* オレンジ */
  --kana-color: #b088ff;    /* 薄紫 */
  --rinon-color: #ff5555;   /* 赤 */
  --rinka-color: #ffcce0;   /* 薄ピンク */
}

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

body {
  font-family: 'Quicksand', 'Hiragino Kaku Gothic ProN', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: #fffbfd;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ヘッダー */
.header {
  background-color: var(--light);
  box-shadow: 0 4px 20px rgba(255, 123, 172, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--main-color);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo span {
  background: linear-gradient(45deg, var(--main-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 28px;
}

/* メインビジュアル */
.main-visual {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.main-visual::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/merisetop.jpg');
  background-size: cover;
  background-position: center top;
  filter: brightness(0.7);
  z-index: -1;
}

.main-title {
  font-size: 96px;
  font-weight: 700;
  color: var(--light);
  text-shadow: 3px 3px 0 var(--main-color);
  margin-bottom: 20px;
  letter-spacing: 4px;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 1s forwards 0.5s;
}

.main-subtitle {
  font-size: 24px;
  color: var(--light);
  margin-bottom: 40px;
  letter-spacing: 2px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s forwards 1s;
}

.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--light);
  font-size: 14px;
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-down::after {
  content: '';
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--light);
  border-bottom: 2px solid var(--light);
  transform: rotate(45deg);
  margin-top: 10px;
  animation: bounce 2s infinite;
}

/* メンバーセクション */
.members {
  padding: 100px 0;
  background-color: #fff;
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 60px;
  color: var(--main-color);
  width: 100%; /* 幅を100%に設定 */
  display: block; /* inlineからblockに変更 */
  position: relative; /* position: relativeを追加 */
}

.section-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 4px;
  background: linear-gradient(to right, var(--main-color), var(--secondary-color));
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

/* 新しいメンバーカード（3D回転） */
.member-card {
  position: relative;
  height: 450px;
  perspective: 1500px;
  border-radius: 20px;
  cursor: pointer;
}

.member-card-inner {
  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 10px 30px rgba(0, 0, 0, 0.1);
}

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

.member-card-front,
.member-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
}

.member-card-front {
  background-color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.member-card-back {
  background-color: #fff;
  transform: rotateY(180deg);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.member-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
  transition: transform 0.5s ease;
}

/* member-info-brief 内のスタイル調整 */
.member-info-brief {
  padding: 15px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.9); /* 背景色を少し透明に */
  position: relative;
  z-index: 5; /* 重なり順序を上げて確実に表示されるように */
}

.member-name {
  font-size: 26px; /* フォントサイズを少し大きく */
  font-weight: 700;
  margin-bottom: 0; /* 下のスペースを削除 */
  color: var(--main-color);
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8); /* テキストに少し影をつけて読みやすく */
}

/* member-position クラスを非表示にする */
.member-position {
  display: none;
}

/* メンバー個別の名前の色設定 */
.member-card[data-member="jyueru"] .member-name {
  color: var(--jyueru-color);
}

.member-card[data-member="hiyori"] .member-name {
  color: var(--hiyori-color);
}

.member-card[data-member="kana"] .member-name {
  color: var(--kana-color);
}

.member-card[data-member="rinon"] .member-name {
  color: var(--rinon-color);
}

.member-card[data-member="rinka"] .member-name {
  color: var(--rinka-color);
}

.member-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2;
}

.member-decoration::before,
.member-decoration::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  opacity: 0;
  transition: all 0.5s ease;
}

.member-decoration::before {
  top: 15px;
  left: 15px;
  border-top: 4px solid var(--accent1);
  border-left: 4px solid var(--accent1);
}

.member-decoration::after {
  bottom: 15px;
  right: 15px;
  border-bottom: 4px solid var(--accent3);
  border-right: 4px solid var(--accent3);
}

.member-card:hover .member-decoration::before,
.member-card:hover .member-decoration::after {
  opacity: 1;
}

.member-card:hover .member-img {
  transform: scale(1.05);
}

.view-profile-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--main-color);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 30px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
}

.member-card:hover .view-profile-btn {
  opacity: 1;
  bottom: 30px;
}

/* メンバーカードの裏面（プロフィール） */
.member-profile-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 15px;
  scrollbar-width: thin;
  scrollbar-color: var(--main-color) rgba(255, 255, 255, 0.5);
}

/* スクロールバーのスタイル（Chrome, Edge, Safari） */
.member-profile-container::-webkit-scrollbar {
  width: 8px;
}

.member-profile-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
}

.member-profile-container::-webkit-scrollbar-thumb {
  background-color: var(--main-color);
  border-radius: 10px;
}

.member-profile-name {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
}

.member-profile-name::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--main-color);
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
}

.member-profile-content {
  font-size: 15px;
  line-height: 1.7;
}

/* メンバー個別カラーの設定 */
.member-card[data-member="jyueru"] .member-profile-name {
  color: var(--jyueru-color);
}

.member-card[data-member="jyueru"] .member-profile-name::after {
  background-color: var(--jyueru-color);
}

.member-card[data-member="hiyori"] .member-profile-name {
  color: var(--hiyori-color);
}

.member-card[data-member="hiyori"] .member-profile-name::after {
  background-color: var(--hiyori-color);
}

.member-card[data-member="kana"] .member-profile-name {
  color: var(--kana-color);
}

.member-card[data-member="kana"] .member-profile-name::after {
  background-color: var(--kana-color);
}

.member-card[data-member="rinon"] .member-profile-name {
  color: var(--rinon-color);
}

.member-card[data-member="rinon"] .member-profile-name::after {
  background-color: var(--rinon-color);
}

.member-card[data-member="rinka"] .member-profile-name {
  color: var(--rinka-color);
}

.member-card[data-member="rinka"] .member-profile-name::after {
  background-color: var(--rinka-color);
}

.close-profile-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background-color: var(--main-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 3px 8px rgba(255, 123, 172, 0.3);
}

.close-profile-btn:hover {
  transform: rotate(90deg);
  background-color: var(--accent3);
}

/* プロフィールコンテンツのスタイル */
.profile-section {
  margin-bottom: 20px;
  animation: fadeInUp 0.5s forwards;
  opacity: 0;
  transform: translateY(20px);
}

.profile-section h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--main-color);
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 18px;
}

.profile-section h4::before {
  content: '♪';
  position: absolute;
  left: 0;
  font-size: 14px;
}

.profile-item {
  margin-bottom: 10px;
  line-height: 1.6;
  padding-left: 5px;
}

.profile-item strong {
  font-weight: 700;
  color: var(--secondary-color);
  margin-right: 5px;
}

/* メッセージセクション */
.profile-message {
  margin-top: 25px;
  padding: 15px;
  background-color: rgba(255, 123, 172, 0.1);
  border-radius: 10px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
  animation: fadeInUp 0.5s forwards 0.5s;
  opacity: 0;
}

.profile-message::before {
  content: '❤︎';
  position: absolute;
  top: -12px;
  left: 15px;
  font-size: 20px;
  color: var(--main-color);
  background-color: #fff;
  padding: 0 8px;
  border-radius: 50%;
}

/* 好きな色の表示 */
.favorite-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0;
}

.color-sample {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  margin-right: 10px;
}

.color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-right: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.1);
}

.color-name {
  font-size: 14px;
}

/* SNSセクション */
.sns {
  padding: 80px 0;
  background-color: #f9f5ff;
  position: relative;
}

.sns::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 100px;
  background-color: #f9f5ff;
  clip-path: polygon(0 50%, 100% 0, 100% 100%, 0% 100%);
}

.x-buttons-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  background-color: var(--light);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.x-button {
  display: inline-flex;
  align-items: center;
  padding: 15px 30px;
  background: linear-gradient(45deg, #000, #333);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.x-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.x-icon {
  font-size: 20px;
  margin-right: 10px;
}

/* 募集セクション */
.recruitment {
  padding: 100px 0;
  position: relative;
  background-color: #fff;
}

.recruitment::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 100px;
  background-color: #fff;
  clip-path: polygon(0 0, 100% 50%, 100% 100%, 0% 100%);
}

.recruitment-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  background: linear-gradient(135deg, #fff6fb 0%, #f0f9ff 100%);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(255, 123, 172, 0.1);
  position: relative;
  overflow: hidden;
}

.recruitment-content::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background-color: rgba(255, 189, 229, 0.1);
  border-radius: 50%;
  top: -100px;
  right: -100px;
}

.recruitment-content::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  background-color: rgba(162, 217, 255, 0.1);
  border-radius: 50%;
  bottom: -70px;
  left: -70px;
}

.recruitment-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--main-color);
  position: relative;
  display: inline-block;
}

.recruitment-title::after {
  content: '✨';
  position: absolute;
  right: -30px;
  top: 0;
}

.recruitment-text {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 30px;
}

.recruitment-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
    justify-content: center; /* この行を追加して中央揃えにします */

}

.highlight {
  padding: 10px 20px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  color: var(--main-color);
  box-shadow: 0 5px 15px rgba(255, 123, 172, 0.1);
  display: flex;
  align-items: center;
}

.highlight::before {
  content: '✓';
  margin-right: 8px;
  color: var(--accent1);
  font-weight: bold;
}

/* お問い合わせセクション */
.contact {
  padding: 80px 0 100px;
  background-color: #f9f5ff;
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 100px;
  background-color: #f9f5ff;
  clip-path: polygon(0 50%, 100% 0, 100% 100%, 0% 100%);
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-text {
  font-size: 18px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.contact-button {
  padding: 15px 40px;
  background: linear-gradient(45deg, var(--main-color), var(--accent3));
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(255, 123, 172, 0.2);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.contact-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(255, 123, 172, 0.3);
}

.contact-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: left 1s ease;
}

.contact-button:hover::before {
  left: 100%;
}

.contact-button-icon {
  margin-right: 10px;
  font-size: 18px;
}

/* フッター */
.footer {
  padding: 40px 0;
  background-color: var(--main-color);
  color: white;
  text-align: center;
}

.footer-logo {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.footer-link {
  color: white;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--accent1);
}

.copyright {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

/* アニメーション */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes slow-zoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

@keyframes shine {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* 装飾パーツ */
.decoration-star {
  display: none;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
}

/* メインビジュアルの中の装飾を非表示 */
.main-visual .decoration-circle {
  display: none;
}

/* ページトップへ戻るボタン */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--main-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(255, 123, 172, 0.3);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 999;
  font-size: 20px;
  transform: translateY(100px);
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--accent3);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .main-title {
    font-size: 64px;
  }
  
  .main-subtitle {
    font-size: 18px;
  }
  
  .section-title {
    font-size: 32px;
  }
  
  .member-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .recruitment-content {
    padding: 30px;
  }
  
  .recruitment-title {
    font-size: 28px;
  }
  
  .main-visual::before {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }
}

@media (max-width: 576px) {
  .main-title {
    font-size: 48px;
  }
  
  .main-subtitle {
    font-size: 16px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .timeline {
    padding: 20px;
  }
  
  .recruitment-content {
    padding: 25px;
  }
  
  .contact-button {
    padding: 12px 30px;
    font-size: 14px;
  }
  
  .member-card {
    height: 400px;
  }
  
  .x-buttons-container {
    padding: 20px;
    flex-direction: column;
  }
  
  .x-button {
    width: 100%;
    justify-content: center;
  }
  
  .main-visual {
    height: 60vh; /* モバイルでは高さを小さく */
  }
  
  .main-visual::before {
    background-size: contain;
    background-repeat: no-repeat;
  }
}

/* メインビジュアルとセクション間の余白を詰める */
.main-visual {
  margin-bottom: -35px; /* 負のマージンでセクション間の余白を詰める */
}

/* ヘッダーの高さと余白を調整 */
.header {
  height: auto; /* 高さを内容に合わせる */
}

.header-inner {
  padding: 8px 0; /* パディングを小さくする（上下のみ） */
}

/* セクションのパディングを調整 */
.members {
  padding-top: 60px; /* 上部のパディングを小さくする */
  padding-bottom: 60px;
}

/* スマホ表示でさらに余白を詰める */
@media (max-width: 768px) {
  .main-visual {
    height: auto; /* 高さを内容に合わせる */
    min-height: 60vh; /* 最小高さを設定 */
    margin-bottom: -50px; /* さらに余白を詰める */
  }
  
  .members {
    padding-top: 50px; /* 上部のパディングをさらに小さくする */
  }
  
  /* ヘッダーの余白をさらに詰める */
  .header-inner {
    padding: 5px 0;
  }
  
  .section-title {
    margin-bottom: 40px; /* セクションタイトルの下マージンを小さくする */
  }
}

/* モバイル表示でさらに余白を調整 */
@media (max-width: 576px) {
  .main-visual {
    margin-bottom: -60px; /* モバイルでさらに余白を詰める */
  }
  
  .members {
    padding-top: 40px; /* 上部のパディングをさらに小さくする */
  }
}

/* スクロールアニメーション用の追加スタイル */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: none; /* 初期状態ではトランジションを無効に */
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease; /* アニメーション時にトランジションを有効化 */
}

/* 名前部分を非表示にして、画像を枠いっぱいに表示 */
.member-info-brief {
  display: none; /* 名前部分を完全に非表示 */
}

/* 画像を枠いっぱいに表示 */
.member-img {
  width: 100%;
  height: 100%; /* 枠いっぱいに表示 */
  object-fit: cover;
  border-radius: 20px; /* 枠と同じ角丸にする */
}

/* カードのフロント部分の調整 */
.member-card-front {
  background-color: transparent; /* 背景を透明に */
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
}