/* 基本設定 */
:root {
  --primary-color: #6a11cb;
  --secondary-color: #2575fc;
  --background-color: #f4f4f9;
  --text-color: #333;
  --card-bg-color: #ffffff;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --font-family-base: 'Noto Sans JP', sans-serif;
  --font-family-title: 'Poppins', sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* --- ローディングアニメーション --- */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease 0.2s, visibility 0.8s ease 0.2s;
  visibility: visible;
  opacity: 1;
}

.slime {
  animation: slide-in 2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.slime-body {
  width: 100px;
  height: 80px;
  background: linear-gradient(180deg, #84fab0 0%, #8fd3f4 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  position: relative;
  animation: jump 0.5s infinite alternate ease-in-out;
}

.slime-shadow {
  width: 80px;
  height: 10px;
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  margin: 10px auto 0;
  animation: shadow-squash 0.5s infinite alternate ease-in-out;
}

@keyframes slide-in {
  0% {
    transform: translateY(100vh) scale(0.5);
  }

  60% {
    transform: translateY(0) scale(1.2);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes jump {
  from {
    transform: translateY(0);
    height: 80px;
  }

  to {
    transform: translateY(-20px);
    height: 85px;
  }
}

@keyframes shadow-squash {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0.7);
  }
}

/* メインコンテンツの初期状態 */
.main-content {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

/* コンテナ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ヘッダー */
.header {
  background: var(--card-bg-color);
  box-shadow: 0 2px 4px var(--shadow-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  font-family: var(--font-family-title);
  font-size: 1.8rem;
  color: var(--primary-color);
  margin: 0;
}

.header-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
}

.header-nav li {
  margin-left: 20px;
}

.header-nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  transition: color 0.3s ease;
}

.header-nav a:hover {
  color: var(--primary-color);
}

/* ヒーローセクション */
.hero {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: white;
  text-align: center;
  padding: 6rem 1rem;
}

.profile-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.5rem;
  object-fit: cover;
  /* 画像が引き伸ばされないように調整 */
}

.hero-content h2 {
  font-family: var(--font-family-title);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.caution-text {
  color: #ffc107;
  /* 警告を示す黄色 */
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.btn {
  background: white;
  color: var(--primary-color);
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn:hover {
  background: #eee;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn .fa-brands {
  margin-right: 8px;
}

/* ゲーム紹介セクション */
.game-section {
  padding: 4rem 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.game-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-family: var(--font-family-title);
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.game-card {
  background: var(--card-bg-color);
  border-radius: 15px;
  box-shadow: 0 4px 15px var(--shadow-color);
  overflow: hidden;
  display: flex;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.game-card.large {
  grid-column: 1 / -1;
  /* 1カラム全体に広げる */
}

.card-img {
  width: 100%;
  height: auto;
  display: block;
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-family: var(--font-family-title);
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
}

.card-description {
  margin: 0;
  font-size: 0.95rem;
}

/* クイズ参加条件 */
.participation-condition {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background-color: #fffbe6;
  border-left: 5px solid #f59e0b;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #b45309;
}

.participation-condition i {
  margin-right: 8px;
}

/* カード内の詳細セクション */
.card-details {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.detail-section h5 {
  font-family: var(--font-family-title);
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 0.8rem;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.3rem;
}

.detail-section h5 i {
  margin-right: 8px;
}

.detail-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.9rem;
}

.detail-list li {
  position: relative;
  background-color: var(--card-bg-color);
  padding: 0.8rem 1rem;
  margin-bottom: 0.7rem;
  display: flex;
  align-items: flex-start;
  line-height: 1.5;
  border-radius: 8px;
  border: 1px solid #e9e9f3;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

/* 斜線背景 */
.detail-list li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(-45deg,
      rgba(106, 17, 203, 0.02),
      rgba(106, 17, 203, 0.02) 1px,
      transparent 1px,
      transparent 8px);
  z-index: 0;
}

.detail-list li i {
  margin-right: 10px;
  color: var(--secondary-color);
  margin-top: 4px;
  width: 18px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.detail-list li div {
  flex: 1;
  position: relative;
  z-index: 1;
}

.detail-list li strong {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-right: 0.5em;
  white-space: nowrap;
  display: inline-block;
  margin-bottom: 4px;
}

/* フッター */
.footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
  }

  .header-nav {
    margin-top: 1rem;
  }

  .hero-content h2 {
    font-size: 2.5rem;
  }

  .card-details {
    grid-template-columns: 1fr;
  }
}

/* --- 読み込み完了後のスタイル --- */
body.loaded .loading-screen {
  opacity: 0;
  visibility: hidden;
}

body.loaded .main-content {
  opacity: 1;
}
