/* ==========================================================================
   PlayPoint Game-Specific Simulators (Cocoon & Modern Theme)
   ========================================================================== */

:root {
  --game-primary: #0284c7;
  --game-primary-hover: #0369a1;
  --game-accent: #f59e0b;
  --game-bg: #f8fafc;
  --game-card-bg: #ffffff;
  --game-border: #e2e8f0;
  --game-text-main: #1e293b;
  --game-text-sub: #64748b;
}

body {
  background-color: var(--game-bg);
  color: var(--game-text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.game-page-container {
  max-width: 1140px;
  margin: 20px auto 60px;
  padding: 0 16px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.game-main-content {
  flex: 1;
  min-width: 0;
  background: var(--game-card-bg);
  border: 1px solid var(--game-border);
  border-radius: 8px;
  padding: 32px 36px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sidebar-column {
  width: 300px;
  flex-shrink: 0;
}

.game-header {
  border-bottom: 2px solid var(--game-border);
  padding-bottom: 18px;
  margin-bottom: 24px;
}

.game-badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.game-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
  line-height: 1.35;
}

.game-meta {
  font-size: 0.85rem;
  color: var(--game-text-sub);
}

/* シミュレーターカード */
.game-sim-card {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 24px;
  margin: 24px 0;
}

.game-sim-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preset-heading {
  font-size: 0.9rem;
  margin-bottom: 12px;
  font-weight: 700;
  color: #475569;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.preset-btn {
  background: #ffffff;
  border: 1.5px solid #94a3b8;
  color: #334155;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}

.preset-btn:hover {
  background: #e2e8f0;
  border-color: #64748b;
}

.preset-btn.active {
  background: var(--game-primary);
  color: #ffffff;
  border-color: var(--game-primary);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-field label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
}

.input-field input, .input-field select {
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  background: #ffffff;
  color: #0f172a;
  box-sizing: border-box;
}

/* 計算結果ボックス */
.game-result-container {
  background: #ffffff;
  border: 1.5px solid #0284c7;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.result-main-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.result-stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 14px;
}

.result-stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--game-text-sub);
  display: block;
}

.result-stat-value {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 800;
  color: #0284c7;
  display: block;
  margin-top: 4px;
  word-break: break-word;
  transition: transform 0.2s ease, color 0.2s ease;
}

.result-stat-value.highlight {
  color: #ea580c;
}

/* 数値更新時のマイクロアニメーション */
@keyframes valueUpdateFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); text-shadow: 0 0 6px rgba(2, 132, 199, 0.3); }
  100% { transform: scale(1); }
}

.result-stat-value.value-updated {
  animation: valueUpdateFlash 0.25s ease-out;
}

/* ランク進捗バー */
.rank-progress-wrapper {
  margin: 18px 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px;
}

.rank-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.rank-bar-bg {
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.rank-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #0284c7 100%);
  width: 0%;
  transition: width 0.3s ease;
}

.game-portal-purchase-check {
  margin: 1.2rem 0 1.6rem;
}

/* ギフトカード収益化CTAカード */
.game-giftcard-cta {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fde68a;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.game-giftcard-cta-content {
  flex: 1;
  min-width: 240px;
}

.game-giftcard-cta-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #92400e;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.game-giftcard-cta-text {
  font-size: 0.85rem;
  color: #78350f;
  margin: 0;
  line-height: 1.45;
}

.dynamic-savings-badge {
  display: inline;
  font-weight: 800;
  color: #c2410c;
}

.game-giftcard-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.game-giftcard-cta-btn {
  background: #f59e0b;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
  display: inline-flex;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.game-giftcard-cta-btn.rakuten-primary-btn {
  background: linear-gradient(135deg, #bf0000 0%, #e60000 100%);
  box-shadow: 0 3px 10px rgba(191, 0, 0, 0.35);
}

.game-giftcard-cta-btn.rakuten-primary-btn:hover {
  background: linear-gradient(135deg, #990000 0%, #cc0000 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(191, 0, 0, 0.45);
}

.game-giftcard-cta-btn:hover {
  background: #d97706;
  color: #ffffff;
  transform: translateY(-1px);
}

.game-giftcard-cta-sublink {
  font-size: 0.78rem;
  color: #92400e;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.15s ease;
}

.game-giftcard-cta-sublink:hover {
  color: #b45309;
}

/* 広告ユニットスタイル */
.game-ad-container {
  margin: 28px 0;
  text-align: center;
  min-height: 100px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
  padding: 12px;
  overflow: hidden;
}

.game-ad-label {
  font-size: 0.72rem;
  color: #94a3b8;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: block;
  text-transform: uppercase;
}

/* パック早見表テーブル */
.pack-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.pack-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.pack-table th, .pack-table td {
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  text-align: left;
}

.pack-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

.pack-table tbody tr:hover {
  background: #f8fafc;
}

/* ゲーム一覧ポータルカード */
.game-portal-lead {
  margin: 1.4rem 0 0;
  line-height: 1.7;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 20px;
  margin: 16px 0 28px;
}

.game-portal-card {
  background: #ffffff;
  border: 1.5px solid var(--game-border);
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  overflow-wrap: anywhere;
}

.game-portal-card:hover {
  transform: translateY(-3px);
  border-color: var(--game-primary);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.12);
}

.game-card-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.game-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.game-card-desc {
  font-size: 0.85rem;
  color: var(--game-text-sub);
  margin: 0 0 14px 0;
  flex: 1;
}

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


/* シェア＆リンクコピーアクション */
.game-share-actions {
  display: flex;
  gap: 12px;
  margin: 18px 0;
  flex-wrap: wrap;
}

.game-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 42px;
  user-select: none;
  text-decoration: none;
  border: 1.5px solid transparent;
}

.game-share-btn.x-btn {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.game-share-btn.x-btn:hover {
  background: #1e293b;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.game-share-btn.copy-btn {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}

.game-share-btn.copy-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.game-share-btn.copied {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

@media (max-width: 768px) {
  .game-page-container {
    flex-direction: column;
    margin-top: 10px;
  }
  .game-main-content {
    padding: 16px 14px;
  }
  .game-header {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
  .game-title,
  .game-card-title,
  .game-card-desc {
    overflow-wrap: anywhere;
  }
  .games-grid {
    grid-template-columns: 1fr;
    margin-top: 8px;
    margin-bottom: 20px;
  }
  .game-portal-purchase-check {
    margin-top: 0.4rem;
  }
  .sidebar-column {
    width: 100%;
  }
  .game-title {
    font-size: 1.4rem;
  }
  .input-grid {
    grid-template-columns: 1fr;
  }
  .result-main-grid {
    grid-template-columns: 1fr 1fr;
  }
  .game-share-actions {
    flex-direction: column;
  }
  .game-share-btn {
    width: 100%;
    box-sizing: border-box;
  }
  .game-giftcard-cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .game-giftcard-cta-btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

.site-footer-trademark {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.6;
  margin: 12px auto 8px;
  max-width: 820px;
  text-align: center;
  padding: 0 16px;
}

/* ポイント交換損得比較カード */
.reward-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.reward-compare-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 16px;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.reward-compare-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.reward-compare-card.highlight {
  border-color: #2563eb;
  background: #f8faff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}
.reward-compare-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  margin-bottom: 8px;
}
.reward-compare-tag.best {
  background: #2563eb;
  color: #ffffff;
}
.reward-compare-card h4 {
  font-size: 0.95rem;
  margin: 0 0 6px;
  color: #1e293b;
}
.reward-rate-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #2563eb;
  margin-bottom: 6px;
}
.reward-compare-card.highlight .reward-rate-val {
  color: #1d4ed8;
}
.reward-rate-desc {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
