/* クリエイターエコノミー サイト - ダークモード モダン */

:root {
  /* 背景・ベース */
  --bg-primary: #0A0E1A;
  --bg-secondary: #131826;
  --bg-card: #1A2032;
  --bg-elevated: #232B3F;
  --bg-stripe: #1E2638;

  /* テキスト */
  --text-primary: #E8ECF4;
  --text-secondary: #A8B0C5;
  --text-muted: #6B7491;

  /* アクセント */
  --accent-primary: #6B8FF7;
  --accent-secondary: #4A6FE7;
  --accent-success: #5BD0A5;
  --accent-warning: #F0B95B;
  --accent-danger: #E87890;

  /* 業界色（ダークモード調整） */
  --color-manga: #5BA8E8;
  --color-anime: #F2A658;
  --color-music: #6BD088;

  /* セクション色 */
  --color-ip: #C58CF0;
  --color-people: #E8C26B;
  --color-episode: #E87090;
  --color-companies: #5BD0C8;
  --color-glossary: #8AA0C8;

  /* ボーダー・シャドウ */
  --border: #2A334A;
  --border-strong: #3A4560;
  --shadow-card: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.6);
  --radius: 10px;
  --radius-sm: 6px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Inter", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover {
  color: var(--accent-secondary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* ========== ナビゲーション ========== */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}
.site-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.site-header .brand {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 16px;
  white-space: nowrap;
}
.site-header a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.site-header a:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.site-header a.active {
  background: var(--accent-secondary);
  color: white;
}

/* ========== ページタイトル ========== */
.page-title {
  margin: 32px 0 8px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.page-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 800px;
}

/* ========== カード ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}
.card:hover {
  border-color: var(--border-strong);
}
.card-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.card-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ========== ヒーロー（トップページ用） ========== */
.hero {
  background: linear-gradient(135deg, #1E2A4A 0%, #2A1E4A 50%, #4A1E3A 100%);
  border: 1px solid var(--border);
  padding: 48px 40px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(107,143,247,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: 40px;
  margin-bottom: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  position: relative;
}
.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  position: relative;
  max-width: 720px;
}

/* ========== バッジ ========== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  margin-right: 8px;
  letter-spacing: 0.02em;
}
.badge-manga { background: var(--color-manga); }
.badge-anime { background: var(--color-anime); }
.badge-music { background: var(--color-music); }
.badge-ip { background: var(--color-ip); }
.badge-people { background: var(--color-people); color: #1A1A1A; }
.badge-episode { background: var(--color-episode); }
.badge-company { background: var(--color-companies); color: #1A1A1A; }

/* ========== セクションカードグリッド（トップページ） ========== */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: block;
}
.section-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  color: var(--text-primary);
}
.section-card.industry { border-left-color: var(--accent-primary); }
.section-card.ip { border-left-color: var(--color-ip); }
.section-card.people { border-left-color: var(--color-people); }
.section-card.episode { border-left-color: var(--color-episode); }
.section-card.company { border-left-color: var(--color-companies); }
.section-card.glossary { border-left-color: var(--color-glossary); }

.section-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
  font-weight: 700;
}
.section-card .meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.section-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== サブカード（ハブ用） ========== */
.subcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}
.subcard {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  display: block;
  transition: background 0.15s, border-color 0.15s;
}
.subcard:hover {
  background: var(--bg-card);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}
.subcard h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.subcard .desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========== テーブル ========== */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 14px;
  background: var(--bg-card);
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tbody tr:nth-child(even) {
  background: var(--bg-stripe);
}
tbody tr:hover {
  background: var(--bg-elevated);
}
tbody tr:last-child td {
  border-bottom: none;
}

/* ========== ハイライトボックス ========== */
.highlight {
  background: rgba(107, 143, 247, 0.08);
  border-left: 3px solid var(--accent-primary);
  padding: 14px 18px;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}
.highlight strong { color: var(--text-primary); }
.highlight.warning {
  background: rgba(240, 185, 91, 0.08);
  border-left-color: var(--accent-warning);
}
.highlight.success {
  background: rgba(91, 208, 165, 0.08);
  border-left-color: var(--accent-success);
}
.highlight.danger {
  background: rgba(232, 120, 144, 0.08);
  border-left-color: var(--accent-danger);
}

/* ========== Sankey/グラフコンテナ ========== */
.chart-container {
  width: 100%;
  height: 500px;
  margin: 16px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

/* ========== タイムライン ========== */
.timeline {
  border-left: 2px solid var(--border-strong);
  padding-left: 24px;
  margin: 16px 0;
}
.timeline-item {
  position: relative;
  margin-bottom: 24px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-primary);
}
.timeline-date {
  font-size: 13px;
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========== ブレッドクラム ========== */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin: 16px 0 8px;
}
.breadcrumb a {
  color: var(--text-secondary);
}
.breadcrumb a:hover {
  color: var(--accent-primary);
}
.breadcrumb-sep {
  margin: 0 8px;
  color: var(--text-muted);
}

/* ========== フッター ========== */
.footer {
  margin-top: 60px;
  padding: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ========== ユーティリティ ========== */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.4; }
h2 { font-size: 26px; margin: 32px 0 16px; }
h3 { font-size: 20px; margin: 24px 0 12px; }
h4 { font-size: 17px; margin: 16px 0 8px; }
p { margin: 8px 0; }
ul, ol { margin: 8px 0 16px 24px; }
li { margin: 4px 0; line-height: 1.7; }
strong { color: var(--text-primary); }

code {
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 13px;
  color: var(--accent-success);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.mb-0 { margin-bottom: 0; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.center { text-align: center; }

/* ========== レスポンシブ ========== */
@media (max-width: 768px) {
  .page-title { font-size: 28px; }
  .hero h1 { font-size: 28px; }
  .hero { padding: 32px 24px; }
  .container { padding: 16px 12px 60px; }
  .section-grid { grid-template-columns: 1fr; }
  .site-header-inner { gap: 4px; }
  .site-header a { font-size: 12px; padding: 4px 8px; }
}
