/* ゲームスライドショー */
.game-slideshow {
  position: relative;
  max-width: 1000px;
  margin: 2rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(255, 70, 85, 0.3);
  border: 2px solid #ff4655;
}

.slideshow-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio (1920x1080) */
  background: linear-gradient(135deg, #0f1923, #1a2530);
  overflow: hidden;
  border-radius: 12px;
}

.game-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: opacity;
  overflow: hidden;
  border-radius: 12px;
}

.game-slide.active {
  opacity: 1;
}

/* テキストオーバーレイを左下に配置 */
.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 400px;
  height: auto;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9));
  color: white;
  padding: 2rem;
  text-align: left;
  z-index: 10;
  border-radius: 0 12px 0 0;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.slideshow-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio (1920x1080) */
  background: linear-gradient(135deg, #0f1923, #1a2530);
  overflow: hidden;
  border-radius: 12px;
}

.game-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: opacity;
  overflow: hidden;
  border-radius: 12px;
}

.game-slide.active {
  opacity: 1;
}

/* 各ゲームスライドの背景スタイル */
.game-slide[data-game="valorant"] {
  background: linear-gradient(135deg, #0f1923, #1a2530);
}

.game-slide[data-game="apex"] {
  background: linear-gradient(135deg, #0f1923, #1a2530);
}



.game-slide[data-game="fortnite"] {
  background: linear-gradient(135deg, #0f1923, #1a2530);
}

/* 画像を背景全体に表示するスタイル */
.game-slide img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: contain; /* デスクトップではcontain */
  object-position: center;
  z-index: 1;
  border-radius: 12px;
  max-width: 100%;
  max-height: 100%;
}

/* モバイル専用の画像表示設定 */
@media (max-width: 768px) {
  .game-slide img {
    object-fit: cover !important; /* モバイルではcoverで全体をカバー */
    border-radius: 8px !important;
  }
}

@media (max-width: 480px) {
  .game-slide img {
    object-fit: cover !important;
    border-radius: 6px !important;
  }
}

/* 画像のエラーハンドリング */
.game-slide img {
  display: block;
}

/* すべての画像を表示 */
.game-slide img {
  display: block;
}

/* 画像がない場合のゲームスライド表示 */
.game-slide[data-game="apex"],
.game-slide[data-game="fortnite"] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 各ゲームの背景パターン */
.game-slide[data-game="apex"]::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
}



.game-slide[data-game="fortnite"]::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
}

/* スライドオーバーレイのz-indexを調整 */
.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 400px;
  height: auto;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  padding: 2rem;
  text-align: left;
  z-index: 10;
  border-radius: 0 12px 0 0;
  backdrop-filter: blur(5px);
}

.slide-overlay h3 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  color: #ffffff;
}

.slide-overlay p {
  font-size: 1.2rem;
  color: #f0f0f0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  margin-top: 0.5rem;
}

/* 各ゲームタイトルの色設定 */
.game-slide[data-game="valorant"] .slide-overlay h3 {
  color: #ff4655;
}

.game-slide[data-game="apex"] .slide-overlay h3 {
  color: #ff6400;
}



.game-slide[data-game="fortnite"] .slide-overlay h3 {
  color: #00d4ff;
}

/* スライド切り替えボタン - 円形デザイン */
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 70, 85, 0.9);
  border: none;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(255, 70, 85, 0.4);
}

.slide-btn:hover {
  background: rgba(255, 70, 85, 1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 70, 85, 0.6);
}

.prev-btn {
  left: 30px;
}

.next-btn {
  right: 30px;
}

/* スライドインジケーター - 画像のデザインに合わせて */
.slide-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.indicator.active {
  background: #ff4655;
  transform: scale(1.2);
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 70, 85, 0.6);
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.1);
}

/* ゲームリンクセクション - 改善版 */
.game-links {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.game-links h2 {
  text-align: center;
  color: #ff4655;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}

.game-links h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(45deg, #ff4655, #00d4ff);
  border-radius: 2px;
}

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

.game-link-card {
  background: linear-gradient(135deg, #1a1f25, #0f1923);
  border: 2px solid #333;
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  min-height: 450px;
}

.game-link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 70, 85, 0.1), transparent);
  transition: left 0.6s ease;
}

.game-link-card:hover::before {
  left: 100%;
}

.game-link-card:hover {
  transform: translateY(-15px);
  border-color: #ff4655;
  box-shadow: 0 20px 40px rgba(255, 70, 85, 0.3);
}

.game-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.game-link-card h3 {
  color: #ff4655;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 各ゲームカードのタイトル色 */
.game-link-card[data-url*="apex-legends"] h3 {
  color: #ff6600;
}

.game-link-card[data-url*="fortnite"] h3 {
  color: #00d4ff;
}

.rank {
  color: #00d4ff;
  font-weight: bold;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  background: rgba(0, 212, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  display: inline-block;
}

.game-link-card p:not(.rank) {
  margin-bottom: 2rem;
  line-height: 1.7;
  color: #e0e0e0;
  font-size: 1rem;
}

.game-stats {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.stat {
  background: linear-gradient(45deg, rgba(255, 70, 85, 0.2), rgba(255, 70, 85, 0.1));
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #ff4655;
  border: 1px solid rgba(255, 70, 85, 0.3);
  transition: all 0.3s ease;
}

.stat:hover {
  background: rgba(255, 70, 85, 0.3);
  transform: translateX(5px);
}

/* Apexカードの統計情報のスタイル */
.game-link-card[data-url*="apex-legends"] .stat {
  background: linear-gradient(45deg, rgba(255, 102, 0, 0.2), rgba(255, 102, 0, 0.1));
  color: #ff6600;
  border: 1px solid rgba(255, 102, 0, 0.3);
}

.game-link-card[data-url*="apex-legends"] .stat:hover {
  background: rgba(255, 102, 0, 0.3);
  transform: translateX(5px);
}

/* Fortniteカードの統計情報のスタイル */
.game-link-card[data-url*="fortnite"] .stat {
  background: linear-gradient(45deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.1));
  color: #00d4ff;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.game-link-card[data-url*="fortnite"] .stat:hover {
  background: rgba(0, 212, 255, 0.3);
  transform: translateX(5px);
}

/* 各ゲームの特別なスタイル */
.valorant-card {
  border-color: #333;
  background: linear-gradient(135deg, #1a1f25, #0f1923);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.valorant-card:hover {
  transform: translateY(-15px);
  border-color: #ff4655;
  box-shadow: 0 20px 40px rgba(255, 70, 85, 0.3);
}

.valorant-icon {
  background: transparent;
  border: 3px solid rgba(255, 70, 85, 0.3);
}

.apex-icon {
  background: linear-gradient(45deg, #ff6600, #ff8c42, #ffa726);
  border: 3px solid rgba(255, 102, 0, 0.3);
}



.fortnite-icon {
  background: linear-gradient(45deg, #0078f2, #42a5f5, #64b5f6);
  border: 3px solid rgba(0, 120, 242, 0.3);
}

.game-logo {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

/* ゲームアイコン画像のスタイル */
.game-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.game-link-card:hover .game-logo {
  transform: scale(1.1);
}

/* クリックヒント - 改善版 */
.click-hint {
  position: relative;
  bottom: 0;
  left: 0;
  transform: none;
  color: #00d4ff;
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s ease;
  background: linear-gradient(45deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.1));
  padding: 0.8rem 1.2rem;
  border-radius: 20px;
  border: 1px solid #00d4ff;
  backdrop-filter: blur(10px);
  font-weight: 600;
  margin-top: auto;
  align-self: center;
}

.game-link-card:hover .click-hint {
  opacity: 1;
  transform: translateY(-5px);
}

/* ホバーエフェクト強化 */
.game-link-card:hover .game-icon {
  transform: scale(1.05) rotate(3deg);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.game-link-card:hover h3 {
  color: #00d4ff;
  transform: translateY(-3px);
}

/* アニメーション追加 */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.game-link-card:hover {
  animation: float 3s ease-in-out infinite;
}

/* 3D効果の改善 */
.game-link-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.game-link-card:hover {
  transform: translateY(-15px) rotateX(5deg) rotateY(5deg);
}

/* レスポンシブ対応 */
@media (max-width: 1200px) {
  .game-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .game-slideshow {
    margin: 1rem auto;
    border-radius: 8px;
  }
  
  .slideshow-container {
    padding-bottom: 70%; /* モバイルでは縦長に調整 */
    border-radius: 8px;
  }
  
  .game-slide {
    border-radius: 8px;
  }
  
  .game-slide img {
    object-fit: cover; /* モバイルでは画面全体をカバー */
    border-radius: 8px;
  }
  
  .slide-overlay {
    width: 100%;
    right: 0;
    left: 0;
    bottom: 0;
    text-align: center;
    border-radius: 0 0 8px 8px;
    padding: 1.5rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7), transparent);
  }
  
  .slide-overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }
  
  .slide-overlay p {
    font-size: 1rem;
    margin: 0;
  }
  
  .slide-btn {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .prev-btn {
    left: 10px;
  }
  
  .next-btn {
    right: 10px;
  }
  
  .slide-indicators {
    bottom: 20px;
  }
  
  .game-links {
    margin: 2rem auto;
    padding: 0 1rem;
  }
  
  .game-links h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  .game-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .game-link-card {
    padding: 2rem;
    min-height: 400px;
  }
  
  .game-icon {
    width: 80px;
    height: 80px;
  }
  
  .game-link-card h3 {
    font-size: 1.5rem;
  }
  
  .stat {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .game-slideshow {
    margin: 0.5rem auto;
    border-radius: 6px;
  }
  
  .slideshow-container {
    padding-bottom: 75%; /* 小さい画面ではより縦長に */
    border-radius: 6px;
  }
  
  .game-slide {
    border-radius: 6px;
  }
  
  .slide-overlay {
    padding: 1rem 0.8rem;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.7), transparent);
  }
  
  .slide-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
  }
  
  .slide-overlay p {
    font-size: 0.9rem;
    margin: 0;
  }
  
  .slide-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .prev-btn {
    left: 8px;
  }
  
  .next-btn {
    right: 8px;
  }
  
  .slide-indicators {
    bottom: 15px;
  }
  
  .indicator {
    width: 10px;
    height: 10px;
  }
  
  .game-links {
    margin: 1rem auto;
    padding: 0 0.5rem;
  }
  
  .game-links h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }
  
  .game-link-card {
    padding: 1.5rem;
    min-height: 350px;
  }
  
  .game-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1rem;
  }
  
  .game-link-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
  }
  
  .rank {
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
  }
  
  .stat {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
  }
  
  .click-hint {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
}

/* 低スペック向けメディアクエリ */
@media (max-width: 768px) {
  .slide-overlay {
    backdrop-filter: none; /* blur処理を無効化 */
  }
  
  .cursor-trail {
    display: none; /* モバイルではカーソルトレイルを非表示 */
  }
  
  .game-link-card:hover {
    animation: none; /* モバイルではアニメーションを軽量化 */
  }
}
