/* ===========================================================
   Cinerand — Disney+ ランダム映画抽選ツール スタイルシート
   カラーテーマ:
     背景:    #0B1120（濃紺）
     アクセント: #F5C518（ゴールド）
     テキスト: #FFFFFF
   =========================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #0B1120;
  color: #FFFFFF;
  min-height: 100vh;
  line-height: 1.6;
}

/* ---------------------------------------------------------------
   ユーティリティ
   --------------------------------------------------------------- */
/* 非表示クラス */
.hidden {
  display: none !important;
}

/* ---------------------------------------------------------------
   ヘッダー
   --------------------------------------------------------------- */
.site-header {
  background-color: #0B1120;
  border-bottom: 2px solid #F5C518;
  padding: 16px 0;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-title {
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: #F5C518;
  letter-spacing: 0.04em;
}

.site-subtitle {
  font-size: 0.8rem;
  color: #aab4c8;
  margin-top: 4px;
}

/* ---------------------------------------------------------------
   通知・法務関連
   --------------------------------------------------------------- */
.site-notice {
  max-width: 1200px;
  margin: 12px auto 0;
  padding: 0 16px;
}

.site-notice p {
  background-color: #111927;
  border: 1px solid rgba(245, 197, 24, 0.4);
  border-radius: 10px;
  color: #dfe7f5;
  line-height: 1.8;
  padding: 14px 18px;
  text-align: center;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin-top: 10px;
}

.legal-links a {
  color: #F5C518;
  text-decoration: none;
}

.legal-links a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------
   メインコンテンツ
   --------------------------------------------------------------- */
.site-main {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 16px;
}

/* ---------------------------------------------------------------
   映画カードグリッド
   --------------------------------------------------------------- */
.movie-grid {
  display: grid;
  gap: 24px;
  /* PC（>900px）: 横3列 */
  grid-template-columns: repeat(3, 1fr);
}

/* Tablet（601px〜900px）: 横2列 */
@media (max-width: 900px) {
  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* SP（≤600px）: 縦1列 */
@media (max-width: 600px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------
   映画カード
   --------------------------------------------------------------- */
.movie-card {
  background-color: #1A2540;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* カードホバー時: 軽く浮き上がる */
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
}

/* ポスター画像: カード幅全体、アスペクト比 2:3 */
.movie-card .poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  background-color: #0B1120;
}

/* ポスターが読み込めない場合のフォールバック */
.poster-fallback {
  width: 100%;
  aspect-ratio: 2 / 3;
  background-color: #253050;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aab4c8;
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
}

/* カード情報エリア */
.movie-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

/* タイトル */
.movie-title {
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.4;
  overflow-wrap: break-word;
}

/* ジャンルタグエリア */
.genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ジャンルバッジ */
.genre-tag {
  font-size: 0.7rem;
  border: 1px solid #F5C518;
  color: #F5C518;
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* 「視聴する」ボタン */
.watch-btn {
  display: inline-block;
  background-color: #F5C518;
  color: #0B1120;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  padding: 10px 16px;
  margin-top: auto;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.watch-btn:hover {
  background-color: #ffd740;
  transform: scale(1.03);
}

/* ---------------------------------------------------------------
   リフレッシュボタン（CTA）
   --------------------------------------------------------------- */
.refresh-btn {
  display: block;
  margin: 40px auto 0;
  background-color: #F5C518;
  color: #0B1120;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  border-radius: 50px;
  padding: 16px 48px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(245, 197, 24, 0.4);
}

.refresh-btn:hover {
  background-color: #ffd740;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 197, 24, 0.55);
}

.refresh-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(245, 197, 24, 0.4);
}

/* ---------------------------------------------------------------
   ローディングスピナー
   --------------------------------------------------------------- */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
  grid-column: 1 / -1; /* グリッド内で全幅を占める */
}

.spinner-ring {
  width: 56px;
  height: 56px;
  border: 5px solid #1A2540;
  border-top-color: #F5C518;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------------------------------------------
   エラーメッセージ
   --------------------------------------------------------------- */
.error-message {
  background-color: #3d1515;
  border: 1px solid #c0392b;
  color: #ff8080;
  border-radius: 8px;
  padding: 20px 24px;
  text-align: center;
  margin: 24px auto;
  max-width: 600px;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------------------------------------------------------------
   広告バナー
   --------------------------------------------------------------- */
.ad-banner {
  text-align: center;
  margin: 32px auto;
  max-width: 1200px;
  padding: 0 16px;
  min-height: 90px; /* バナー最小高さ */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #111927; /* プレースホルダー背景 */
  border-radius: 8px;
}

.ad-banner .adsbygoogle {
  display: block;
  width: 100%;
}

/* ---------------------------------------------------------------
   ガイド・FAQセクション
   --------------------------------------------------------------- */
.content-section {
  background-color: #111927; /* 少し明るい濃紺で区切り感を演出 */
  margin: 0 0 2px;
  padding: 40px 16px;
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.content-section h2 {
  font-size: 1.4rem;
  color: #F5C518;
  border-left: 4px solid #F5C518;
  padding-left: 12px;
  margin-bottom: 24px;
}

.content-section p {
  margin: 18px 0;
  line-height: 1.9;
}

.guide-item,
.faq-item {
  margin-bottom: 20px;
}

.guide-item:last-child,
.faq-item:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------------
   フッター
   --------------------------------------------------------------- */
.site-footer {
  background-color: #060c18;
  border-top: 1px solid #1A2540;
  padding: 32px 16px;
  text-align: center;
  font-size: 0.8rem;
  color: #7a8aa0;
  line-height: 2;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

.site-footer .copyright {
  margin-top: 8px;
  color: #5a6a80;
}

.site-footer a {
  color: #F5C518;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------
   法務ページ
   --------------------------------------------------------------- */
.legal-page {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 16px 40px;
}

.legal-page .legal-header {
  margin-bottom: 24px;
}

.legal-page h1 {
  color: #F5C518;
  margin-bottom: 16px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.legal-page h2 {
  color: #F5C518;
  margin: 28px 0 12px;
  font-size: 1.2rem;
}

.legal-page p,
.legal-page li {
  color: #dfe7f5;
  line-height: 1.9;
}

.legal-page ul,
.legal-page ol {
  margin: 12px 0 12px 20px;
}

.legal-page .meta-note {
  color: #aab4c8;
  font-size: 0.9rem;
}
