/* ============================================================
   style-modern-global.css  —  夢主サイト全体共通スタイルシート
   ライトモード / ファンタジー・エレガント
   ============================================================ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Noto+Serif+JP:wght@300;400;500;700&display=swap');

/* ─── デザイントークン (CSS変数) ─── */
:root {
  /* 背景とベース */
  --bg-base:        #fcfaf7; /* 暖かみのあるアイボリー */
  --bg-card:        #ffffff; /* 純白カード */
  --bg-card-alt:    #fdfbf9;
  
  /* テキストカラー */
  --text-primary:   #2c1f30; /* 深い紫がかった焦げ茶 */
  --text-secondary: #5a4b5e; 
  --text-muted:     #8c7e90;
  --text-white:     #ffffff;

  /* アクセントカラー (ミントグリーン系) */
  --accent:         #006D4D;
  --accent-light:   rgba(0, 109, 77, 0.06);
  --accent-border:  rgba(0, 109, 77, 0.2);

  /* サブアクセント (ペールピンク系) */
  --pink-accent:     #ffb7c5;
  --pink-light:      #fff0f5;
  --pink-border:     #ffe4e1;
  --pink-table-bg:   #ffeef2;

  /* ブルーアクセント (苦手テーブル用) */
  --blue-accent:     #87cefa;
  --blue-light:      #eef9ff;
  --blue-border:     #ccf0ff;

  /* ボーダーとシャドウ */
  --border-color:   #e6dfd5;
  --shadow-sm:      0 2px 8px rgba(44, 31, 48, 0.04);
  --shadow-md:      0 8px 24px rgba(44, 31, 48, 0.06);
  --shadow-lg:      0 12px 36px rgba(44, 31, 48, 0.1);

  /* フォント定義 */
  --font-ja:        'Noto Serif JP', 'Hiragino Mincho ProN', serif;
  --font-en:        'Cinzel', serif;

  /* 角丸 */
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;

  /* アニメーション */
  --transition:     all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ─── リセット ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-ja);
  line-height: 1.8;
  font-size: 15px;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* リンク */
a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: #ff69b4; /* ホバー時はふんわりピンク */
}

/* 汎用コンテナ */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ============================================================
   共通コンポーネント (カード、見出し、ボタン)
   ============================================================ */

/* カード */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

/* タイトル見出し */
.page-title {
  text-align: center;
  font-family: var(--font-en);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.page-subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 40px;
}

/* セクション見出し */
h2.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  margin: 32px 0 20px;
  letter-spacing: 0.05em;
}
h2.section-title:first-of-type {
  margin-top: 0;
}

/* サブ見出し */
h3.subsection-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 20px 0 10px;
}

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-ja);
}
.btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-white);
}
.btn-primary:hover {
  background: #00563b;
  border-color: #00563b;
  color: var(--text-white);
}

/* コピーツールチップ用のスタイル */
.copy-area {
  position: relative;
  display: inline-flex;
  width: 100%;
}

.tooltip {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--text-primary);
  color: var(--text-white);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.tooltip.show {
  opacity: 0.9;
}

/* ============================================================
   1. クッションページ (index.html) 固有スタイル
   ============================================================ */
.gate-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.gate-card {
  max-width: 520px;
  width: 100%;
  text-align: center;
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.8s ease;
}

.gate-logo {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto 20px;
}

.gate-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 30px;
  padding: 0 10px;
}

.gate-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================
   2. トップページ (top.html) 固有スタイル
   ============================================================ */
.top-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* 左カラム (ナビゲーション・ロゴ・ミニドット) */
.top-left-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.top-logo-card {
  padding: 20px;
  text-align: center;
}
.top-logo-img {
  width: 100%;
  max-width: 200px;
  height: auto;
}

.top-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.top-nav-btn:hover,
.top-nav-btn:active {
  background-color: var(--accent-light);
}

.btn-label {
  display: block;
  font-family: var(--font-en);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-align: center;
}

.top-nav-btn:hover .btn-label,
.top-nav-btn:active .btn-label {
  color: var(--accent);
}

.top-nav-btn:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

/* ミニドットマスコット */
.mascot-card {
  padding: 20px;
  text-align: center;
}
.mascot-area {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  overflow: hidden;
}
.mascot-area img {
  max-width: 90px;
  max-height: 90px;
  object-fit: contain;
}
.mascot-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* 右カラム (メインイラスト・更新履歴) */
.top-right-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.main-illust-card {
  padding: 0;
  text-align: center;
  background: none;
  border: none;
  box-shadow: none;
  margin-top: -14px;
}
.main-illust-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* 更新履歴 */
.news-card {
  padding: 24px 30px;
  margin-top: -15px;
}
.news-header {
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.news-list {
  height: 180px;
  overflow-y: auto;
  padding-right: 10px;
  font-size: 0.82rem;
  line-height: 2;
  scrollbar-width: thin;
}
.news-list::-webkit-scrollbar {
  width: 4px;
}
.news-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}
.news-item {
  display: flex;
  border-bottom: 1px dashed var(--border-color);
  padding: 8px 0;
}
.news-date {
  width: 100px;
  flex-shrink: 0;
  color: var(--accent);
  font-family: var(--font-en);
  font-weight: 600;
}
.news-text {
  color: var(--text-secondary);
}

/* ============================================================
   3. 必読ページ (first.html) 固有スタイル
   ============================================================ */
.first-section {
  margin-bottom: 40px;
}
.first-intro {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 2;
}

/* 好き・嫌いテーブル */
.first-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
}

.table-like, .table-dislike {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
}

.table-like th {
  background-color: var(--pink-accent);
  color: var(--text-white);
  padding: 10px;
}
.table-like td {
  background-color: var(--pink-light);
  padding: 14px;
  color: var(--text-secondary);
}

.table-dislike th {
  background-color: var(--blue-accent);
  color: var(--text-white);
  padding: 10px;
}
.table-dislike td {
  background-color: var(--blue-light);
  padding: 14px;
  color: var(--text-secondary);
}

/* リンク紹介カード */
.link-info-card {
  background: var(--bg-card-alt);
  border: 1px dashed var(--accent-border);
  padding: 24px;
  border-radius: var(--radius-md);
  margin-top: 20px;
}
.link-info-item {
  display: flex;
  margin-bottom: 12px;
  align-items: center;
}
.link-info-lbl {
  width: 100px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent);
}
.link-info-val {
  flex: 1;
}

.copy-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 0.8rem;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}
.copy-input:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* フッターボタン */
.first-footer {
  text-align: center;
  margin-top: 40px;
}

/* ============================================================
   4. ゲーム紹介ページ (gamepage.html) 固有スタイル
   ============================================================ */
.game-grid {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.game-card {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 30px;
  padding: 24px;
}

/* スクリーンショットエリア (2×2グリッド) */
.game-ss-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.game-ss-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: zoom-in;
}
.game-ss-img:hover {
  transform: scale(1.04);
}

.game-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.game-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.game-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}
.game-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.game-meta-list {
  font-size: 0.82rem;
  background: var(--bg-base);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.game-meta-item {
  margin-bottom: 6px;
}
.game-meta-item:last-child {
  margin-bottom: 0;
}
.game-meta-lbl {
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 6px;
}
.game-meta-val {
  color: var(--text-primary);
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.pw-copy-btn {
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}
.pw-copy-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 820px) {
  .top-layout {
    grid-template-columns: 1fr;
  }
  /* パネルの箱自体を消して、中のカードを直接 .top-layout の並び替え対象にする */
  .top-left-panel,
  .top-right-panel {
    display: contents;
  }
  .top-logo-card    { order: 1; }
  .top-nav-menu     { order: 2; }
  .main-illust-card { order: 3; }
  .news-card        { order: 4; }
  .mascot-card      { order: 5; }

  .top-nav-menu {
    grid-template-columns: 1fr 1fr;
    display: grid;
  }
  
  .game-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .game-ss-grid {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .top-layout {
    padding: 14px 12px;
    gap: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "logo   mascot"
      "nav    nav"
      "illust illust"
      "news   news";
  }
  /* このページのカードは詰めて表示（他ページの.cardには影響しません） */
  .top-layout .card {
    margin-bottom: 0;
  }

  .top-logo-card {
    grid-area: logo;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    margin-right: 10px;
    background: none;
    border: none;
    box-shadow: none;
  }
  .top-logo-img {
    max-width: 150px;
  }

  .mascot-card {
    grid-area: mascot;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    justify-self: start;
    background: none;
    border: none;
    box-shadow: none;
  }
  .mascot-area {
    width: 60px;
    height: 60px;
    margin-bottom: 0;
  }
  .mascot-area img {
    max-width: 52px;
    max-height: 52px;
  }
  .mascot-label {
    display: none; /* 横並びだと窮屈なので省略 */
  }

  .top-nav-menu {
    grid-area: nav;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .top-nav-btn {
    height: 44px;
  }
  .top-nav-btn:hover,
  .top-nav-btn:active {
    background-color: var(--accent-light);
    border-color: var(--accent);
  }
  .btn-label {
    font-size: 0.72rem;
    letter-spacing: 0;
    line-height: 1.15;
  }

  .main-illust-card {
    grid-area: illust;
    padding: 4px;
    background: none;
    border: none;
    box-shadow: none;
    margin-top: 0;
  }
  .main-illust-img {
    max-height: 200px;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
  }

  .news-card {
    grid-area: news;
    padding: 10px 14px;
  }
  .news-header {
    font-size: 0.85rem;
    margin-bottom: 8px;
    padding-bottom: 6px;
  }
  .news-list {
    height: 110px;
    font-size: 0.74rem;
    line-height: 1.7;
  }
  .news-date {
    width: 76px;
    font-size: 0.7rem;
  }

  .first-grid {
    grid-template-columns: 1fr;
  }
  .page-title {
    font-size: 1.7rem;
  }
  .gate-card {
    padding: 30px 20px;
  }
}

/* フェードインアニメーション */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
