/* ============================================================
   ゲームカードウィジェット専用スタイル
   デザイン参考: PCパーツ見積ラボ「ゲームスペック管理」プラグイン
   ============================================================ */

/* ---------- ゲームカードセクション背景 ---------- */
.game-cards-section {
  background: linear-gradient(180deg, #0d1b2e 0%, #0a1628 100%);
  padding: 56px 0 64px;
  position: relative;
  overflow: hidden;
}
.game-cards-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 50%, rgba(0,201,167,.05) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(15,108,191,.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ---------- セクションヘッダー ---------- */
.game-cards-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 16px;
}
.game-cards-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .03em;
}
.game-cards-title-bar {
  width: 4px; height: 24px;
  background: linear-gradient(180deg, #00c9a7, #0f6cbf);
  border-radius: 2px;
  flex-shrink: 0;
}
.game-cards-title-icon {
  font-size: 22px;
}
.game-cards-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  font-weight: 500;
  margin-top: 4px;
}
.game-cards-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,201,167,.1);
  border: 1px solid rgba(0,201,167,.25);
  color: #00c9a7;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ---------- ゲームカードグリッド ---------- */
.game-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ---------- ゲームカード本体 ---------- */
.game-card {
  background: linear-gradient(145deg, #162032 0%, #0f1a2b 100%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.04) 0%, transparent 60%);
  pointer-events: none;
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(0,0,0,.45), 0 0 0 1px rgba(0,201,167,.15);
  border-color: rgba(0,201,167,.2);
}

/* ---------- カード上部：サムネイルエリア ---------- */
.game-card-thumb {
  position: relative;
  width: 100%;
  height: 160px;
  background: #0a1220;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.game-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}
.game-card:hover .game-card-thumb img {
  transform: scale(1.04);
}
/* 画像未設定時のプレースホルダ */
.game-card-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a1628 0%, #131f30 100%);
}
.game-card-thumb-placeholder .placeholder-emoji {
  font-size: 48px;
  opacity: .5;
}
.game-card-thumb-placeholder .placeholder-text {
  font-size: 12px;
  color: rgba(255,255,255,.35);
  font-weight: 500;
}
.game-card-thumb-placeholder .placeholder-appid {
  font-size: 11px;
  color: rgba(255,255,255,.2);
}
/* サムネイルオーバーレイグラデーション */
.game-card-thumb::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(0deg, #0f1a2b 0%, transparent 100%);
  pointer-events: none;
}
/* Steam → ボタン（右上） */
.game-card-steam-mini {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(10,18,32,.75);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  backdrop-filter: blur(6px);
  transition: background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.game-card-steam-mini:hover {
  background: rgba(28,100,168,.85);
  border-color: rgba(100,180,255,.35);
  color: #fff;
}
.game-card-steam-mini i { font-size: 10px; }

/* ---------- カード情報エリア ---------- */
.game-card-info {
  padding: 16px 18px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* タイトル行 */
.game-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.game-card-title {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  letter-spacing: .02em;
}
/* バージョン対応バッジ */
.game-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: rgba(0,200,100,.12);
  border: 1px solid rgba(0,200,100,.3);
  color: #4ade80;
  font-size: 10px;
  font-weight: 800;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: .03em;
}
.game-version-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

/* ジャンルサブタイトル */
.game-card-genre {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  font-weight: 500;
  margin-bottom: 14px;
  letter-spacing: .03em;
}

/* ---------- 記事リンクリスト ---------- */
.game-card-articles {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.game-card-article-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  text-decoration: none;
  transition: background .15s;
  cursor: pointer;
  border-radius: 0;
  margin: 0 -18px;
  padding-left: 18px;
  padding-right: 14px;
}
.game-card-article-item:last-child {
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.game-card-article-item:hover {
  background: rgba(255,255,255,.04);
}
/* 記事アイコン */
.article-item-icon {
  font-size: 15px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  opacity: .8;
}
/* 記事タイトル */
.article-item-title {
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,.8);
  line-height: 1.4;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-card-article-item:hover .article-item-title {
  color: #fff;
}
/* コピペ・ツールバッジ */
.article-item-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: .03em;
}
.badge-copypaste {
  background: #ea580c;
  color: #fff;
}
.badge-tool {
  background: #d97706;
  color: #fff;
}
.badge-guide {
  background: rgba(15,108,191,.8);
  color: #fff;
}
.badge-new {
  background: #dc2626;
  color: #fff;
}
/* 矢印 */
.article-item-arrow {
  color: rgba(255,255,255,.3);
  font-size: 11px;
  flex-shrink: 0;
  transition: color .2s, transform .2s;
}
.game-card-article-item:hover .article-item-arrow {
  color: #00c9a7;
  transform: translateX(2px);
}

/* ---------- スペックドロップダウン ---------- */
.game-card-spec {
  margin: 0 -18px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.game-card-spec-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 18px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.55);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  transition: color .2s, background .2s;
  letter-spacing: .03em;
}
.game-card-spec-toggle:hover {
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.03);
}
.game-card-spec-toggle.open {
  color: #00c9a7;
}
.spec-toggle-icon {
  font-size: 13px;
}
.spec-toggle-label { flex: 1; }
.spec-toggle-arrow {
  font-size: 10px;
  transition: transform .3s;
  flex-shrink: 0;
}
.game-card-spec-toggle.open .spec-toggle-arrow {
  transform: rotate(180deg);
}

/* スペック内容（アコーディオン） */
.game-card-spec-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s cubic-bezier(.4,0,.2,1), opacity .3s;
  opacity: 0;
}
.game-card-spec-body.open {
  max-height: 600px;
  opacity: 1;
}
.spec-body-inner {
  padding: 4px 18px 14px;
}
/* 最小/推奨 タブ */
.spec-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.spec-tab {
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.12);
  background: transparent;
  color: rgba(255,255,255,.45);
  transition: background .2s, color .2s, border-color .2s;
  font-family: inherit;
}
.spec-tab.active {
  background: rgba(15,108,191,.25);
  border-color: rgba(15,108,191,.5);
  color: #60a5fa;
}
/* スペック行 */
.spec-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.spec-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 11.5px;
  line-height: 1.5;
}
.spec-label {
  color: rgba(255,255,255,.4);
  font-weight: 600;
  letter-spacing: .04em;
  padding-top: 1px;
  white-space: nowrap;
}
.spec-value {
  color: rgba(255,255,255,.8);
  font-weight: 500;
}
.spec-row.highlight .spec-value {
  color: #fbbf24;
  font-weight: 700;
}
/* スペックなし */
.spec-empty {
  font-size: 12px;
  color: rgba(255,255,255,.3);
  text-align: center;
  padding: 12px 0;
}

/* ---------- Steamストアボタン ---------- */
.game-card-steam-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% + 36px);
  margin: 0 -18px;
  padding: 13px 18px;
  background: rgba(28,72,128,.55);
  border: none;
  border-top: 1px solid rgba(255,255,255,.07);
  color: rgba(255,255,255,.75);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s;
  letter-spacing: .02em;
  margin-top: auto;
  flex-shrink: 0;
}
.game-card-steam-btn i {
  font-size: 14px;
  opacity: .7;
  transition: opacity .2s;
}
.game-card-steam-btn:hover {
  background: rgba(28,100,168,.75);
  color: #fff;
}
.game-card-steam-btn:hover i { opacity: 1; }

/* ---------- カード底部パディング調整 ---------- */
.game-card-info-bottom {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ---------- カスタマイズパネル（管理者向け） ---------- */
.game-cards-admin-panel {
  background: #0d1b2e;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  margin-top: 32px;
  overflow: hidden;
}
.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
  transition: background .2s;
}
.admin-panel-header:hover { background: rgba(255,255,255,.07); }
.admin-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.75);
}
.admin-panel-body {
  padding: 20px;
}

/* ゲーム選択グリッド（カスタマイズ用） */
.game-select-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.game-slot {
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  font-size: 11px;
  color: rgba(255,255,255,.4);
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.game-slot:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(0,201,167,.3);
  color: rgba(255,255,255,.7);
}
.game-slot.filled {
  background: rgba(0,201,167,.08);
  border-color: rgba(0,201,167,.25);
  border-style: solid;
  color: #00c9a7;
}
.game-slot .slot-icon { font-size: 22px; }
.game-slot .slot-name { font-size: 10px; font-weight: 700; line-height: 1.3; }
.game-slot .slot-num {
  font-size: 10px;
  color: rgba(255,255,255,.25);
  font-weight: 600;
}

/* フォーム */
.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.admin-form-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.45);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.admin-form-input,
.admin-form-select {
  padding: 8px 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px;
  color: rgba(255,255,255,.85);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.admin-form-input:focus,
.admin-form-select:focus {
  border-color: rgba(0,201,167,.4);
}
.admin-form-input::placeholder { color: rgba(255,255,255,.25); }
.admin-form-select option { background: #1a2840; }
.admin-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: opacity .2s, transform .1s;
}
.admin-btn:hover { opacity: .85; }
.admin-btn:active { transform: scale(.97); }
.admin-btn-primary { background: #00c9a7; color: #0a1628; }
.admin-btn-secondary { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }
.admin-btn-danger { background: rgba(220,38,38,.2); color: #fca5a5; border: 1px solid rgba(220,38,38,.3); }
.admin-btn-steam { background: rgba(28,100,168,.5); color: #93c5fd; border: 1px solid rgba(28,100,168,.5); }

/* Steam自動取得インジケーター */
.steam-fetch-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: 8px;
}
.steam-fetch-status.loading {
  background: rgba(251,191,36,.08);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,.2);
}
.steam-fetch-status.success {
  background: rgba(74,222,128,.08);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,.2);
}
.steam-fetch-status.error {
  background: rgba(252,165,165,.08);
  color: #fca5a5;
  border: 1px solid rgba(252,165,165,.2);
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spin { animation: spin .8s linear infinite; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1024px) {
  .game-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .game-select-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .game-cards-section {
    padding: 40px 0 48px;
  }
  .game-cards-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
  .admin-form-row {
    grid-template-columns: 1fr;
  }
  .game-select-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 480px) {
  .game-cards-grid {
    max-width: 100%;
  }
  .game-card-thumb {
    height: 140px;
  }
  .game-select-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
