/* Prime Video映画ナビ — 全スタイル（ダーク基調・YouTubeサムネ風） */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background: linear-gradient(to bottom, #111827, #0a0f1a, #000);
  color: #fff;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid #facc15;
  outline-offset: 2px;
}

/* ===== サイトヘッダー ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(17, 24, 39, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #1f2937;
}
.site-header-inner {
  max-width: 1280px; margin: 0 auto; padding: 12px 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.site-logo { font-weight: 900; font-size: 1rem; color: #facc15; }
.site-logo:hover { color: #fde047; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.site-nav a {
  padding: 10px 14px; border-radius: 8px; font-size: .85rem; font-weight: 700;
  color: #d1d5db; min-height: 44px; display: inline-flex; align-items: center;
}
.site-nav a:hover { background: #1f2937; color: #fff; }
.site-nav a.active { background: #dc2626; color: #fff; }

/* ===== ヒーロー ===== */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 20% 30%, rgba(0, 168, 232, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    linear-gradient(to bottom, #0f172a, #020617);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.hero-has-bg {
  background: #020617;
  min-height: clamp(360px, 52vh, 520px);
}
.hero-bg {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 0;
  overflow: hidden;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 100px 40px rgba(2, 6, 23, 0.55);
}
.hero-bg-panel {
  background-size: cover;
  background-position: center 35%;
  transform: scale(1.1);
  filter: saturate(0.9) brightness(0.72);
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-composite: intersect;
}
.hero-bg-panels-1 { grid-template-columns: 1fr; }
.hero-bg-panels-2 { grid-template-columns: 1fr 1fr; }
.hero-bg-panels-3 {
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.hero-bg-panels-3 .hero-bg-panel:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
.hero-bg-panels-3 .hero-bg-panel:nth-child(2) { grid-column: 2; grid-row: 1; }
.hero-bg-panels-3 .hero-bg-panel:nth-child(3) { grid-column: 2; grid-row: 2; }
.hero-bg-panels-4 {
  grid-template-columns: 1.6fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.hero-bg-panels-4 .hero-bg-panel:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
.hero-bg-panels-4 .hero-bg-panel:nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
.hero-bg-panels-4 .hero-bg-panel:nth-child(3) { grid-column: 2; grid-row: 2; }
.hero-bg-panels-4 .hero-bg-panel:nth-child(4) { grid-column: 3; grid-row: 2; }
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.5) 0%, rgba(2, 6, 23, 0.82) 50%, rgba(2, 6, 23, 0.96) 100%),
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(0, 168, 232, 0.16) 0%, transparent 65%),
    radial-gradient(circle at 88% 92%, rgba(139, 92, 246, 0.1) 0%, transparent 45%);
}
.hero-has-bg .hero-inner { position: relative; z-index: 1; }
@media (max-width: 640px) {
  .hero-bg-panels-3,
  .hero-bg-panels-4 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }
  .hero-bg-panels-3 .hero-bg-panel:not(:first-child),
  .hero-bg-panels-4 .hero-bg-panel:not(:first-child) { display: none; }
  .hero-bg-panels-3 .hero-bg-panel:nth-child(1),
  .hero-bg-panels-4 .hero-bg-panel:nth-child(1) { grid-column: 1; grid-row: 1; }
  .hero-bg-panel {
    -webkit-mask-image: radial-gradient(ellipse 105% 95% at 50% 40%, #000 45%, transparent 100%);
    mask-image: radial-gradient(ellipse 105% 95% at 50% 40%, #000 45%, transparent 100%);
  }
}
.hero-inner { max-width: 1280px; margin: 0 auto; padding: 64px 16px; text-align: center; }
.hero-compact .hero-inner { padding: 40px 16px; }
.hero-compact h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.hero-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 24px; }
.hero-badge {
  display: inline-block; background: #dc2626; color: #fff;
  padding: 8px 24px; font-weight: 900; font-size: 1.3rem;
  transform: rotate(-2deg); box-shadow: 0 4px 12px rgba(0,0,0,.5);
  border-radius: 2px;
}
.hero-badge-free { background: #2563eb; transform: rotate(1deg); }
.hero h1 { font-size: clamp(2rem, 6vw, 4.2rem); font-weight: 900; line-height: 1.15; margin-bottom: 16px; }
.hero-yellow { color: #facc15; text-shadow: 0 2px 0 #000; }
.hero-white { color: #fff; text-shadow: 0 2px 0 #000; }
.hero-sub { font-size: 1.1rem; color: #e5e7eb; margin-bottom: 12px; font-weight: 500; }
.hero-sub strong { color: #facc15; }
.hero-free-note { font-size: .8rem; color: #9ca3af; margin-bottom: 24px; max-width: 520px; margin-left: auto; margin-right: auto; }
.hero-updated { color: #9ca3af; font-size: .85rem; margin-top: 16px; }
.hero-prime-signup { color: #9ca3af; font-size: .82rem; margin-top: 10px; }
.today-cta { margin-bottom: 24px; }
.prime-signup-cta { margin-bottom: 16px; }
.prime-signup-link {
  color: #93c5fd;
  font-size: .9rem;
  text-decoration: underline;
}
.prime-signup-link:hover { color: #bfdbfe; }
.today-cta a {
  display: inline-block; background: #facc15; color: #000; font-weight: 900;
  padding: 12px 28px; border-radius: 9999px; font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.3); transition: transform .15s;
}
.today-cta a:hover { transform: translateY(-2px); }

.searchbox input {
  width: 100%; max-width: 560px; padding: 14px 20px;
  font-size: 1rem; border: 2px solid rgba(255,255,255,.2); border-radius: 12px;
  background: rgba(0,0,0,.5); color: #fff; outline: none;
}
.searchbox input:focus { border-color: #f87171; }

/* ===== レイアウト ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 48px 16px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.toolbar .genre-chips {
  flex: 1 1 200px; flex-wrap: nowrap; overflow-x: auto; max-width: 100%;
  -webkit-overflow-scrolling: touch; padding-bottom: 4px;
}
@media (min-width: 900px) {
  .toolbar .genre-chips { flex-wrap: wrap; overflow-x: visible; }
}
.toolbar-label { color: #d1d5db; font-weight: 500; margin-right: 4px; }
.genre-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  background: rgba(255, 255, 255, 0.05); color: #d1d5db; border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px); cursor: pointer;
  padding: 10px 16px; border-radius: 9999px; font-size: .85rem; font-weight: 700;
  transition: background .2s, border-color .2s, transform .2s; min-height: 44px; flex-shrink: 0;
}
.chip:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); transform: translateY(-1px); }
.chip.active { background: #dc2626; color: #fff; border-color: #dc2626; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3); }
.sort-box select {
  background: rgba(255, 255, 255, 0.05); color: #fff; border: 1px solid rgba(255, 255, 255, 0.08); cursor: pointer;
  padding: 8px 16px; border-radius: 8px; font-size: .9rem; backdrop-filter: blur(4px);
  transition: background .2s, border-color .2s;
}
.sort-box select:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }

.section-head { text-align: center; margin-bottom: 40px; }
.count-badge {
  display: inline-block; background: #eab308; color: #000;
  padding: 10px 28px; font-weight: 900; font-size: 1.3rem;
  transform: rotate(1deg); border-radius: 2px; box-shadow: 0 4px 12px rgba(0,0,0,.5);
  margin-bottom: 16px;
}
.section-head h2 { font-size: 2.2rem; font-weight: 900; margin-bottom: 8px; }
.section-head p { color: #d1d5db; font-size: 1.1rem; }

/* ===== カードグリッド ===== */
.grid {
  display: grid; gap: 24px 16px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.card {
  display: block;
  transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover {
  transform: translateY(-6px);
}
.poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden;
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
  transition: border-color .3s, box-shadow .3s;
}
.card:hover .poster {
  border-color: rgba(250, 204, 21, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 20px rgba(250, 204, 21, 0.15);
}
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, filter .3s; }
.card:hover .poster img { transform: scale(1.05); filter: brightness(1.1); }
.poster-fallback {
  height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 16px; text-align: center; color: #9ca3af; font-weight: 600;
  background: linear-gradient(to bottom right, #374151, #111827);
}
.rank {
  position: absolute; top: -4px; left: -4px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.2rem; color: #fff;
  border: 2px solid #000; box-shadow: 0 4px 8px rgba(0,0,0,.5);
  background: linear-gradient(to right, #2563eb, #1e40af);
}
.rank-1 { background: linear-gradient(to right, #facc15, #ca8a04); color: #000; }
.rank-2 { background: linear-gradient(to right, #d1d5db, #6b7280); color: #000; }
.rank-3 { background: linear-gradient(to right, #d97706, #92400e); color: #000; }
.kami {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  background: #dc2626; color: #fff; padding: 4px 14px; font-size: .75rem; font-weight: 900;
  border-radius: 2px; box-shadow: 0 2px 8px rgba(0,0,0,.5); white-space: nowrap;
}
.card h3 {
  margin-top: 12px; font-size: .95rem; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card:hover h3 { color: #facc15; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: .78rem; color: #9ca3af; }
.card-meta span { background: #1f2937; padding: 3px 8px; border-radius: 4px; }
.card-meta .star { background: rgba(234,179,8,.15); color: #facc15; font-weight: 700; }
.card-meta .votes { background: transparent; padding: 3px 0; color: #6b7280; }
.card-overview {
  margin-top: 8px; font-size: .8rem; color: #9ca3af; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.grid-empty { text-align: center; color: #9ca3af; font-size: 1.2rem; padding: 60px 0; }
.grid-note { text-align: center; color: #6b7280; font-size: .9rem; margin-top: 24px; }

/* ===== 詳細ページ ===== */
.backdrop { position: relative; height: 380px; overflow: hidden; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; }
.backdrop-fade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, #111827 5%, rgba(17,24,39,.7) 40%, transparent);
}
.detail.has-backdrop { margin-top: -140px; position: relative; z-index: 1; }
.detail-cols { display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 768px) { .detail-cols { flex-direction: row; } }
.detail-poster { flex-shrink: 0; width: 260px; max-width: 100%; }
.detail-poster img { border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.6); }
.detail-body { flex: 1; }
.back { color: #9ca3af; font-size: .9rem; }
.back:hover { color: #fff; }
.share-row { margin: 28px 0 16px; }
.share-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  background: #1f2937;
  color: #e5e7eb;
  border: 1px solid #374151;
  transition: background .15s, border-color .15s;
}
.share-btn:hover { background: #374151; border-color: #4b5563; color: #fff; }
.today-archive { margin: 32px 0 24px; padding-top: 24px; border-top: 1px solid #1f2937; }
.today-archive h2 { font-size: 1rem; color: #9ca3af; margin-bottom: 12px; font-weight: 600; }
.today-archive-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.today-archive-list a { color: #9ca3af; font-size: .85rem; }
.today-archive-list a:hover { color: #facc15; }
.detail-body h1 { font-size: 2.2rem; font-weight: 900; margin: 12px 0; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 14px; color: #9ca3af; margin-bottom: 16px; }
.detail-rating { font-size: 1.6rem; font-weight: 700; margin-bottom: 16px; }
.rating-source { font-size: .8rem; font-weight: 400; color: #9ca3af; margin-left: 6px; }
.hero-updated a { color: #9ca3af; text-decoration: underline; }
.star-big { color: #facc15; }
.prime-badge { display: inline-block; background: #2563eb; padding: 8px 16px; font-size: .85rem; font-weight: 700; border-radius: 6px; margin-bottom: 20px; }
.detail-genres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.genre-tag { background: #374151; padding: 6px 14px; border-radius: 9999px; font-size: .85rem; }
.detail-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.overview { color: #d1d5db; line-height: 1.8; margin-bottom: 28px; }
.prime-btn {
  display: inline-block; background: #ea580c; padding: 14px 28px;
  border-radius: 10px; font-weight: 700; font-size: 1.05rem; transition: background .15s;
}
.prime-btn:hover { background: #c2410c; }
.prime-note { color: #6b7280; font-size: .8rem; margin-top: 10px; }

/* ===== 手動キュレーション特集（縦積み・コメント付き） ===== */
.curated-list { display: flex; flex-direction: column; gap: 20px; max-width: 720px; margin: 0 auto; }
.curated-item {
  display: flex; gap: 20px; background: #1f2937; border-radius: 14px; padding: 16px;
  transition: background .15s;
}
.curated-item:hover { background: #263244; }
.curated-poster { flex-shrink: 0; width: 100px; }
.curated-poster img, .curated-poster .poster-fallback {
  border-radius: 8px; aspect-ratio: 2/3; object-fit: cover; width: 100%;
}
.curated-poster .poster-fallback {
  display: flex; align-items: center; justify-content: center; padding: 8px;
  text-align: center; font-size: .75rem; color: #9ca3af; background: #374151;
}
.curated-body h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.curated-comment { color: #d1d5db; font-size: .9rem; line-height: 1.7; margin-top: 10px; }
.today-label {
  display: inline-block; background: #facc15; color: #000; font-weight: 900;
  font-size: .72rem; padding: 3px 12px; border-radius: 9999px; margin-bottom: 8px;
}

/* ===== 特集カード（トップ・TOP100の直前） ===== */
.feature-links {
  margin-bottom: 48px; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feature-card {
  display: block; background: linear-gradient(135deg, #78350f, #451a03);
  border: 1px solid rgba(250,204,21,.3); border-radius: 14px; padding: 18px 20px;
  transition: transform .15s, border-color .15s;
}
.feature-card:hover { transform: translateY(-2px); border-color: #facc15; }
.feature-badge {
  display: inline-block; background: #facc15; color: #000; font-weight: 900;
  font-size: .72rem; padding: 3px 12px; border-radius: 9999px; margin-bottom: 8px;
}
.feature-card h2 { font-size: 1.1rem; font-weight: 900; margin-bottom: 4px; line-height: 1.3; }
.feature-card p { color: #d1d5db; font-size: .82rem; line-height: 1.4; }

/* ===== ジャンル別リンク（トップ下部・SEO内部リンク） ===== */
.genre-links { margin-top: 64px; text-align: center; }
.genre-links h2 { font-size: 1.4rem; font-weight: 900; margin-bottom: 16px; }
.genre-links .genre-chips { justify-content: center; }
a.chip { display: inline-block; }
.genre-tag:hover { background: #4b5563; }

/* ===== フッター ===== */
.footer { text-align: center; color: #6b7280; font-size: .8rem; padding: 40px 16px; }
.footer a { color: #9ca3af; text-decoration: underline; }

/* AIO: AI回答エンジンが引用しやすい事実ベースの要約 */
.aio-summary {
  background: #1a1d24;
  border: 1px solid #2d3139;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 32px;
  color: #d1d5db;
  font-size: .9rem;
  line-height: 1.7;
}
.aio-summary p { margin-bottom: 8px; }
.aio-summary a { color: #93c5fd; text-decoration: underline; }

/* ===== 運営について ===== */
.about-page { max-width: 720px; }
.about-section { margin-bottom: 36px; }
.about-section h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 12px; color: #facc15; }
.about-section p, .about-list { color: #d1d5db; line-height: 1.8; font-size: .95rem; }
.about-list { margin-left: 1.2em; }
.about-list li { margin-bottom: 8px; }
.about-note { color: #9ca3af; font-size: .85rem; margin-top: 8px; }
.about-section code { background: #1f2937; padding: 2px 6px; border-radius: 4px; font-size: .85em; }
.about-contact {
  display: inline-block; margin-top: 8px; padding: 12px 20px;
  background: #1f2937; border-radius: 8px; font-weight: 700; color: #93c5fd;
}
.about-contact:hover { background: #374151; }

/* ===== 関連作品（作品ページ） ===== */
.related { margin-top: 48px; padding-top: 32px; border-top: 1px solid #1f2937; }
.related h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 20px; }
.related-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.related-card {
  display: flex; flex-direction: column; gap: 8px;
  background: #1f2937; border-radius: 10px; padding: 10px; transition: background .15s;
}
.related-card:hover { background: #263244; }
.related-card img { border-radius: 6px; aspect-ratio: 2/3; object-fit: cover; width: 100%; }
.related-title { font-size: .85rem; font-weight: 700; line-height: 1.4; }
.related-rating { font-size: .78rem; color: #facc15; }
.related-more { margin-top: 16px; font-size: .9rem; }
.related-more a { color: #93c5fd; text-decoration: underline; }

.aio-summary dl { margin-top: 12px; }
.aio-summary dt { color: #fbbf24; font-weight: 700; font-size: .85rem; margin-top: 8px; }
.aio-summary dd { margin-left: 0; color: #9ca3af; font-size: .85rem; }
.aio-today-list { margin: 8px 0 0 1.2em; padding: 0; }
.aio-today-list li { margin-bottom: 4px; }
.detail-body > .aio-summary {
  margin-bottom: 16px;
  padding: 12px 16px;
  font-size: .85rem;
}

.sp-only { display: inline; }
@media (min-width: 768px) { .sp-only { display: none; } }
