/* ============================================
   article.css - NEXT TITLEs 記事ページ用CSS
   ============================================ */

/* ---------- 変数（既存style.cssの変数に合わせる） ---------- */
:root {
  --article-max-width: 1200px;
  --article-bg:        #1a1a2e;
  --article-surface:   #16213e;
  --article-border:    #0f3460;
  --article-accent:    #e94560;
  --article-text:      #e0e0e0;
  --article-muted:     #8892a4;
  --article-link:      #4fc3f7;
  --article-badge-sale:   #e94560;
  --article-badge-genre:  #7b61ff;
  --article-badge-price:  #00bcd4;
  --article-badge-manual: #4caf50;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

body.article-body {
  background: var(--article-bg);
  color: var(--article-text);
  font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  line-height: 1.8;
  margin: 0;
  padding: 0;
}

/* ---------- ヘッダー ---------- */
.site-header {
  background: var(--article-surface);
  border-bottom: 1px solid var(--article-border);
  position: static;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo img {
  height: 36px;
  display: block;
}
.header-nav {
  display: flex;
  gap: 24px;
}
.header-nav a {
  color: var(--article-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}
.header-nav a:hover,
.header-nav a.active {
  color: var(--article-accent);
}

/* ---------- 記事一覧：ヒーロー ---------- */
.articles-hero {
  text-align: center;
  padding: 60px 20px 40px;
}
.articles-hero h1 {
  font-size: clamp(24px, 4vw, 36px);
  margin: 0 0 10px;
  color: #fff;
}
.articles-hero p {
  color: var(--article-muted);
  margin: 0;
  font-size: 15px;
}

/* ---------- フィルターバー ---------- */
.articles-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 0 20px 32px;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--article-border);
  background: var(--article-surface);
  color: var(--article-muted);
  text-decoration: none;
  font-size: 13px;
  transition: all .2s;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--article-accent);
  border-color: var(--article-accent);
  color: #fff;
}

/* ---------- 記事グリッド ---------- */
.articles-main {
  min-height: calc(100vh - 60px);
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 60px;
}
.article-card {
  background: var(--article-surface);
  border: 1px solid var(--article-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--article-accent);
  box-shadow: 0 8px 24px rgba(233,69,96,.2);
}
.article-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--article-border);
  overflow: hidden;
}
.article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 32px;
}
.article-card-thumb-placeholder span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: .7;
}
/* タイプ別グラデーション */
.placeholder-sale_picks    { background: linear-gradient(135deg, #7b1fa2 0%, #e91e63 100%); }
.placeholder-genre_summary { background: linear-gradient(135deg, #1565c0 0%, #00bcd4 100%); }
.placeholder-price_report  { background: linear-gradient(135deg, #00695c 0%, #76ff03 100%); color: #000; }
.placeholder-manual        { background: linear-gradient(135deg, #37474f 0%, #78909c 100%); }
.article-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.article-card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1.5;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-desc {
  font-size: 13px;
  color: var(--article-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.article-card-date {
  font-size: 12px;
  color: var(--article-muted);
  margin-top: auto;
}

/* ---------- 記事タイプバッジ ---------- */
.article-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: var(--article-badge-sale);
  color: #fff;
  z-index: 1;
}
.article-header .article-type-badge {
  position: static;
  display: inline-block;
  margin-bottom: 12px;
}

/* ---------- 空状態 ---------- */
.articles-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--article-muted);
}
.articles-empty p { margin-bottom: 24px; }
.btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: var(--article-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
}

/* ---------- ページング ---------- */
.articles-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 20px 60px;
}
.pager-btn {
  padding: 10px 24px;
  background: var(--article-surface);
  border: 1px solid var(--article-border);
  border-radius: var(--radius-sm);
  color: var(--article-text);
  text-decoration: none;
  transition: border-color .2s;
}
.pager-btn:hover { border-color: var(--article-accent); color: var(--article-accent); }
.pager-info { color: var(--article-muted); font-size: 14px; }

/* ============================================
   記事個別ページ
   ============================================ */
.article-main {
  min-height: calc(100vh - 60px);
  padding: 40px 20px 80px;
}
.article-container {
  max-width: var(--article-max-width);
  margin: 0 auto;
}

/* パンくず */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--article-muted);
  margin-bottom: 32px;
}
.breadcrumb a { color: var(--article-link); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--article-muted); }

/* 記事ヘッダー */
.article-header {
  margin-bottom: 32px;
}
.article-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 900;
  line-height: 1.4;
  color: #fff;
  margin: 0 0 16px;
}
.article-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--article-muted);
  margin-bottom: 16px;
}
.article-lead {
  font-size: 16px;
  color: var(--article-muted);
  border-left: 3px solid var(--article-accent);
  padding-left: 16px;
  margin: 0;
}

/* サムネイル */
.article-thumbnail {
  margin-bottom: 40px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.article-thumbnail img {
  width: 100%;
  display: block;
}

/* 本文 */
.article-body-content {
  font-size: 16px;
  line-height: 1.9;
  color: var(--article-text);
}
.article-body-content h2 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  border-bottom: 2px solid var(--article-accent);
  padding-bottom: 8px;
  margin: 48px 0 20px;
}
.article-body-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #e0e0e0;
  margin: 36px 0 16px;
}
.article-body-content p { margin: 0 0 20px; }
.article-body-content a { color: var(--article-link); }
.article-body-content ul,
.article-body-content ol {
  padding-left: 24px;
  margin: 0 0 20px;
}
.article-body-content li { margin-bottom: 8px; }
.article-body-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 14px;
}
.article-body-content th,
.article-body-content td {
  border: 1px solid var(--article-border);
  padding: 10px 14px;
  text-align: left;
}
.article-body-content th {
  background: var(--article-surface);
  color: #fff;
  font-weight: 700;
}
.article-body-content tr:nth-child(even) td { background: rgba(255,255,255,.03); }

/* ゲームカード（記事内埋め込み用） */
.game-card-inline {
  display: flex;
  gap: 16px;
  background: var(--article-surface);
  border: 1px solid var(--article-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.game-card-inline:hover {
  border-color: var(--article-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233,69,96,.15);
}
.game-card-inline img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.game-card-inline-info { flex: 1; min-width: 0; }
.game-card-inline-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.game-card-inline-info h4 { margin: 0 0 6px; color: #fff; font-size: 15px; }
.game-card-inline-price { color: var(--article-accent); font-weight: 700; font-size: 16px; }
.game-card-inline-sale  { color: #ffd700; font-size: 12px; margin-left: 8px; }
.game-card-inline-meta  { color: var(--article-muted); font-size: 13px; margin-top: 4px; }
.game-card-inline-sub   { color: var(--article-muted); font-size: 12px; }

/* シェアボタン */
.article-share {
  margin: 48px 0 32px;
  padding: 24px;
  background: var(--article-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--article-border);
  text-align: center;
}
.share-label {
  font-size: 14px;
  color: var(--article-muted);
  margin: 0 0 14px;
}
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.share-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity .2s;
}
.share-btn:hover { opacity: .85; }
.share-x    { background: #000; color: #fff; }
.share-line { background: #06c755; color: #fff; }
.share-fb   { background: #1877f2; color: #fff; }
.share-hatena { background: #00A4DE; color: #fff; }
.share-copy { background: var(--article-border); color: #fff; }

/* CTA */
.article-cta {
  margin: 0 0 40px;
  text-align: center;
}
.cta-btn {
  display: inline-block;
  padding: 16px 36px;
  background: var(--article-accent);
  color: #fff;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  transition: opacity .2s;
}
.cta-btn:hover { opacity: .85; }

/* 戻るリンク */
.article-back {
  padding-top: 20px;
  border-top: 1px solid var(--article-border);
}
.article-back a { color: var(--article-link); text-decoration: none; font-size: 14px; }
.article-back a:hover { text-decoration: underline; }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--article-surface);
  border-top: 1px solid var(--article-border);
  padding: 24px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--article-muted);
}
.footer-inner nav {
  margin-top: 10px;
  display: flex;
  gap: 20px;
  justify-content: center;
}
.footer-inner nav a { color: var(--article-muted); text-decoration: none; }
.footer-inner nav a:hover { color: var(--article-text); }

/* ---------- モバイル ---------- */
@media (max-width: 600px) {
  .articles-grid { grid-template-columns: 1fr; }
  .article-meta  { flex-direction: column; gap: 4px; }
  .share-buttons { flex-direction: column; }
  .share-btn     { width: 100%; text-align: center; }
}

/* ジャンル絞り込み */
.articles-genre-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding: 0 20px 20px;
}
.genre-filter-label {
    font-size: 13px;
    color: var(--article-muted);
    white-space: nowrap;
}
.genre-filter-select {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--article-border);
    background: var(--article-surface);
    color: var(--article-text);
    font-size: 13px;
    cursor: pointer;
    min-width: 160px;
}
.genre-filter-select:focus {
    outline: none;
    border-color: var(--article-accent);
}
/* ============================================
   おすすめアクセサリー カルーセル（game.phpと共通）
   ============================================ */
.related-accessories {
    background: var(--article-surface);
    border: 1px solid var(--article-border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 40px 0 32px;
    overflow: hidden;
}
.related-accessories h2 {
    font-size: 16px;
    color: #fff;
    margin: 0 0 16px 0;
}
.acc-carousel {
    position: relative;
}
.acc-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 112, 209, 0.85);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 2;
    transition: background 0.15s, transform 0.15s;
}
.acc-scroll-btn:hover {
    background: rgba(0, 112, 209, 1);
    transform: translateY(-50%) scale(1.1);
}
.acc-scroll-left { left: -16px; }
.acc-scroll-right { right: -16px; }
.acc-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 28px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.acc-grid::-webkit-scrollbar { height: 6px; }
.acc-grid::-webkit-scrollbar-track { background: transparent; }
.acc-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
.acc-card {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, transform 0.15s;
    border: 1px solid rgba(255,255,255,0.05);
    scroll-snap-align: start;
}
.acc-card:hover {
    background: rgba(255,255,255,0.07);
    transform: translateY(-2px);
    text-decoration: none;
}
.acc-img-wrap {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: #222;
    margin-bottom: 8px;
}
.acc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.acc-name {
    font-size: 11px;
    color: #ccc;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    flex: 1;
}
.acc-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--article-link);
    font-family: 'Roboto', sans-serif;
}

/* モバイル対応 */
@media (max-width: 600px) {
    .acc-card { flex: 0 0 140px; }
    .related-accessories { padding: 16px; }
    .acc-scroll-btn { width: 34px; height: 34px; font-size: 16px; }
    .acc-scroll-left { left: -8px; }
    .acc-scroll-right { right: -8px; }
    .acc-grid { padding: 0 20px 8px; }
}