@import "../../ohtani/style.css";

/* ランキングページ独自のブランドカラー（ゴールド） */
:root {
  --mvp-gold: #c5a059;
  --mvp-gold-light: #f4ecd8;
  --mvp-gold-dark: #8e6d2f;

  --rank-gold: #c5a059;
  --rank-blue: #002d62;
  --rank-surface: #ffffff;
  --rank-shadow: rgba(0, 0, 0, 0.08);
}

.brand__text span {
  color: var(--mvp-gold) !important;
}

/* =========================================
   ヒーローセクション (Hero Section)
========================================= */
.page-header.dark-hero.mvp-hero,
.page-header.dark-hero.rank-hero {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('../assets/images/mlb_stadium_hero.png') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  padding: 80px 0 60px;
}

.page-header.dark-hero.rank-hero {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)), url('../assets/images/mlb_stadium_hero.png') !important;
  padding: 100px 0 80px;
  text-align: center;
}

.mvp-hero h1 {
  font-size: clamp(32px, 5vw, 48px) !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  text-shadow: none !important;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rank-hero h1 {
  font-size: clamp(28px, 5vw, 42px) !important;
  color: #fff !important;
  line-height: 1.3;
  margin-bottom: 24px;
  font-weight: 800;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.hero-en {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mvp-gold);
  display: block;
}

.hero-jp {
  display: block;
  background: linear-gradient(135deg, #fff 0%, var(--mvp-gold-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  text-align: center;
}

.mvp-hero .subtitle {
  color: rgba(255, 255, 255, 0.8) !important;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-size: 18px !important;
  line-height: 1.7;
}

.rank-hero .subtitle {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 18px !important;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* =========================================
   グリッドレイアウト (Grid Layout)
========================================= */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 60px;
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  padding: 60px 0;
}

/* =========================================
   カードコンポーネント (Cards)
========================================= */

/* 個別ランキング用 (highlight-card) */
.highlight-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.highlight-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at top right, var(--mvp-gold-light), transparent 70%);
  opacity: 0.5;
  z-index: 0;
}

.highlight-card:hover {
  transform: translateY(-8px);
  border-color: var(--mvp-gold);
  box-shadow: 0 20px 40px rgba(197, 160, 89, 0.15);
}

.highlight-card__rank {
  font-size: 12px;
  font-weight: 800;
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  align-self: flex-start;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.special-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, var(--mvp-gold-dark), var(--mvp-gold));
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(142, 109, 47, 0.3);
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.highlight-card__count {
  font-size: 48px;
  font-weight: 900;
  color: var(--mvp-gold);
  line-height: 1;
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.highlight-card__count span {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
}

.highlight-card__title {
  font-size: 24px;
  font-weight: 900;
  color: var(--mvp-gold);
  line-height: 1.3;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.highlight-card__name {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.highlight-card__team {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.highlight-card__detail {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.highlight-card__stats {
  font-size: 12px;
  background: var(--surface-2);
  padding: 10px;
  border-radius: 8px;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.highlight-card__stats div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.highlight-card__stats div:last-child {
  margin-bottom: 0;
}

.highlight-card.premium {
  border: 2px solid var(--mvp-gold);
  background: linear-gradient(135deg, #fff 0%, #fffbf0 100%);
}

/* インデックス用 (link-card) */
.link-card {
  background: var(--rank-surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--rank-shadow);
  height: 100%;
}

.link-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at top right, var(--mvp-gold-light), transparent 70%);
  opacity: 0.5;
  z-index: 0;
}

.link-card::after {
  content: "";
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  background-color: var(--mvp-gold-light);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e6d2f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
  background-size: 20px;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 50%;
  opacity: 0.6;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  animation: link-card-arrow-bounce 1.5s infinite ease-in-out;
}

@keyframes link-card-arrow-bounce {
  0%, 100% { transform: translateX(0); opacity: 0.6; }
  50% { transform: translateX(6px); opacity: 1; }
}

.link-card:hover {
  transform: translateY(-8px);
  border-color: var(--rank-gold);
  box-shadow: 0 20px 40px rgba(197, 160, 89, 0.15);
}

.link-card:hover::after {
  opacity: 1;
  background-color: var(--mvp-gold);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
  animation: none;
  transform: translateX(10px) scale(1.1);
  box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
}

.link-card__category {
  font-size: 12px;
  font-weight: 700;
  color: var(--rank-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.link-card__title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.link-card__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.link-card.highlight {
  border: 2px solid var(--rank-gold);
  background: linear-gradient(135deg, #fff 0%, #fffbf0 100%);
}

.link-card.highlight .link-card__title {
  color: var(--mvp-gold-dark);
}


/* =========================================
   テーブル周辺 (Stats Table)
========================================= */
.section-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.stats-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow-x: auto; /* Enable horizontal scroll */
  -webkit-overflow-scrolling: touch; /* Smooth scroll for iOS */
  margin-bottom: 60px;
}

/* 期間別表彰用の横並びレイアウト */
.awards-row {
  display: flex;
  flex-direction: column;
}

@media (min-width: 992px) {
  .awards-row {
    flex-direction: row;
    gap: 32px;
    align-items: flex-start;
  }
  .awards-col {
    flex: 1;
    min-width: 0;
  }
  .awards-row .stats-table-wrap {
    margin-bottom: 30px;
  }
}

.stats-table-wrap.premium {
  border: 1px solid var(--mvp-gold);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.stats-table th {
  background: var(--surface-2);
  padding: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
}

.stats-table td {
  padding: 14px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.stats-table td:last-child:not(.name) {
  text-align: left;
  max-width: 250px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.stats-table tr:last-child td {
  border-bottom: none;
}

.stats-table tr:hover {
  background: rgba(197, 160, 89, 0.05);
}

.stats-table .rank {
  font-weight: 800;
  color: var(--text);
}

.stats-table .name {
  font-weight: 700;
  color: var(--text);
}

.stats-table .highlight {
  color: var(--accent);
  font-weight: 800;
}

.stats-table .sub {
  font-size: 11px;
  color: var(--text-muted);
}

.stats-summary {
  padding: 24px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.stats-summary ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.stats-summary li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--text);
}

.stats-summary li strong {
  color: var(--mvp-gold-dark);
}

/* =========================================
   MVPカード・タグ (MVP Specific)
========================================= */

.highlight-card__years {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.year-tag {
  background: var(--surface-2);
  color: var(--text);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
}

.highlight-card.premium .year-tag {
  background: var(--mvp-gold);
  color: #fff;
  border-color: var(--mvp-gold);
}

.mvp-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 60px;
}

.mvp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
}

.mvp-card:hover {
  border-color: var(--mvp-gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.mvp-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.mvp-card__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.mvp-card__count {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: var(--text-muted);
  padding: 2px 10px;
  border-radius: 6px;
}

.mvp-card__team {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mvp-card__years {
  font-size: 12px;
  color: var(--text);
  background: var(--surface-2);
  padding: 8px 12px;
  border-radius: 8px;
  letter-spacing: 0.02em;
}

.mvp-card.silver .mvp-card__count {
  background: #a9a9a9; /* Note: original had var(--silver) but it might not be defined, defaulting to gray */
}

.mvp-card.gold .mvp-card__count {
  background: var(--mvp-gold);
}

/* =========================================
   ナビゲーション (Navigation)
========================================= */
.nav a,
.footer-nav a {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.nav a:hover,
.footer-nav a:hover {
  border-color: var(--mvp-gold) !important;
  background: rgba(197, 160, 89, 0.08) !important;
  color: var(--text) !important;
}

.nav a.active,
.footer-nav a.active {
  color: var(--mvp-gold-dark) !important;
  background: rgba(197, 160, 89, 0.15) !important;
  border-color: transparent !important;
}

/* =========================================
   メディアクエリ (Media Queries)
========================================= */
@media (max-width: 992px) {
  .highlight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-header {
    padding: 60px 0 40px !important;
  }
  .page-header.dark-hero.rank-hero {
    padding: 80px 0 60px !important;
  }
  .mvp-hero .subtitle,
  .rank-hero .subtitle {
    font-size: 14px !important;
  }
  .ranking-grid {
    grid-template-columns: 1fr;
    padding: 40px 0;
  }
  .link-card {
    padding: 24px;
  }
  .mvp-list {
    grid-template-columns: 1fr;
  }
  .stats-table {
    min-width: 600px; /* Force scroll on mobile */
  }
  .stats-table th, .stats-table td {
    padding: 12px 8px;
    font-size: 13px;
  }
  .section-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .hero-jp {
    font-size: 28px !important;
  }
  .stats-table {
    min-width: 700px; /* Slightly more space for small screens */
  }
}
/* =========================================
   ボタン・ユーティリティ (Buttons & Utilities)
========================================= */
.page-actions {
  margin: 60px auto 40px;
  text-align: center;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.btn-back-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  padding: 16px 40px;
  background: var(--mvp-gold);
  color: #fff !important;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-back-main:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(197, 160, 89, 0.5);
  filter: brightness(1.1);
}

.btn-back-main::before {
  content: "";
  width: 20px;
  height: 20px;
  margin-right: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M12 19l-7-7 7-7'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.3s ease;
}

.btn-back-main:hover::before {
  transform: translateX(-5px);
}

.promo-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  padding: 14px 24px;
  background: rgba(197, 160, 89, 0.05);
  border: 1px solid rgba(197, 160, 89, 0.2);
  border-radius: 12px;
  color: var(--mvp-gold-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.3s ease;
}

.promo-banner:hover {
  background: rgba(197, 160, 89, 0.12);
  border-color: var(--mvp-gold);
  color: var(--mvp-gold-dark);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .btn-back-main {
    width: 100%;
    min-width: auto;
    max-width: 320px;
  }
}
