/* ========================================================
   Game MOD Portal - Clean Minimal White Theme
   設計方針:
   - 白・淡いグレーを基調とした極めて視認性の高いクリーンUI
   - 記事のテキストとゲーム画像が最優先で目に飛び込むタイポグラフィ
   - 広告バナーが自然に溶け込みつつ視認性を最大化する配置
======================================================== */

:root {
  --bg-main: #f8fafc;        /* 優しいオフホワイト背景 */
  --bg-card: #ffffff;        /* 純白カード背景 */
  --bg-sub: #f1f5f9;         /* 薄いグレー */
  --border-color: #e2e8f0;   /* 繊細な境界線 */
  --border-light: #edf2f7;

  --text-main: #1e293b;      /* 可読性の高いスレートブラック */
  --text-muted: #64748b;     /* サブテキスト（グレー） */
  --text-light: #94a3b8;

  --primary: #2563eb;        /* 信頼感のあるブルー */
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;

  --accent-green: #059669;   /* ダウンロード・成功色 */
  --accent-green-hover: #047857;

  --ad-bg: #f8fafc;          /* 広告枠背景 */
  --ad-border: #cbd5e1;
  --ad-tag-color: #94a3b8;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

/* リセット & 基本設定 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Hiragino Sans", "BIZ UDPGothic", Meiryo, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.75;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

/* ヘッダー */
.site-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo-icon {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

/* 広告バナー・枠デザイン（心理的黄金比） */
.top-ad-container {
  margin-top: 16px;
}

.ad-banner {
  background: var(--ad-bg);
  border: 1px dashed var(--ad-border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  position: relative;
  text-align: center;
  transition: all 0.2s ease;
}

.ad-banner:hover {
  border-color: var(--text-muted);
  background: #ffffff;
}

.ad-tag {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--ad-tag-color);
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 600;
}

.ad-content-placeholder {
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.ad-dummy-title {
  font-weight: 700;
  font-size: 1rem;
  color: #1e3a8a;
  margin-bottom: 4px;
}

.ad-dummy-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ad-text-highlight {
  font-weight: 700;
  font-size: 0.98rem;
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
  line-height: 1.5;
}

.ad-text-highlight:hover {
  color: #1e40af;
}

/* メインレイアウト（2カラム） */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding-top: 24px;
  padding-bottom: 60px;
}

/* ヒーローセクション */
.hero-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* セクション & カード一覧 */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.section-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* 記事カード（白背景・画像が主役） */
.card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
  overflow: hidden;
}

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

.card-item:hover .card-image {
  transform: scale(1.03);
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.card-content {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 10px;
}

.card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.card-link-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* サイドバー */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.widget-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.widget-list li {
  font-size: 0.88rem;
  line-height: 1.4;
}

.widget-date {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 2px;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--bg-sub);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
}

.sticky-widget {
  position: sticky;
  top: 80px;
}

/* ========================================================
   個別記事（post.html）専用スタイル
======================================================== */
.breadcrumb-container {
  padding-top: 16px;
}

.breadcrumbs {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.article-post {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.post-header {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 24px;
}

.post-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.category-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.post-date, .post-version {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.post-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 14px;
}

.post-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.post-featured-image-wrapper {
  margin-bottom: 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.post-featured-image {
  width: 100%;
  height: auto;
}

.article-ad-slot {
  margin-bottom: 32px;
}

/* 目次（TOC） */
.table-of-contents {
  background: var(--bg-sub);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 24px;
  margin-bottom: 36px;
}

.toc-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--text-main);
}

.table-of-contents ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 4px;
}

.table-of-contents a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

/* 記事本文タイポグラフィ（圧倒的に読みやすい設計） */
.post-content h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.post-content h2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--primary);
}

.post-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 28px;
  margin-bottom: 12px;
}

.post-content p {
  font-size: 1rem;
  color: #334155;
  margin-bottom: 20px;
  line-height: 1.85;
}

.post-content ul, .post-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
  color: #334155;
}

.post-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.post-content blockquote {
  background: #f8fafc;
  border-left: 4px solid #cbd5e1;
  padding: 14px 20px;
  margin-bottom: 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.post-content img {
  border-radius: var(--radius-md);
  margin: 24px 0;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.step-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
}

.step-num {
  display: inline-block;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 9999px;
  margin-bottom: 8px;
}

/* ★ダウンロードカード（最高CTR）★ */
.download-ad-slot {
  margin-top: 40px;
  margin-bottom: 24px;
}

.download-card {
  background: #ffffff;
  border: 2px solid #3b82f6;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 36px;
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.1);
  text-align: center;
}

.download-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 10px;
}

.download-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
}

.download-details {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.dl-detail-row {
  font-size: 0.88rem;
}

.dl-label {
  color: var(--text-muted);
  margin-right: 6px;
}

.dl-val {
  font-weight: 700;
  color: var(--text-main);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-large {
  padding: 16px 36px;
  font-size: 1.15rem;
}

.btn-primary {
  background: var(--accent-green);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
  background: var(--accent-green-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.4);
}

.dl-primary-group {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-secondary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-secondary:hover {
  background: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.creator-support-box {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dashed var(--border-color);
  background: #fffbeb;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  border: 1px solid #fde68a;
}

.support-text strong {
  display: block;
  font-size: 1rem;
  color: #92400e;
  margin-bottom: 6px;
}

.support-text p {
  font-size: 0.85rem;
  color: #78350f;
  margin-bottom: 14px;
  line-height: 1.6;
}

.btn-support {
  background: #f59e0b;
  color: #ffffff;
  padding: 12px 28px;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.btn-support:hover {
  background: #d97706;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.4);
}

.btn-icon {
  width: 22px;
  height: 22px;
}

.dl-notice {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.article-bottom-ad-slot {
  margin-top: 24px;
}

/* フッター */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 30px;
}

.footer-brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 0.88rem;
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

/* 一覧ページ検索バー */
.page-header-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.search-filter-bar {
  margin-top: 20px;
}

.search-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-main);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* レスポンシブ対応 */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .article-post {
    padding: 24px;
  }
  .post-title {
    font-size: 1.5rem;
  }
  .footer-inner {
    flex-direction: column;
  }
}
