/*
Theme Name: プレイクラブ
Theme URI: 
Author: 
Description: ブラウザゲーム投稿サイト用のオリジナルテーマ。カスタム投稿タイプ「ゲーム」でゲームを追加していけます。
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
*/

@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@500;700;800&family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* ==========================================================
   トークン(色・余白・角丸など)
   サイト全体の雰囲気を変えたい場合は、このセクションの値だけ
   書き換えれば全ページに反映されます。
   ========================================================== */
:root{
  --bg: #14141f;
  --surface: #1c1c2c;
  --surface-alt: #242438;
  --border: #33334a;

  --accent: #ff5c7a;       /* メインのアクセントカラー(ピンク) */
  --accent-soft: #ff5c7a26;
  --accent-2: #34e0d1;     /* サブのアクセントカラー(ミント) */

  --text: #f2f2f7;
  --text-muted: #9797ae;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;

  --max-width: 1120px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1.7;
}

h1,h2,h3,.logo{
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
}

a{ color: inherit; text-decoration: none; }

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

.wrap{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- ヘッダー ---------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20,20,31,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo{
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.main-nav{ display: flex; gap: 4px; }
.main-nav a{
  padding: 8px 14px;
  border-radius: var(--radius-s);
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color .15s, background .15s;
}
.main-nav a:hover, .main-nav a.active, .main-nav .current-menu-item a{
  color: var(--text);
  background: var(--surface-alt);
}

.nav-toggle{
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ---------------- タグバー ---------------- */
.tag-bar{
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}
.tag-bar .wrap{ padding: 12px 20px; display: flex; gap: 8px; }
.tag-chip{
  flex: none;
  padding: 5px 12px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface);
}
.tag-chip:hover{ border-color: var(--accent); color: var(--text); }

/* ---------------- ヒーロー ---------------- */
.hero{
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}
.hero h1{
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin: 0 0 12px;
  line-height: 1.4;
}
.hero p, .hero-desc{
  color: var(--text-muted);
  max-width: 46em;
  margin: 0;
}
.hero-desc p{ margin: 0 0 0.6em; }
.hero-desc p:last-child{ margin-bottom: 0; }
.hero .badge{
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 12px;
  font-size: 0.78rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------------- レイアウト(本文+サイドバー) ---------------- */
.layout{
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 36px;
  padding: 40px 20px 64px;
  align-items: start;
}
.section-title{
  font-size: 1.15rem;
  margin: 0 0 18px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}

/* ---------------- ゲームカードグリッド ---------------- */
.game-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.game-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: transform .15s, border-color .15s;
}
.game-card:hover{ transform: translateY(-3px); border-color: var(--accent); }
.game-card > a{ display: block; color: inherit; }
.game-card .thumb{
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--surface-alt), #10101a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  overflow: hidden;
}
.game-card .thumb img{ width: 100%; height: 100%; object-fit: cover; }
.game-card .body{ padding: 12px 14px 16px; }
.game-card h3{
  font-size: 0.98rem;
  margin: 0 0 6px;
}
.game-card .meta{
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}
.game-card .play-btn{
  margin-top: 10px;
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 8px 0;
  border-radius: var(--radius-s);
  background: var(--accent);
  color: #14141f;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ---------------- サイドバー ---------------- */
.widget{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 18px 18px 20px;
  margin-bottom: 22px;
}
.widget h2{
  font-size: 0.98rem;
  margin: 0 0 14px;
}
.rank-list{ list-style: none; margin: 0; padding: 0; }
.rank-list li{
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.86rem;
}
.rank-list li:last-child{ border-bottom: none; }
.rank-num{
  flex: none;
  width: 1.4em;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
}

.category-list{ list-style: none; margin: 0; padding: 0; }
.category-list li a{
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}
.category-list li:last-child a{ border-bottom: none; }
.category-list li a:hover{ color: var(--text); }
.category-list .count{ color: var(--text-muted); font-size: 0.8rem; }

/* 広告枠 ------------------------------------------------------
   ここにお使いの広告サービス(Google AdSense等)の配信タグを
   貼り付けてください。今は枠だけのプレースホルダーです。 */
.ad-slot{
  border: 1px dashed var(--border);
  border-radius: var(--radius-m);
  padding: 28px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 22px;
}

/* ---------------- ゲーム詳細ページ ---------------- */
.breadcrumb{
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 20px 0;
}
.breadcrumb a:hover{ color: var(--text); }
.game-stage{
  background: #000;
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
}
.game-stage iframe{ width: 100%; height: 100%; border: 0; }
.game-detail-head{ margin: 22px 0 10px; }
.game-detail-head h1{ font-size: 1.4rem; margin: 0 0 8px; }
.game-tags{ display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.game-desc{ color: var(--text-muted); margin-top: 16px; }
.game-desc p{ margin: 0 0 1em; }

/* 紹介ページ(プレイ前)の大きなサムネイル */
.intro-hero{
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface-alt), #10101a);
}
.intro-hero img{ width: 100%; height: 100%; object-fit: cover; }
.intro-hero-placeholder{
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.9rem;
}

/* 紹介ページの「プレイする」ボタン(カードの小さいボタンより大きめ) */
.play-btn-lg{
  display: inline-block;
  margin: 16px 0 22px;
  padding: 12px 30px;
  border-radius: var(--radius-s);
  background: var(--accent);
  color: #14141f;
  font-weight: 700;
  font-size: 1rem;
}
.play-btn-lg:hover{ opacity: 0.9; }

/* プレイページはやや横長で大きめに表示 */
.game-stage-play{ aspect-ratio: 16 / 9; }

/* スマホ(縦長画面)では、比率固定ではなく画面の高さに合わせて
   ゲームエリアを大きく表示する(iPhone12など縦長スマホを想定) */
@media (max-width: 600px){
  .game-stage-play{
    aspect-ratio: auto;
    height: calc(100svh - 190px);
    min-height: 360px;
  }
}

/* ---------------- グッドボタン ---------------- */
.like-widget{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 22px;
}
.like-btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.like-btn:hover{ border-color: var(--accent); }
.like-btn.is-liked{
  background: var(--accent);
  color: #14141f;
  border-color: var(--accent);
  cursor: default;
}
.like-btn:disabled{ opacity: 0.9; }
.like-count{ font-weight: 800; color: var(--accent); font-size: 1rem; }
.like-suffix{ font-size: 0.8rem; color: var(--text-muted); }

/* ---------------- コメント欄(SNS風) ---------------- */
.comments-area{
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.comments-title{
  font-size: 1.05rem;
  margin: 0 0 16px;
}
.comment-list{
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.comment-list .comment,
.comment-list .pingback,
.comment-list .trackback{
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}
.comment-list ol.children{
  list-style: none;
  margin: 0 0 0 52px;
  padding: 0;
}
.comment-list .avatar{
  border-radius: 50%;
  flex: none;
  background: var(--surface-alt);
}
.comment-body{ flex: 1; min-width: 0; }
.comment-author{ display: flex; align-items: baseline; gap: 8px; }
.comment-author .fn{
  font-style: normal;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}
.comment-author .says{ display: none; }
.comment-metadata{
  font-size: 0.76rem;
  color: var(--text-muted);
}
.comment-metadata a{ color: inherit; }
.comment-content p{
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}
.reply{ margin-top: 6px; }
.comment-reply-link{
  font-size: 0.78rem;
  color: var(--accent);
}
.no-comments{ color: var(--text-muted); font-size: 0.88rem; }

/* コメント投稿フォーム */
.comment-respond{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 18px 18px 20px;
}
.comment-reply-title{
  font-size: 1rem;
  margin: 0 0 14px;
}
.playclub-comment-form p{ margin: 0 0 12px; }
.comment-form-author input,
.comment-form-comment textarea{
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}
.comment-form-author input::placeholder,
.comment-form-comment textarea::placeholder{ color: var(--text-muted); }
.form-submit input[type="submit"]{
  padding: 10px 26px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--accent);
  color: #14141f;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.form-submit input[type="submit"]:hover{ opacity: 0.9; }

/* ---------------- フッター ---------------- */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.site-footer .wrap{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-links{ display: flex; gap: 16px; list-style: none; padding: 0; margin: 0; }
.footer-links a:hover{ color: var(--text); }

/* ---------------- レスポンシブ ---------------- */
@media (max-width: 860px){
  .layout{ grid-template-columns: 1fr; }
  .main-nav{
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 8px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .main-nav.open{ display: flex; }
  .nav-toggle{ display: block; }
}

/* スマホ(iPhone 12前後の画面幅)ではプレイ画面をできるだけ大きく表示 */
@media (max-width: 480px){
  .game-stage-play{
    aspect-ratio: auto;
    height: calc(100dvh - 170px);
    min-height: 360px;
  }
}


/* ---------------- ページ送りボタン(ゲーム一覧ページ) ----------------
   トップページ側の見た目は front-page.php の中に書いてあります */
.pagination{ margin: 36px 0 8px; }
.pagination .nav-links{
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px;
}
.pagination .page-numbers{
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; height: 52px; padding: 0 10px; box-sizing: border-box;
  border: 1px solid transparent; border-radius: 16px;
  background: none; color: var(--text); font-size: 1.15rem; font-weight: 500; line-height: 1;
}
.pagination a.page-numbers:hover{ background: var(--surface-alt); }
.pagination .page-numbers.current{ background: #0f0f17; border-color: var(--border); }
.pagination .page-numbers.dots{ font-size: 0; }
.pagination .page-numbers.dots::before{ content: "\2022\2022\2022"; font-size: .6rem; letter-spacing: 3px; }
.pagination .screen-reader-text{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- ホーム画面の文章(上・下共通) ---------------- */
.entry-text{ line-height: 1.85; }
.entry-text p{ margin: 0 0 1em; }
.entry-text p:last-child{ margin-bottom: 0; }
.entry-text h2, .entry-text h3, .entry-text h4{
  color: var(--text);
  font-size: 1.1rem;
  margin: 1.6em 0 0.6em;
}
.entry-text ul, .entry-text ol{ margin: 0 0 1em; padding-left: 1.4em; }
.entry-text a{ color: var(--accent); text-decoration: underline; }
.entry-text img{ border-radius: var(--radius-s); height: auto; }
.hero .entry-text h2, .hero .entry-text h3{ margin-top: 1.2em; }

/* ゲーム一覧の下に出る文章 */
.home-bottom{
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

/* ---------------- チャット / コメントの1件ぶん ---------------- */
.chat-item{
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}
.chat-avatar{
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}
.chat-body{ flex: 1; min-width: 0; }
.chat-head{ display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.chat-name{ font-weight: 700; font-size: 0.92rem; color: var(--text); }
.chat-time{ font-size: 0.76rem; color: var(--text-muted); }
.chat-text{ margin-top: 4px; font-size: 0.92rem; color: var(--text); line-height: 1.65; overflow-wrap: anywhere; }
.chat-text p{ margin: 0 0 0.5em; }
.chat-text p:last-child{ margin-bottom: 0; }
.chat-pending{ margin: 4px 0 0; font-size: 0.76rem; color: var(--accent-2); }

/* ホームのチャット:書き込み欄が上に来るので、一覧との間隔を調整 */
.is-home-chat .comment-respond{ margin-bottom: 22px; }
.is-home-chat .comment-list{ margin-bottom: 8px; }

/* いたずら対策の隠し入力欄(人間の画面には出さない) */
.hp-field{
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
