/* ========= マリオカートワールド攻略ガイド スタイルシート - 高級感あふれるモダンデザイン ========= */

:root {
  /* カラーパレット - キノコカップ記事と統一 */
  --primary-color: #ffb347;      /* オレンジ */
  --secondary-color: #fffcea;
  --accent-color: #9ddcff;        /* 水色 */
  --highlight-color: #a8e05f;     /* 緑 */
  --background-color: #e82018;    /* 赤 - マリオの色 */
  --text-color: #333;
  --metallic-light: #f0f0f0;
  --metallic-mid: #c0c0c0;
  --metallic-dark: #808080;
  --road-gray: #555;
  --road-line: #fff;

  /* 旧カラー変数との互換性保持 */
  --key-color: var(--primary-color);
  --key-dark: #d98c14;
  --key-light: #ffca78;
  --dark: #222222;
  --gray-dark: #333333;
  --gray: #666666;
  --gray-light: #e0e0e0;
  --white: #ffffff;
  --bg-light: #f9f9f9;
  --overlay: rgba(0, 0, 0, 0.7);

  /* フォント */
  --font-heading: 'Montserrat', 'M PLUS Rounded 1c', sans-serif;
  --font-body: 'M PLUS Rounded 1c', 'Poppins', sans-serif;

  /* シャドウ */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 15px 30px rgba(255, 179, 71, 0.15);

  /* トランジション */
  --transition-fast: 0.2s ease;
  --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-slow: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);

  /* ボーダー */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
}

/* ========= ベースリセット & 全体スタイル ========= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-color);
  background-color: var(--background-color);
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.08) 75%, rgba(255, 255, 255, 0.08)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.08) 75%, rgba(255, 255, 255, 0.08));
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  position: relative;
}

a {
  color: var(--background-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* ========= SVGリンクホバー ========= */
a.sv:hover {
  opacity: 0.5;
}

/* ========= パンくずリスト ========= */
.breadcrumb-nav {
  background-color: var(--accent-color);
  padding: 10px 0;
  border-radius: 5px;
  margin-bottom: 20px;
  margin-top: 10px;
}

.breadcrumb-container {
  padding: 0 15px;
}

.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
}

.breadcrumb-item {
  margin-right: 5px;
  font-size: 0.9rem;
  position: relative;
  padding-right: 15px;
}

.breadcrumb-item::after {
  content: ">";
  position: absolute;
  right: 0;
  color: #666;
}

.breadcrumb-item:last-child {
  font-weight: bold;
  color: var(--background-color);
  padding-right: 0;
}

.breadcrumb-item:last-child::after {
  content: "";
}

.breadcrumb-link {
  color: var(--text-color);
  text-decoration: none;
}

.breadcrumb-link:hover {
  text-decoration: underline;
  color: var(--background-color);
}

/* ========= ヒーローセクション ========= */
header {
  text-align: center;
  padding: 40px 0;
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(135deg, var(--background-color) 0%, #f44336 60%, #ff5722 100%);
  color: var(--white);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border-bottom: 5px solid var(--primary-color);
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
  opacity: 0.3;
}

.license-plate {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: -1px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
  text-transform: uppercase;
}

.license-plate span {
  display: block;
  color: var(--primary-color);
  font-size: 0.7em;
  font-weight: 600;
}

.subtitle {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 5px;
  color: white;
  margin-bottom: 10px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

css/* ========= メインコンテンツ領域 ========= */
.main {
  padding: 40px 20px;
  /* min-heightを削除、または必要に応じて小さい値に */
  min-height: auto;  /* または完全に削除 */
}

/* カードコンテナの調整も追加 */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  perspective: 1000px;
  min-height: auto;  /* 最小高さを自動に */
  margin-bottom: 20px;  /* 下部の余白を調整 */
}

/* カードが少ない時でも中央揃えにしたい場合は以下を追加 */
.card-container:has(.card:nth-child(-n+5)) {
  justify-content: center;
}

/* ========= ヒントテキスト ========= */
.button-hint {
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 20px;
  padding: 10px;
  background-color: var(--bg-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* ========= ボタン ========= */
.top-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}

.mode-button {
  display: inline-block;
  padding: 10px 25px;
  background: linear-gradient(135deg, #e0e0e0 0%, #a0a0a0 100%);
  color: var(--text-color);
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2), inset 0 0 5px rgba(255, 255, 255, 0.5);
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #999;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-body);
}

.mode-button:hover {
  background: linear-gradient(135deg, #f0f0f0 0%, #c0c0c0 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), inset 0 0 5px rgba(255, 255, 255, 0.5);
  color: var(--background-color);
  font-weight: 800;
  text-decoration: none;
}

.mode-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 0 5px rgba(255, 255, 255, 0.5);
}

.mode-button.active {
  background: var(--primary-color);
  color: var(--white);
}

/* ========= カードコンテナ ========= */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  perspective: 1000px;
}

/* PC表示で確実に5列になるようにメディアクエリ */
@media (min-width: 1200px) {
  .card-container {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
  }
}

/* ========= カード共通スタイル ========= */
.card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid var(--primary-color);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-color);
}

/* 展開可能なカードのスタイル（3枚重ね） */
[data-expandable="true"] {
  position: relative;
}

[data-expandable="true"]::before,
[data-expandable="true"]::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 10px;
  border: 2px solid var(--primary-color);
  z-index: -1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

[data-expandable="true"]::before {
  transform: translate(4px, 4px);
  opacity: 0.7;
}

[data-expandable="true"]::after {
  transform: translate(8px, 8px);
  opacity: 0.4;
}

/* カード画像 */
.card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

/* ノーイメージ状態 */
.no-image {
  background: linear-gradient(135deg, var(--background-color) 0%, #f44336 100%);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  font-size: 18px;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.no-image::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.1),
    rgba(255,255,255,0.1) 10px,
    transparent 10px,
    transparent 20px
  );
  animation: move-bg 20s linear infinite;
}

@keyframes move-bg {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.no-image::after {
  content: '🏎️';
  font-size: 36px;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
}

/* カードタイトル */
.card-title {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(0,0,0,0.05);
  background: var(--white);
  flex-grow: 1;
}

.title-text {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-color);
  transition: color var(--transition);
  margin-right: 10px;
}

.card:hover .title-text {
  color: var(--background-color);
}

/* 展開アイコン */
.expand-icon {
  width: 24px;
  height: 24px;
  transition: transform var(--transition);
}

.card.expanded .expand-icon {
  transform: rotate(90deg);
}

/* カード展開スタイル */
.subcat-group,
.page-group,
.group-wrap {
  display: contents;
}

/* ========= アニメーション ========= */
.card.hidden {
  opacity: 0;
  transform: translateY(30px);
}

.card.fade-in {
  animation: fadeInUp 0.8s forwards cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========= ガイドセクション ========= */
.guide-sections {
  margin: 40px 0;
  padding: 30px 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(245,245,245,0.95) 100%);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  border: 2px solid var(--primary-color);
}

.guide-sections::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.guide-heading {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--background-color);
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.guide-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
}

/* ガイドカードのグリッドレイアウト */
.guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

/* 個別ガイドカードのスタイル */
.guide-card {
  background: linear-gradient(135deg, #222 0%, #444 100%);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--white);
  border: 2px solid var(--primary-color);
  position: relative;
}

.guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  border-color: var(--accent-color);
  text-decoration: none;
}

.guide-card-image {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%;
}

.guide-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.guide-card-content {
  padding: 15px;
  flex-grow: 1;
}

.guide-card-content h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 10px;
  color: white;
  font-weight: bold;
}

.guide-card-content p {
  font-size: 0.9rem;
  color: #ddd;
  line-height: 1.5;
}

/* ========= プレイヤータイプ別ガイド ========= */
.player-guides {
  margin: 40px 0;
  padding: 30px 20px;
  background: linear-gradient(135deg, rgba(255,250,240,0.95) 0%, rgba(255,245,225,0.95) 100%);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 2px solid var(--primary-color);
}

.player-guide-cards {
  display: flex;
  gap: 25px;
  justify-content: center;
  flex-wrap: wrap;
}

.player-guide-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  width: 300px;
  min-height: 270px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 2px solid var(--primary-color);
}

.player-guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(255, 179, 71, 0.2);
  border-color: var(--accent-color);
}

.player-guide-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 15px;
}

.player-guide-card h3 {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--background-color);
}

.player-guide-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.player-guide-card li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 22px;
}

.player-guide-card li::before {
  content: '🏎️';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 14px;
}

.player-guide-card a {
  color: var(--background-color);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.player-guide-card a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* ========= フッター ========= */
.copy {
  margin-top: 50px;
  padding: 30px 15px;
  background-color: #f5f5f5;
  border-top: 3px solid var(--primary-color);
  font-size: 0.9rem;
  color: #666;
}

.copy p {
  margin-bottom: 10px;
}

.contact-info, .usage-terms {
  margin: 20px 0;
}

.copyright {
  margin-top: 20px;
  text-align: center;
  font-weight: bold;
}

/* リンクスタイル */
.copy a {
  color: var(--background-color);
  text-decoration: none;
}

.copy a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* ========= レスポンシブデザイン ========= */
/* 中間サイズの画面用の調整 */
@media (min-width: 769px) and (max-width: 1199px) {
  .card-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }

  .guide-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .license-plate {
    font-size: 2.5rem;
  }

  .card-container {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }

  .top-buttons {
    flex-wrap: wrap;
  }

  .mode-button {
    flex: 1;
    min-width: 160px;
    text-align: center;
  }

  .guide-cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .player-guide-card {
    width: 100%;
    min-height: auto;
    padding: 20px;
  }

  .breadcrumb-nav {
    font-size: 0.8rem;
  }

  .breadcrumb-item {
    padding-right: 12px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 10px;
  }

  .guide-heading {
    font-size: 1.4rem;
  }

  .player-guide-cards {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .license-plate {
    font-size: 2rem;
  }

  /* 3 columns grid for better visibility */
  .card-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  /* Adjust card size and appearance for smaller screens */
  .card {
    min-height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
  }

  /* Make card title text smaller on mobile */
  .title-text {
    font-size: 12px;
  }

  /* Adjust card padding for mobile */
  .card-title {
    padding: 10px;
  }

  /* Keep square aspect ratio for images to show entire content */
  .card-image {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
  }

  /* ノーイメージ時のフォントサイズ調整 */
  .no-image {
    font-size: 14px;
  }

  .no-image::after {
    font-size: 24px;
  }

  /* Adjust top buttons for mobile */
  .top-buttons {
    flex-wrap: wrap;
  }

  .mode-button {
    flex: 1;
    min-width: 120px;
    padding: 10px 15px;
    font-size: 12px;
  }
}

/* 360px以下の画面でのさらなる調整 */
@media (max-width: 360px) {
  /* 3 columns even on very small screens for better overview */
  .card-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  /* Further reduce text size and padding for tiny screens */
  .title-text {
    font-size: 11px;
  }

  .card-title {
    padding: 8px;
  }

  /* Reduce icon size */
  .expand-icon {
    width: 18px;
    height: 18px;
  }

  /* カードの境界線をより明確に */
  .card {
    border: 1px solid rgba(0,0,0,0.08);
  }
}

/* 最も小さい画面（320px）での調整 */
@media (max-width: 320px) {
  .card-container {
    gap: 4px;
  }

  .title-text {
    font-size: 10px;
  }

  .card-title {
    padding: 6px;
  }
}

/* ガイドセクションのレスポンシブ調整も5列に合わせて更新 */
@media (min-width: 1200px) {
  .guide-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* JavaScriptアニメーション効果用のスタイル */
.guide-sections,
.player-guides {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s ease;
}

.guide-card,
.player-guide-card {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
}

/* ────────────────────────────
   おすすめ記事カード
──────────────────────────── */
.recommend-section {
  margin: 3rem 0;
}

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  justify-content: center;
}

/* JS が挿入する <a> と <br> の整形 */
.recommend-grid a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: #fff;
  border: 2px solid var(--primary-color);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  color: var(--text-color);
  font-weight: 700;
  line-height: 1.4;
}

.recommend-grid a:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  box-shadow: 0 8px 18px rgba(0,0,0,0.28);
}

.recommend-grid img.sneak {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 8px;
}

#recommendations br { display: none; }   /* 余計な改行を抑制 */

/* モバイル：カードを2列に */
@media (max-width: 480px) {
  .recommend-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}
/* ========= ゲーム基本情報セクション ========= */
.game-info-section {
  margin: 40px 0;
  padding: 30px 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(252,252,252,0.98) 100%);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  border: 2px solid var(--primary-color);
}

.game-info-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--background-color), var(--primary-color), var(--accent-color));
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.section-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--background-color);
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.section-title::after {
  content: '🏁';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

.game-info-container {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
}

.game-info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.game-info-table th,
.game-info-table td {
  padding: 18px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.game-info-table th {
  background: linear-gradient(135deg, var(--background-color) 0%, #f44336 100%);
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 150px;
  position: relative;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.game-info-table th::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-color);
}

.game-info-table td {
  background: rgba(255,255,255,0.9);
  color: var(--text-color);
  font-weight: 500;
  line-height: 1.6;
}

.game-info-table tr {
  transition: all 0.3s ease;
  position: relative;
}

.game-info-table tr:hover td {
  background: rgba(255,179,71,0.1);
  transform: translateX(5px);
}

.game-info-table tr:hover th {
  background: linear-gradient(135deg, #ff3030 0%, #ff5544 100%);
}

.game-info-table tr:last-child th,
.game-info-table tr:last-child td {
  border-bottom: none;
}

/* 表内のリンクスタイル */
.game-info-table a {
  color: var(--background-color);
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  display: inline-block;
}

.game-info-table a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.game-info-table a:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.game-info-table a:hover::after {
  width: 100%;
}

/* モバイル対応のための価格表示改善 */
.game-info-table td br {
  display: block;
  content: '';
  margin: 5px 0;
}

/* アイコン装飾（各行に関連するアイコンを追加） */
.game-info-table tr:nth-child(1) th::after { content: '🎮'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); opacity: 0.3; }
.game-info-table tr:nth-child(2) th::after { content: '🏎️'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); opacity: 0.3; }
.game-info-table tr:nth-child(3) th::after { content: '📅'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); opacity: 0.3; }
.game-info-table tr:nth-child(4) th::after { content: '🏢'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); opacity: 0.3; }
.game-info-table tr:nth-child(5) th::after { content: '💰'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); opacity: 0.3; }
.game-info-table tr:nth-child(6) th::after { content: '🎯'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); opacity: 0.3; }
.game-info-table tr:nth-child(7) th::after { content: '🎪'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); opacity: 0.3; }
.game-info-table tr:nth-child(8) th::after { content: '👥'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); opacity: 0.3; }
.game-info-table tr:nth-child(9) th::after { content: '🌐'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); opacity: 0.3; }

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .game-info-section {
    padding: 20px 15px;
    margin: 30px 0;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }

  .game-info-table th,
  .game-info-table td {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .game-info-table th {
    min-width: 120px;
  }

  /* モバイルでアイコンを非表示 */
  .game-info-table th::after {
    display: none;
  }

  .game-info-container {
    border-radius: 8px;
  }

  .game-info-table {
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  .game-info-section {
    padding: 15px 10px;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .game-info-table th,
  .game-info-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .game-info-table th {
    font-size: 0.8rem;
    min-width: 100px;
  }

  /* より小さい画面でのホバー効果を調整 */
  .game-info-table tr:hover td {
    transform: translateX(2px);
  }
}

/* ダークモード対応（オプション） */
@media (prefers-color-scheme: dark) {
  .game-info-section {
    background: linear-gradient(135deg, rgba(40,40,40,0.98) 0%, rgba(30,30,30,0.98) 100%);
    border-color: var(--primary-color);
  }

  .game-info-table {
    background: #2a2a2a;
  }

  .game-info-table td {
    background: rgba(50,50,50,0.9);
    color: #e0e0e0;
  }

  .section-title {
    color: var(--primary-color);
  }
}

/* アニメーション遅延でスムーズな表示 */
.game-info-section {
  opacity: 0;
  animation: fadeInUp 0.8s forwards;
  animation-delay: 0.2s;
}
/* ========= ヒーローセクション - ダークスタイル版 ========= */
header {
  text-align: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 10px 10px 0 0;
  /* 画像の下側を表示 */
  background-color: #1a1a1a;
  background-image: url('https://eikyuhozon.com/image/mario-kart-world-list.webp');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  border-bottom: 5px solid var(--primary-color);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* 暗いオーバーレイ */
header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

/* 追加の暗いグラデーション */
header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

/* マリオカートスタイルのタイトル（暗い背景用に調整） */
.license-plate {
  display: inline-block;
  font-family: 'Poppins', 'M PLUS Rounded 1c', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  font-style: italic;
  margin-bottom: 5px;
  letter-spacing: -3px;
  position: relative;
  z-index: 2;
  text-transform: uppercase;
  transform: skewX(-10deg);

  /* 暗い背景で映える色調整 */
  color: #FFEF00;
  text-shadow:
    /* 黒アウトライン */
    -3px -3px 0 #000,
    3px -3px 0 #000,
    -3px 3px 0 #000,
    3px 3px 0 #000,
    -3px 0 0 #000,
    3px 0 0 #000,
    0 -3px 0 #000,
    0 3px 0 #000,
    /* 赤い光彩 */
    0 0 20px #FF0000,
    0 0 40px #FF0000,
    /* 深い影 */
    4px 4px 0 #FF0000,
    5px 5px 0 #CC0000,
    6px 6px 0 #990000,
    7px 7px 15px rgba(0, 0, 0, 0.8);

  /* 初回アニメーション */
  opacity: 0;
  transform: skewX(-10deg) scale(0.7) translateY(50px);
  animation: kart-entrance 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  animation-delay: 0.2s;
}

@keyframes kart-entrance {
  to {
    opacity: 1;
    transform: skewX(-10deg) scale(1) translateY(0);
  }
}

.license-plate span {
  display: block;
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-size: 0.5em;
  font-weight: 800;
  font-style: normal;
  color: #FFAA00;
  margin-top: 5px;
  letter-spacing: 2px;
  transform: skewX(0);
  text-shadow:
    /* 黒アウトライン */
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    2px 2px 0 #000,
    /* 光彩 */
    0 0 10px rgba(255, 170, 0, 0.5),
    /* 影 */
    3px 3px 6px rgba(0, 0, 0, 0.8);

  /* サブタイトルアニメーション */
  opacity: 0;
  animation: sub-entrance 0.6s ease-out forwards;
  animation-delay: 0.6s;
}

@keyframes sub-entrance {
  to {
    opacity: 1;
  }
}

.subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 6px;
  color: #66CCFF;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 0 10px rgba(102, 204, 255, 0.5),
    2px 2px 6px rgba(0, 0, 0, 0.8);

  /* 英語サブタイトルアニメーション */
  opacity: 0;
  animation: sub-entrance 0.6s ease-out forwards;
  animation-delay: 0.9s;
}

/* ホバー時の効果 */
.license-plate:hover {
  transform: skewX(-10deg) scale(1.05);
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  text-shadow:
    /* 黒アウトライン */
    -3px -3px 0 #000,
    3px -3px 0 #000,
    -3px 3px 0 #000,
    3px 3px 0 #000,
    -3px 0 0 #000,
    3px 0 0 #000,
    0 -3px 0 #000,
    0 3px 0 #000,
    /* より強い光彩 */
    0 0 30px #FF0000,
    0 0 50px #FF0000,
    /* 深い影 */
    4px 4px 0 #FF0000,
    5px 5px 0 #CC0000,
    6px 6px 0 #990000,
    7px 7px 20px rgba(0, 0, 0, 0.9);
}

/* モバイル対応 */
@media (max-width: 768px) {
  header {
    min-height: 280px;
    padding: 30px 15px;
  }

  .license-plate {
    font-size: 3rem;
    letter-spacing: -2px;
  }

  .subtitle {
    font-size: 0.8rem;
    letter-spacing: 4px;
  }
}

@media (max-width: 480px) {
  header {
    min-height: 240px;
    padding: 20px 10px;
  }

  .license-plate {
    font-size: 2.2rem;
    letter-spacing: -1px;
    text-shadow:
      /* 簡略化されたアウトライン */
      -2px -2px 0 #000,
      2px -2px 0 #000,
      -2px 2px 0 #000,
      2px 2px 0 #000,
      0 0 15px #FF0000,
      3px 3px 0 #FF0000,
      4px 4px 10px rgba(0, 0, 0, 0.8);
  }

  .license-plate span {
    font-size: 0.6em;
    letter-spacing: 1px;
  }

  .subtitle {
    font-size: 0.7rem;
    letter-spacing: 3px;
    margin-bottom: 15px;
  }
}

/* さらに小さい画面 */
@media (max-width: 360px) {
  header {
    min-height: 200px;
  }

  .license-plate {
    font-size: 1.8rem;
  }
}

/* アニメーション無効化の対応 */
@media (prefers-reduced-motion: reduce) {
  .license-plate,
  .license-plate span,
  .subtitle {
    animation: none;
    opacity: 1;
    transform: skewX(-10deg) scale(1) translateY(0);
  }

  .license-plate span {
    transform: skewX(0);
  }
}
/* ========= コース一覧セクション ========= */
.article-section {
  margin: 40px 0;
  padding: 30px 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(252,252,252,0.98) 100%);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  border: 2px solid var(--primary-color);
}

.article-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--background-color), var(--primary-color), var(--accent-color));
}

/* サブ見出し */
.sub-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--background-color);
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cup-icon {
  width: 40px;
  height: 40px;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
  animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* コースリスト */
.course-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* コースアイテム */
.course-item {
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.course-item:hover {
  transform: translateY(-3px);
}

/* コースリンク（ボタンスタイル） */
.course-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: linear-gradient(135deg, #222 0%, #444 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  border: 2px solid var(--primary-color);
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.course-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,179,71,0.3), transparent);
  transition: left 0.5s ease;
}

.course-link:hover {
  background: linear-gradient(135deg, var(--background-color) 0%, #f44336 100%);
  border-color: var(--accent-color);
  box-shadow: 0 6px 20px rgba(255,179,71,0.3);
  transform: scale(1.02);
}

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

/* コースアイコン */
.course-mini-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

.course-link:hover .course-mini-icon {
  transform: rotate(10deg) scale(1.1);
}

/* コース名 */
.course-mini-name {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  flex: 1;
}

/* グランプリセクション特別スタイル */
#grand-prix {
  background: linear-gradient(135deg, rgba(255,250,240,0.98) 0%, rgba(255,245,225,0.98) 100%);
}

#grand-prix .course-link {
  background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
  border-color: #d4af37;
}

#grand-prix .course-link:hover {
  background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
  box-shadow: 0 6px 20px rgba(212,175,55,0.4);
}

/* サバイバルセクション特別スタイル */
#survival-rallies {
  background: linear-gradient(135deg, rgba(240,248,255,0.98) 0%, rgba(225,240,255,0.98) 100%);
}

#survival-rallies .course-link {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border-color: #2a5298;
}

#survival-rallies .course-link:hover {
  background: linear-gradient(135deg, #3a5998 0%, #4a69a8 100%);
  box-shadow: 0 6px 20px rgba(42,82,152,0.4);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .article-section {
    padding: 20px 15px;
    margin: 30px 0;
  }

  .sub-heading {
    font-size: 1.4rem;
    gap: 10px;
  }

  .cup-icon {
    width: 32px;
    height: 32px;
  }

  .course-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .course-link {
    padding: 12px 15px;
  }

  .course-mini-icon {
    width: 30px;
    height: 30px;
  }

  .course-mini-name {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .article-section {
    padding: 15px 10px;
    border-radius: 10px;
  }

  .sub-heading {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
  }

  .course-link {
    padding: 10px 12px;
    gap: 12px;
    border-radius: 8px;
  }

  .course-mini-icon {
    width: 28px;
    height: 28px;
  }

  .course-mini-name {
    font-size: 0.85rem;
  }
}

/* アニメーション遅延で順次表示 */
.course-item {
  opacity: 0;
  animation: fadeInUp 0.6s forwards;
}

.course-item:nth-child(1) { animation-delay: 0.1s; }
.course-item:nth-child(2) { animation-delay: 0.2s; }
.course-item:nth-child(3) { animation-delay: 0.3s; }
.course-item:nth-child(4) { animation-delay: 0.4s; }
.course-item:nth-child(5) { animation-delay: 0.5s; }
.course-item:nth-child(6) { animation-delay: 0.6s; }
.course-item:nth-child(7) { animation-delay: 0.7s; }
.course-item:nth-child(8) { animation-delay: 0.8s; }

/* アクセシビリティ対応 */
.course-link:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* ダークモード対応（オプション） */
@media (prefers-color-scheme: dark) {
  .article-section {
    background: linear-gradient(135deg, rgba(40,40,40,0.98) 0%, rgba(30,30,30,0.98) 100%);
    border-color: var(--primary-color);
  }

  .sub-heading {
    color: var(--primary-color);
  }

  .course-link {
    background: linear-gradient(135deg, #333 0%, #555 100%);
  }

  .course-link:hover {
    background: linear-gradient(135deg, #555 0%, #666 100%);
  }
  * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
  }

  html {
      scroll-behavior: smooth;
  }

  body {
      font-family: var(--font-body);
      color: var(--text-color);
      background-color: var(--background-color);
      background-image:
          linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.08) 75%, rgba(255, 255, 255, 0.08)),
          linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.08) 75%, rgba(255, 255, 255, 0.08));
      background-size: 40px 40px;
      background-position: 0 0, 20px 20px;
      line-height: 1.6;
      font-size: 16px;
      min-height: 100vh;
      padding: 20px 10px;
  }

  .container {
      width: 100%;
      max-width: 1200px;
      margin: 0 auto;
      background-color: rgba(255, 255, 255, 0.95);
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
      border-radius: 10px;
      overflow: hidden;
  }

  /* ヘッダー - マリオカートワールドスタイル */
  header {
      text-align: center;
      padding: 40px 20px;
      position: relative;
      overflow: hidden;
      background: linear-gradient(135deg, var(--background-color) 0%, #f44336 60%, #ff5722 100%);
      color: var(--white);
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
      border-bottom: 5px solid var(--primary-color);
      min-height: 320px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
  }

  /* 暗いオーバーレイ */
  header::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.3);
      z-index: 1;
  }

  /* マリオカートスタイルのタイトル */
  .license-plate {
      display: inline-block;
      font-family: 'M PLUS Rounded 1c', var(--font-heading);
      font-size: 3rem;
      font-weight: 900;
      margin-bottom: 5px;
      letter-spacing: 0.05em;
      position: relative;
      z-index: 2;
      transform: skewX(-10deg);
      color: #FFEF00;
      text-shadow:
          -3px -3px 0 #000,
          3px -3px 0 #000,
          -3px 3px 0 #000,
          3px 3px 0 #000,
          0 0 20px #FF0000,
          4px 4px 0 #FF0000,
          5px 5px 0 #CC0000,
          6px 6px 15px rgba(0, 0, 0, 0.8);
      animation: kart-entrance 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  }

  .title-part1 {
      display: inline-block;
      margin-right: 0.3em;
  }

  .title-part2 {
      display: inline-block;
  }

  @keyframes kart-entrance {
      from {
          opacity: 0;
          transform: skewX(-10deg) scale(0.7) translateY(50px);
      }
      to {
          opacity: 1;
          transform: skewX(-10deg) scale(1) translateY(0);
      }
  }

  .subtitle {
      font-size: 1rem;
      letter-spacing: 0.1em;
      color: #66CCFF;
      margin-bottom: 20px;
      position: relative;
      z-index: 2;
      text-shadow:
          -1px -1px 0 #000,
          1px -1px 0 #000,
          -1px 1px 0 #000,
          1px 1px 0 #000,
          0 0 10px rgba(102, 204, 255, 0.5);
  }

  /* ドライバー情報セクション */
  .driver-section {
      background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(252,252,252,0.98) 100%);
      padding: 30px 20px;
      border-bottom: 3px solid var(--primary-color);
      position: relative;
  }

  .driver-section::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 5px;
      background: linear-gradient(90deg, var(--background-color), var(--primary-color), var(--accent-color));
  }

  .driver-info {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 30px;
      flex-wrap: wrap;
      padding: 20px;
      background: rgba(255, 255, 255, 0.15);
      border-radius: var(--radius-lg);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  }

  .driver-info img {
      width: 150px;
      height: auto;
      filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
      animation: heroFloat 3s ease-in-out infinite;
  }

  @keyframes heroFloat {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-10px); }
  }

  .driver-stats {
      text-align: left;
      background: white;
      padding: 20px;
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-md);
      border: 2px solid var(--primary-color);
  }

  .driver-stats h2 {
      color: var(--background-color);
      margin-bottom: 15px;
      font-family: var(--font-heading);
      font-size: 1.5rem;
      text-transform: uppercase;
      letter-spacing: 1px;
  }

  .driver-stat-item {
      margin: 8px 0;
      font-size: 0.8rem;
      color: var(--text-color);
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 10px;
  }

  .driver-stat-item::before {
      content: '🏁';
      font-size: 14px;
  }

  /* フィルターセクション */
  .filter-section {
      background: white;
      padding: 30px 20px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
      border-bottom: 2px solid var(--gray-light);
  }

  .section-title {
      text-align: center;
      font-family: var(--font-heading);
      font-size: 1.8rem;
      font-weight: 800;
      color: var(--background-color);
      margin-bottom: 25px;
      position: relative;
      text-transform: uppercase;
      letter-spacing: 1px;
  }

  .section-title::after {
      /* content: '🏎️'; */
      position: absolute;
      bottom: -10px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 24px;
      animation: bounce 2s ease-in-out infinite;
  }

  @keyframes bounce {
      0%, 100% { transform: translateX(-50%) translateY(0); }
      50% { transform: translateX(-50%) translateY(-5px); }
  }

  .filter-buttons {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 15px;
      max-width: 800px;
      margin: 0 auto;
  }

  .filter-btn {
      padding: 15px 20px;
      border-radius: var(--radius-md);
      font-weight: bold;
      font-size: 1rem;
      border: 2px solid var(--gray-light);
      background: linear-gradient(135deg, #e0e0e0 0%, #a0a0a0 100%);
      color: var(--text-color);
      cursor: pointer;
      transition: all var(--transition);
      font-family: var(--font-body);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
      position: relative;
      overflow: hidden;
  }

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

  .filter-btn:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  }

  .filter-btn:hover::before {
      left: 100%;
  }

  .filter-btn.active {
      transform: scale(1.05);
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
      color: white;
      border: 2px solid transparent;
  }

  .filter-btn.speed.active {
      background: linear-gradient(135deg, #ff5252 0%, #ff1744 100%);
  }
  .filter-btn.accel.active {
      background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  }
  .filter-btn.weight.active {
      background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  }
  .filter-btn.handling.active {
      background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  }

  .status {
      display: block;
      font-size: 0.85rem;
      margin-top: 5px;
      opacity: 0.8;
  }

  /* ランキングセクション */
  .ranking-section {
      background: linear-gradient(135deg, rgba(255,250,240,0.98) 0%, rgba(255,245,225,0.98) 100%);
      padding: 30px 20px;
  }

  #sortStatus {
      text-align: center;
      font-family: var(--font-heading);
      font-size: 1.6rem;
      font-weight: 800;
      color: var(--background-color);
      margin-bottom: 30px;
      text-transform: uppercase;
      letter-spacing: 1px;
  }

  /* ランキングアイテム */
  .ranking-item {
      background: white;
      border: 2px solid var(--primary-color);
      border-radius: var(--radius-md);
      padding: 20px;
      margin-bottom: 20px;
      box-shadow: var(--shadow-md);
      transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
      position: relative;
      overflow: hidden;
      will-change: transform;
  }

  .ranking-item::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 5px;
      height: 100%;
      background: var(--background-color);
      transition: width var(--transition);
  }

  .ranking-item:hover {
      transform: translateX(5px);
      box-shadow: 0 8px 20px rgba(255, 179, 71, 0.15);
      border-color: var(--accent-color);
  }

  .ranking-item:hover::before {
      width: 8px;
  }

  .item-content {
      display: flex;
      gap: 20px;
      align-items: start;
  }

  .item-images {
      display: flex;
      flex-direction: column;
      gap: 15px;
      align-items: center;
      min-width: 140px;
  }

  .rank-number {
      font-size: 2.5rem;
      font-weight: 900;
      font-family: var(--font-heading);
      color: var(--background-color);
      text-align: center;
      text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
      font-style: italic;
      transform: skewX(-10deg);
  }

  .machine-image {
      width: 120px;
      height: 120px;
      border: 3px solid var(--primary-color);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-md);
      background: white;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      position: relative;
  }

  .machine-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.3s ease;
  }

  .ranking-item:hover .machine-image img {
      transform: scale(1.1);
  }

  .item-info {
      flex: 1;
  }

  .info-header {
      display: flex;
      justify-content: space-between;
      align-items: start;
      margin-bottom: 20px;
      flex-wrap: wrap;
      gap: 15px;
  }

  .machine-name {
      font-size: 1.6rem;
      font-weight: 800;
      font-family: var(--font-heading);
      color: var(--background-color);
      text-transform: uppercase;
      letter-spacing: 0.5px;
  }

  .details {
      font-size: 1rem;
      color: var(--gray);
      font-weight: 600;
      margin: 8px 0;
  }

  .sort-score {
      text-align: center;
      background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
      padding: 10px 20px;
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-md);
  }

  .sort-score-label {
      font-size: 0.8rem;
      color: white;
      opacity: 0.9;
      text-transform: uppercase;
      letter-spacing: 1px;
  }

  .sort-score-value {
      font-size: 2rem;
      font-weight: 900;
      color: white;
      text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  }

  /* ステータスバー */
  .stats-container {
      margin-top: 20px;
  }

  .stat-row {
      display: flex;
      align-items: center;
      gap: 15px;
      margin-bottom: 12px;
  }

  .stat-label {
      width: 100px;
      font-size: 0.9rem;
      font-weight: 700;
      color: var(--text-color);
      text-transform: uppercase;
      letter-spacing: 0.5px;
  }

  .stat-bar-container {
      flex: 1;
      position: relative;
  }

  .stat-bar-bg {
      background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
      height: 28px;
      border: 2px solid #ccc;
      border-radius: 14px;
      position: relative;
      overflow: hidden;
      box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  }

  .stat-bar-grid {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      display: flex;
  }

  .grid-line {
      width: 25%;
      border-right: 1px solid rgba(0,0,0,0.1);
  }

  .stat-bar {
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding-right: 10px;
      transition: width 0.6s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.3s ease;
      box-shadow: 0 2px 4px rgba(0,0,0,0.2);
      will-change: width;
      transform: translateZ(0);
  }

  .stat-bar.speed {
      background: linear-gradient(135deg, #ff5252 0%, #ff1744 100%);
  }
  .stat-bar.accel {
      background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  }
  .stat-bar.weight {
      background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  }
  .stat-bar.handling {
      background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  }

  .stat-bar.active {
      filter: brightness(1.2);
      box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }

  .stat-value {
      color: white;
      font-size: 0.85rem;
      font-weight: bold;
      text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
      will-change: content;
  }

  .stat-scale {
      display: flex;
      justify-content: space-between;
      margin-top: 3px;
      padding: 0 5px;
  }

  .scale-number {
      font-size: 10px;
      color: #999;
      font-weight: 600;
  }

  /* ページ情報 */
  .page-info {
      text-align: center;
      margin-top: 30px;
      padding: 15px;
      background: white;
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-sm);
      color: var(--text-color);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 1px;
  }

  /* デバッグ情報 */
  .debug-info {
      background: #ffeb3b;
      padding: 10px;
      margin: 10px 0;
      border-radius: 5px;
      font-family: monospace;
      font-size: 12px;
      color: #333;
  }

  /* ローディング */
  .loading {
      text-align: center;
      padding: 60px;
      font-size: 1.3rem;
      color: var(--gray);
      font-weight: 600;
  }

  /* レスポンシブデザイン */
  @media (max-width: 768px) {
      .license-plate {
          font-size: 2.2rem;
          letter-spacing: 0;
      }

      .driver-info {
          flex-direction: column;
          gap: 20px;
      }

      .driver-info img {
          width: 120px;
      }

      .filter-buttons {
          grid-template-columns: repeat(2, 1fr);
          gap: 10px;
      }

      .item-content {
          flex-direction: column;
          align-items: center;
      }

      .item-info {
          width: 100%;
      }

      .machine-name {
          font-size: 1.3rem;
      }
  }

  @media (max-width: 480px) {
      .license-plate {
          font-size: 1.8rem;
          letter-spacing: 0;
      }

      .title-part1, .title-part2 {
          display: block;
          margin-right: 0;
      }

      .driver-info img {
          width: 100px;
      }

      .subtitle {
          font-size: 0.8rem;
          letter-spacing: 3px;
      }

      /* フィルターボタンを横4つ並びに維持 */
      .filter-buttons {
          grid-template-columns: repeat(4, 1fr);  /* 4列に固定 */
          gap: 5px;  /* 隙間を狭く */
      }

      .filter-btn {
          padding: 10px 5px;  /* パディングを調整 */
          font-size: 0.75rem;  /* 文字サイズを小さく */
          min-height: 60px;  /* 最小高さを設定 */
      }

      .filter-btn .status {
          display: block;
          font-size: 0.65rem;  /* ステータス文字を更に小さく */
          margin-top: 3px;
      }

      .ranking-item {
          padding: 15px;
      }

      .rank-number {
          font-size: 2rem;
      }

      .machine-image {
          width: 100px;
          height: 100px;
      }

      .machine-image img {
          width: 100%;
          height: 100%;
      }

      /* --- スマホ表示の余白調整 --- */
      body {
          padding-left: 0;
          padding-right: 0;
      }

      .container {
          border-radius: 0;
      }

      header,
      .driver-section,
      .filter-section,
      .ranking-section,
      .faq-section,
      .related-links-section {
          padding-left: 15px;
          padding-right: 15px;
      }

      /* --- グラフ表示改善 ここから --- */
      .stat-row {
          flex-direction: column; /* ラベルとバーを縦に並べる */
          align-items: flex-start; /* 左揃えにする */
          gap: 4px;                /* ラベルとバーの間の隙間を調整 */
          margin-bottom: 16px;     /* 各ステータス間の間隔を調整 */
      }

      .stat-row:last-child {
          margin-bottom: 0;
      }

      .stat-label {
          width: auto;             /* 固定幅を解除 */
          font-size: 0.8rem;
      }

      .stat-bar-container {
          width: 100%;             /* バーのコンテナを横幅いっぱいに */
      }
      /* --- グラフ表示改善 ここまで --- */
  }

  /* アニメーション */
  .fade-in {
      opacity: 0;
      transform: translateY(20px);
      animation: fadeInUp 0.4s forwards ease-out;
  }

  @keyframes fadeInUp {
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  /* パフォーマンス最適化 */
  .ranking-item {
      will-change: transform;
  }

  .stat-bar-container {
      transform: translateZ(0);
      backface-visibility: hidden;
  }

  /* ========= SVGリンクホバー ========= */
  a.sv:hover {
    opacity: 0.5;
  }

  /* ========= パンくずリスト ========= */
  .breadcrumb-nav {
    background-color: var(--accent-color);
    padding: 10px 0;
    border-radius: 5px;
    margin-bottom: 20px;
    margin-top: 10px;
  }

  .breadcrumb-container {
    padding: 0 15px;
  }

  .breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
  }

  .breadcrumb-item {
    margin-right: 5px;
    font-size: 0.9rem;
    position: relative;
    padding-right: 15px;
  }

  .breadcrumb-item::after {
    content: ">";
    position: absolute;
    right: 0;
    color: #666;
  }

  .breadcrumb-item:last-child {
    font-weight: bold;
    color: var(--background-color);
    padding-right: 0;
  }

  .breadcrumb-item:last-child::after {
    content: "";
  }

  .breadcrumb-link {
    color: var(--text-color);
    text-decoration: none;
  }

  .breadcrumb-link:hover {
    text-decoration: underline;
    color: var(--background-color);
  }
  @media (max-width: 480px) {
  /* bodyの余白を完全に削除 */
  body {
      padding: 0 !important;
      margin: 0 !important;
  }

  /* コンテナを画面幅いっぱいに */
  .container {
      max-width: 100% !important;
      margin: 0 !important;
      border-radius: 0 !important;
      padding: 0 !important;
  }

  /* ランキングセクション全体を画面幅いっぱいに */
  .ranking-section {
      padding: 30px 0 !important;
      margin: 0 !important;
  }

  /* rankingList要素も画面幅いっぱいに */
  #rankingList {
      padding: 0 !important;
      margin: 0 !important;
      width: 100% !important;
  }

  /* ランキングアイテムを画面幅いっぱいに */
  .ranking-item {
      margin: 0 0 2px 0 !important;  /* 下に少し隙間 */
      padding: 15px 10px !important;
      border-radius: 0 !important;
      border-left: none !important;
      border-right: none !important;
      width: 100% !important;
      box-sizing: border-box !important;
  }

  /* タイトルとページ情報には余白を維持 */
  #sortStatus,
  .page-info {
      margin-left: 15px;
      margin-right: 15px;
  }
}
@media (max-width: 480px) {
  /* パンくずリストの文字サイズ調整 */
  .breadcrumb {
      padding: 0 10px;  /* 左右の余白も少し減らす */
  }

  .breadcrumb-item {
      font-size: 0.6rem;  /* 文字サイズを小さく */
      margin-right: 2px;  /* 項目間の余白も狭く */
      padding-right: 10px;  /* 矢印のスペースも調整 */
  }

  .breadcrumb-item::after {
      font-size: 0.65rem;  /* 矢印も小さく */
  }

  .breadcrumb-item:last-child {
      font-size: 0.75rem;  /* 現在地は少しだけ大きく */
  }

  /* パンくずナビ全体の高さも調整 */
  .breadcrumb-nav {
      padding: 8px 0;  /* 上下パディングを減らす */
      margin-bottom: 15px;
  }
}

/* さらに小さい画面用 */
@media (max-width: 320px) {
  .breadcrumb-item {
      font-size: 0.5rem;
  }

  .breadcrumb-item:last-child {
      font-size: 0.6rem;
  }
}
@media (max-width: 480px) {
  /* h1（メインタイトル）の調整 */
  .license-plate {
      font-size: 1rem;  /* 3remから1.8remに縮小 */
      letter-spacing: 0;
      text-shadow:  /* シャドウも少し軽く */
          -2px -2px 0 #000,
          2px -2px 0 #000,
          -2px 2px 0 #000,
          2px 2px 0 #000,
          0 0 10px #FF0000,
          3px 3px 0 #FF0000,
          4px 4px 10px rgba(0, 0, 0, 0.6);
  }

  .license-plate span {
      display: block;  /* サブタイトルを改行 */
      font-size: 0.8rem;  /* サブタイトルはさらに小さく */
      margin-top: 5px;
  }

  /* h2レベルの見出し調整 */
  .section-title {
      font-size: 0.9rem;  /* 1.8remから1.3remに */
      margin-bottom: 15px;
  }

  .driver-stats h2 {
      font-size: 1rem;  /* 1.5remから1.1remに */
      margin-bottom: 3px;
  }

  #sortStatus {
      font-size: 1rem;  /* 1.6remから1.2remに */
      margin-bottom: 10px;
  }

  /* FAQや関連リンクのh2 */
  .faq-section h2,
  .related-links-section h2 {
      font-size: 1rem;
  }

  .related-links-section h3 {
      font-size: 1rem;  /* 1.3remから1remに */
      margin-bottom: 15px;
  }

  /* ヘッダー全体の高さも調整 */
  header {
      min-height: 200px;  /* 320pxから200pxに */
      padding: 30px 15px;  /* パディングも減らす */
  }

  .subtitle {
      font-size: 0.8rem;  /* 1remから0.8remに */
      margin-bottom: 10px;
  }
}

/* さらに小さい画面用（320px以下） */
@media (max-width: 320px) {
  .license-plate {
      font-size: 1.5rem;
  }

  .license-plate span {
      font-size: 0.7rem;
  }

  .section-title {
      font-size: 1.1rem;
  }

  #sortStatus {
      font-size: 1rem;
  }
}
