@charset "UTF-8";
@import url('/css/rizin-background.css');

/* ========================================
   RIZIN RANKING - 王者ページ
   現王者グリッド + 階級ごとに開閉する歴代タイムライン
======================================== */

/* ----------------------------------------
   BASE & LAYOUT
---------------------------------------- */
#main-content {
  padding-top: 20px;
  min-height: 100vh;
  position: relative;
}

#main-content > .container {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

#main-content a {
  text-decoration: none;
}

/* ----------------------------------------
   PAGE HEADER
---------------------------------------- */
.champions-header {
  margin-bottom: 1.5rem;
  position: relative;
}

.champions-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary, #fff);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  padding-bottom: 0.5rem;
}

.title-crown {
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6));
}

.header-accent {
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg,
    var(--rizin-red) 0%,
    var(--rizin-gold) 50%,
    transparent 100%);
  border-radius: 2px;
}

.champions-subtitle {
  color: var(--text-secondary, rgba(255, 255, 255, 0.65));
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}

/* ----------------------------------------
   CHAMPIONS GRID
   dense: 全幅パネルを開いても行内のカード詰めが崩れない
---------------------------------------- */
.champ-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: row dense;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .champ-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 992px) {
  .champ-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ----------------------------------------
   CHAMPION CARD (compact)
---------------------------------------- */
.champ-grid-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 16px;
  border: 1px solid rgba(255, 215, 0, 0.4);
  background: linear-gradient(135deg,
    rgba(30, 25, 10, 0.85) 0%,
    rgba(15, 12, 20, 0.9) 60%,
    rgba(35, 10, 14, 0.85) 100%);
  padding: 0.9rem 0.75rem 0.75rem;
  overflow: hidden;
}

.champ-card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at top left,
    rgba(255, 215, 0, 0.12) 0%,
    transparent 55%);
}

.grid-card-weight {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary, #fff);
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
  position: relative;
}

.grid-card-weight .weight-limit {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
}

.grid-champ-photo {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--rizin-gold);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.35);
  background: #111;
}

.grid-champ-gen {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rizin-gold);
  letter-spacing: 0.12em;
  margin-top: 0.55rem;
  position: relative;
}

.grid-champ-gen + .fighter-link .grid-champ-name {
  margin-top: 0.15rem;
}

.grid-champ-name {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  margin-top: 0.55rem;
}

.grid-crown {
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.7));
  flex-shrink: 0;
}

.fighter-link:hover .grid-champ-name,
.fighter-link:hover .past-name {
  color: var(--rizin-gold);
}

.grid-champ-reign,
.grid-champ-defense {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.75));
  font-size: 0.78rem;
  margin-top: 0.3rem;
  position: relative;
}

.grid-champ-defense i {
  color: var(--rizin-gold);
}

/* Open state: どの階級のパネルを開いているかカード側でも強調する */
.champ-grid-card.open {
  border-color: var(--rizin-gold);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.45),
              0 6px 20px rgba(230, 57, 70, 0.35);
}

.champ-grid-card.open .history-toggle {
  background: rgba(230, 57, 70, 0.25);
  color: #fff;
}

/* Vacant */
.champ-grid-card.vacant {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(15, 15, 22, 0.7);
}

.grid-vacant-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 1;
  padding: 0.9rem 0;
}

.vacant-icon {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.4);
}

.vacant-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.1em;
}

/* ----------------------------------------
   HISTORY TOGGLE BUTTON
---------------------------------------- */
.history-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: auto;
  padding: 0.35rem 0.8rem;
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 0, 0.35);
  background: rgba(10, 10, 20, 0.6);
  color: var(--rizin-gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.champ-grid-card > .history-toggle {
  margin-top: 0.7rem;
}

.history-toggle:hover,
.history-toggle:focus-visible {
  background: rgba(230, 57, 70, 0.25);
  color: #fff;
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.history-toggle .toggle-icon {
  transition: transform 0.2s ease;
}

.history-toggle[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

/* ----------------------------------------
   HISTORY PANEL (full-width, toggled)
---------------------------------------- */
.history-panel {
  grid-column: 1 / -1;
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255, 215, 0, 0.4);
  background: rgba(12, 12, 20, 0.75);
  padding: 1rem 1.25rem 1.25rem;
}

/* カード中央からパネルへ伸びる接続矢印(位置はJSが --arrow-left で指定) */
.history-panel::before {
  content: '';
  position: absolute;
  top: -10px;
  left: var(--arrow-left, 50%);
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid rgba(255, 215, 0, 0.6);
}

.history-panel-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary, #fff);
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem;
}

.history-panel-sub {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  letter-spacing: 0.08em;
}

.champ-memo {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin: 0 0 0.9rem;
  line-height: 1.5;
}

.champ-memo.current-memo {
  border-left: 3px solid rgba(255, 215, 0, 0.4);
  padding-left: 0.7rem;
}

/* ----------------------------------------
   PAST CHAMPIONS TIMELINE
---------------------------------------- */
.champ-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1rem;
  border-left: 2px solid rgba(255, 215, 0, 0.25);
}

.timeline-item {
  position: relative;
  padding: 0 0 1.25rem 1.25rem;
}

.timeline-item:last-child {
  padding-bottom: 0.25rem;
}

.timeline-marker {
  position: absolute;
  left: calc(-1.25rem - 6px);
  top: 24px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rizin-gold);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.timeline-content {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: rgba(15, 15, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.timeline-content:hover {
  border-color: rgba(255, 215, 0, 0.3);
  background: rgba(20, 20, 30, 0.75);
}

.past-photo {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: #111;
  flex-shrink: 0;
}

.timeline-info {
  min-width: 0;
  flex: 1;
}

.timeline-top-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.gen-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.past-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.past-defense {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--rizin-gold);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}

.past-reign {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.65));
  font-size: 0.83rem;
  margin-top: 0.25rem;
}

.past-memo {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  margin: 0.4rem 0 0;
  line-height: 1.5;
}

.past-memo.end-memo {
  color: rgba(230, 57, 70, 0.8);
}

/* ----------------------------------------
   EMPTY STATE
---------------------------------------- */
.champions-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  padding: 3rem 0;
}

/* ----------------------------------------
   RESPONSIVE
---------------------------------------- */
@media (max-width: 576px) {
  .champions-title {
    font-size: 1.4rem;
  }

  .grid-champ-photo {
    width: 68px;
    height: 68px;
  }

  .grid-champ-name {
    font-size: 0.9rem;
  }

  .history-panel {
    padding: 0.9rem 0.9rem 1rem;
  }

  .champ-timeline {
    padding-left: 0.5rem;
  }

  .timeline-item {
    padding-left: 0.9rem;
  }

  .timeline-marker {
    left: calc(-0.9rem - 6px);
  }
}
