@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --text-light: #86868b;
  --accent: #0071e3;
  --accent-hover: #0058b0;
  --border: #d2d2d7;
  --nav-bg: rgba(255,255,255,0.8);
  --shadow: 0 0 0 1px var(--border);
  --shadow-hover: 0 0 0 1px var(--border), 0 8px 24px rgba(0,0,0,0.1);
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* MAIN CONTAINER */
main {
  max-width: 1200px;
  margin: 1rem auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: calc(100vh - 80px);
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 2rem 0;
}
nav .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 1.5rem;
}
nav .logo {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}
nav .links { display: flex; gap: 2rem; }
nav .links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}
nav .links a:hover { color: var(--text); }
nav .links a.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* HERO */
.hero {
  text-align: left;
  padding: 3rem 2rem 1.5rem;
}
.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}
.hero p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* DASHBOARD GRID */
.dashboard {
  padding: 1rem 2rem 3rem;
}
.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}
.section-title .icon { font-size: 1.3rem; }
.category { margin-bottom: 2.5rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
  text-decoration: none;
  color: inherit;
  display: block;
  border: 1px solid var(--border);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
.card-body {
  padding: 1.25rem 1.25rem 1.5rem;
}
.card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.card-body p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.card-link {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }
.card-tag {
  display: none;
}

/* FAN PAGE */
.fan-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}
.fan-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
  border: 1px solid var(--border);
}
.fan-hero img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}
.fan-hero .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}
.fan-hero .overlay h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.fan-hero .overlay .subtitle {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  margin-top: 0.25rem;
  font-size: 0.95rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.info-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  border: 1px solid var(--border);
}
.info-box .label {
  color: var(--text-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
  font-weight: 500;
}
.info-box .value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
}

.content-section {
  margin-bottom: 2.5rem;
}
.content-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}
.content-section p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}
.content-section ul {
  list-style: none;
  padding: 0;
}
.content-section li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.92rem;
}
.content-section li strong {
  color: var(--text);
}

.fun-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.fact-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
}
.fact-card .emoji { font-size: 1.5rem; margin-bottom: 0.5rem; }
.fact-card h4 { margin-bottom: 0.3rem; font-size: 0.95rem; font-weight: 700; }
.fact-card p { color: var(--text-muted); font-size: 0.85rem; }

.fact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.fact-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  line-height: 1.6;
}
.fact-list li:last-child { border-bottom: none; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.back-link:hover { text-decoration: underline; }

/* QUOTE */
.quote-block {
  background: var(--bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
}
.quote-block .author {
  font-style: normal;
  color: var(--text);
  font-weight: 600;
  margin-top: 0.5rem;
  display: block;
}

/* PAGE INDEX */
.page-index {
  margin-bottom: 2.5rem;
}
.page-index h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.index-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.index-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  transition: box-shadow 0.25s, transform 0.25s;
}
.index-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.index-card img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  flex-shrink: 0;
}
.index-card-body {
  padding: 0.75rem 1rem 0.75rem 0;
}
.index-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.index-card-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* MOVIE LIST */
.movie-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.movie-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.movie-item:last-child { border-bottom: none; }
.movie-rank {
  font-weight: 700;
  color: var(--text-light);
  font-size: 0.85rem;
  min-width: 1.5rem;
  text-align: right;
}
.movie-info { flex: 1; }
.movie-info .movie-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}
.movie-info .movie-year {
  color: var(--text-light);
  font-size: 0.82rem;
}
.movie-info .movie-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.15rem;
}
.movie-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 0.15s;
}
.movie-rating:hover { opacity: 0.8; }
.movie-rating .star { color: #f59e0b; }
.movie-rating-rt {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #fce4e4;
  color: #b91c1c;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 0.15s;
}
.movie-rating-rt:hover { opacity: 0.8; }
.movie-ratings {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
}
.movie-rating-mc {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #d4edda;
  color: #155724;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 0.15s;
}
.movie-rating-mc:hover { opacity: 0.8; }
.movie-rating-mc.score-yellow { background: #fff3cd; color: #856404; }
.movie-rating-mc.score-red { background: #f8d7da; color: #721c24; }

/* CONSOLE TIMELINE */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-era {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  position: relative;
}
.timeline-era:first-child { margin-top: 0; }
.timeline-era::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.timeline-item {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: 1.2rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-light);
}
.timeline-item .tl-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.timeline-item .tl-name {
  font-weight: 700;
  font-size: 0.95rem;
}
.timeline-item .tl-year {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
  white-space: nowrap;
}
.timeline-item .tl-maker {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.timeline-item .tl-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.timeline-item .tl-sales {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  background: var(--bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* PLATFORM BADGE */
.platform-switch {
  display: inline-block;
  background: #e60012;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.movie-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.movie-section-title:first-child { margin-top: 0; }

/* STATS TABLE */
.stats-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.stats-table thead {
  background: var(--bg);
}
.stats-table th {
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.stats-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.stats-table tbody tr:last-child td { border-bottom: none; }
.stats-table tbody tr:hover { background: var(--bg); }
.champion-row td {
  background: #fef3c7;
  color: var(--text);
  font-weight: 600;
}
.champion-row:hover td { background: #fde68a; }

/* RETIRED NUMBERS */

/* TABS */
.tab-container {
  margin-bottom: 1.5rem;
}
.tab-buttons {
  display: flex;
  gap: 0;
  margin-bottom: 0;
}
.tab-btn {
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  font-family: inherit;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--accent);
  background: var(--surface);
  border-bottom: 2px solid var(--surface);
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}
.tab-panel > .stats-table-wrap {
  border-radius: 0 var(--radius) var(--radius) var(--radius);
}

/* RETIRED NUMBERS */
.retired-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.retired-number {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
.retired-number .number {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  min-width: 2rem;
}
.retired-number .player-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 1.5rem; }
  .fan-hero .overlay h1 { font-size: 1.5rem; }
  .cards { grid-template-columns: 1fr; }
  nav .links { gap: 1rem; }
  nav .links a { font-size: 0.8rem; }
}
