/* ====================================
   メガロポリス
   「186億円の？」ビジュアルシステム
   ==================================== */

/* カラーパレット定義 */
:root {
  --megaron-gold: #FFD700;
  --regret-red: #DC143C;
  --void-black: #0A0A0A;
  --confusion-gray: #707070;
  --irony-white: #FAFAFA;
  --text-primary: #333;
  --text-secondary: #666;
  --border-light: #e0e0e0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "游ゴシック Medium", YuGothic, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.8;
  color: var(--text-primary);
  background-color: var(--irony-white);
  font-size: 16px;
}

/* コンテナ */
.breadcrumb-container,
.hero-section,
.article-intro,
.highlights-container,
.meta-info,
.toc,
.content-section,
.recommendations,
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* パンくずリスト */
.breadcrumb-nav {
  background-color: #f8f8f8;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
  content: ">";
  margin: 0 8px;
  color: var(--confusion-gray);
}

.breadcrumb-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
}

.breadcrumb-link:hover {
  color: var(--megaron-gold);
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.current-page {
  color: var(--text-primary);
  font-weight: bold;
}

/* ヒーローセクション */
.hero-section {
  position: relative;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--void-black) 0%, var(--regret-red) 50%, var(--megaron-gold) 100%);
  overflow: hidden;
}

.question-mark-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 30vw;
  font-weight: 900;
  color: rgba(255, 215, 0, 0.1);
  animation: collapse 15s ease-in-out infinite;
  z-index: 1;
}

.question-mark-bg::before {
  content: "？";
  display: block;
}

.billion-yen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4vw;
  font-weight: 900;
  color: var(--megaron-gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
  animation: count-pulse 2s ease-in-out infinite;
}

.coppola-shadow {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(0,0,0,0.3) 0%, transparent 70%);
  filter: blur(20px);
  opacity: 0.5;
}

.main-title {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}

.title-top {
  display: block;
  font-size: clamp(24px, 5vw, 48px);
  font-weight: 900;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  animation: title-glow 3s ease-in-out infinite;
}

.title-bottom {
  display: block;
  font-size: clamp(16px, 3vw, 28px);
  font-weight: 500;
  opacity: 0.9;
}

/* アニメーション */
@keyframes collapse {
  0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  25% { transform: translate(-50%, -50%) scale(1.1) rotate(5deg); }
  50% { transform: translate(-50%, -50%) scale(0.9) rotate(-5deg); }
  75% { transform: translate(-50%, -50%) scale(1.05) rotate(3deg); }
}

@keyframes count-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes title-glow {
  0%, 100% { text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 10px rgba(255,215,0,0.3); }
  50% { text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 30px rgba(255,215,0,0.6); }
}

/* 記事概要 */
.article-intro {
  padding: 30px 20px;
  font-size: 18px;
  color: var(--text-secondary);
  text-align: center;
  background: linear-gradient(to bottom, rgba(255,215,0,0.05), transparent);
}

/* この記事でわかること */
.highlights-container {
  padding: 30px 20px;
}

.highlights {
  background: var(--irony-white);
  border: 3px solid var(--megaron-gold);
  border-radius: 10px;
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.highlights::before {
  content: "？";
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 100px;
  color: rgba(255,215,0,0.1);
  font-weight: 900;
  transform: rotate(15deg);
}

.highlights h3 {
  font-size: 24px;
  color: var(--void-black);
  margin-bottom: 20px;
  position: relative;
}

.highlights ul {
  list-style: none;
  position: relative;
}

.highlights li {
  padding-left: 30px;
  margin-bottom: 10px;
  position: relative;
}

.highlights li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: var(--regret-red);
  font-weight: bold;
}

/* メタ情報 */
.meta-info {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.time {
  color: var(--text-secondary);
  font-size: 14px;
}

.share-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* 目次 */
.toc {
  padding: 30px 20px;
  background: var(--irony-white);
  border: 2px solid var(--confusion-gray);
  border-radius: 10px;
  margin: 30px auto;
}

.toc h2 {
  font-size: 28px;
  color: var(--void-black);
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.toc h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: var(--megaron-gold);
  margin: 10px auto 0;
}

.toc ul {
  list-style: none;
}

.toc li {
  margin-bottom: 15px;
  padding-left: 20px;
  position: relative;
}

.toc li::before {
  content: "?";
  position: absolute;
  left: 0;
  color: var(--megaron-gold);
  font-weight: bold;
}

.toc a {
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s;
  display: inline-block;
}

.toc a:hover {
  color: var(--regret-red);
  transform: translateX(5px);
}

/* メイン画像 */
.main-image {
  margin: 30px 0;
  text-align: center;
}

.main-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.main-image figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* コンテンツセクション */
.content-section {
  padding: 40px 20px;
  border-bottom: 1px solid var(--border-light);
}

.content-section h2 {
  font-size: 32px;
  color: var(--void-black);
  margin-bottom: 10px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--megaron-gold);
  position: relative;
}

.content-section h3 {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.content-section p {
  margin-bottom: 20px;
  line-height: 1.8;
}

/* ビデオコンテナ */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 30px 0;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* 新たまちゃんコンテナ */
.newonion-container {
  display: flex;
  align-items: flex-start;
  margin: 30px 0;
  gap: 15px;
}

.newonion-container.reverse {
  flex-direction: row-reverse;
}

.newonion-image {
  flex-shrink: 0;
  text-align: center;
}

.newonion-image img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--megaron-gold);
  animation: float 3s ease-in-out infinite;
}

.newonion-name {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 5px;
}

.speech-bubble {
  background: var(--irony-white);
  border: 2px solid var(--megaron-gold);
  border-radius: 20px;
  padding: 15px 20px;
  position: relative;
  flex-grow: 1;
}

.speech-bubble::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--irony-white);
  border: 2px solid var(--megaron-gold);
  border-right: none;
  border-bottom: none;
  transform: rotate(-45deg);
  top: 20px;
  left: -12px;
}

.reverse .speech-bubble::before {
  left: auto;
  right: -12px;
  transform: rotate(135deg);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ナビゲーションボタン */
.nav-buttons {
  text-align: center;
  margin-top: 30px;
}

.nav-button {
  display: inline-block;
  padding: 10px 30px;
  background: var(--megaron-gold);
  color: var(--void-black);
  text-decoration: none;
  border-radius: 30px;
  font-weight: bold;
  transition: all 0.3s;
  box-shadow: 0 3px 10px rgba(255,215,0,0.3);
}

.nav-button:hover {
  background: var(--regret-red);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(220,20,60,0.4);
}

/* Q&Aセクション */
.spoiler-section {
  background: linear-gradient(to bottom, rgba(220,20,60,0.02), transparent);
}

.qa-item {
  background: white;
  border-left: 5px solid var(--confusion-gray);
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 0 10px 10px 0;
  transition: all 0.3s;
}

.qa-item:hover {
  border-left-color: var(--megaron-gold);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.qa-item h4 {
  font-size: 18px;
  margin-bottom: 10px;
}

.qa-item h4:first-child {
  color: var(--regret-red);
  font-weight: bold;
}

.qa-item h4:nth-child(2) {
  color: var(--void-black);
}

/* 作品詳細テーブル */
.details-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.details-table th,
.details-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.details-table th {
  background: var(--confusion-gray);
  color: white;
  font-weight: normal;
  width: 30%;
}

.details-table td {
  background: var(--irony-white);
}

.details-table tr:last-child th,
.details-table tr:last-child td {
  border-bottom: none;
}

.details-table a {
  color: var(--regret-red);
  text-decoration: none;
  transition: color 0.3s;
}

.details-table a:hover {
  color: var(--megaron-gold);
}

/* おすすめ記事 */
.recommendations {
  padding: 50px 20px;
  background: var(--irony-white);
}

.recommendations-title {
  font-size: 32px;
  text-align: center;
  color: var(--void-black);
  margin-bottom: 30px;
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

/* フッター */
.copy {
  background: var(--void-black);
  color: white;
  padding: 40px 0;
  margin-top: 50px;
}

.footer-content {
  text-align: center;
}

.footer-content p {
  margin-bottom: 15px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-content a {
  color: var(--megaron-gold);
  text-decoration: none;
  transition: opacity 0.3s;
}

.footer-content a:hover {
  opacity: 0.8;
}

.contact-info,
.usage-terms {
  margin: 20px 0;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.copyright {
  margin-top: 30px;
  font-size: 12px;
  opacity: 0.8;
}

.push0 {
  transition: all 0.3s;
}

.push0:hover {
  color: var(--megaron-gold) !important;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  /* モバイル用の余白最小化 */
  .breadcrumb-container,
  .hero-section,
  .article-intro,
  .highlights-container,
  .meta-info,
  .toc,
  .content-section,
  .recommendations,
  .footer-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* ヒーローセクション調整 */
  .hero-section {
    padding: 40px 10px;
  }

  .question-mark-bg {
    font-size: 80vw;
  }

  .billion-yen {
    font-size: 8vw;
  }

  /* メタ情報 */
  .meta-info {
    flex-direction: column;
    text-align: center;
  }

  /* 目次 */
  .toc {
    margin: 20px 10px;
    padding: 20px 15px;
  }

  /* 新たまちゃんコンテナ */
  .newonion-container {
    align-items: center;
    gap: 10px;
  }

  .newonion-image img {
    width: 60px;
    height: 60px;
  }

  .speech-bubble {
    padding: 12px 15px;
    font-size: 14px;
  }

  .speech-bubble::before {
    top: 15px;
  }

  /* Q&A */
  .qa-item {
    padding: 15px;
    margin-left: 0;
    margin-right: 0;
  }

  /* テーブル */
  .details-table {
    font-size: 14px;
  }

  .details-table th,
  .details-table td {
    padding: 10px;
  }

  .details-table th {
    width: 40%;
  }

  /* セクションタイトル */
  .content-section h2 {
    font-size: 24px;
  }

  .content-section h3 {
    font-size: 16px;
  }

  /* コンテンツセクションの余白調整 */
  .content-section {
    padding: 30px 10px;
  }

  /* ハイライトボックス */
  .highlights {
    padding: 20px 15px;
  }

  .highlights::before {
    font-size: 60px;
    top: -10px;
    right: -10px;
  }
}

/* タブレット対応 */
@media (min-width: 769px) and (max-width: 1024px) {
  .question-mark-bg {
    font-size: 50vw;
  }

  .billion-yen {
    font-size: 6vw;
  }
}
/* おすすめ記事コンテナの調整 */
#recommendations {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

/* 各記事リンクのスタイル */
#recommendations .push0 {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--irony-white);
  border: 2px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* ホバー時の疑問符演出 */
#recommendations .push0::before {
  content: "？";
  position: absolute;
  right: -50px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 100px;
  color: var(--megaron-gold);
  opacity: 0;
  font-weight: 900;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#recommendations .push0:hover::before {
  right: 20px;
  opacity: 0.1;
}

/* ホバー効果 */
#recommendations .push0:hover {
  border-color: var(--megaron-gold);
  background: linear-gradient(to right, var(--irony-white) 0%, rgba(255,215,0,0.05) 100%);
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(255,215,0,0.2);
}

/* 画像スタイル */
#recommendations .sneak {
  width: 200px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  transition: all 0.3s;
  flex-shrink: 0;
}

#recommendations .push0:hover .sneak {
  transform: scale(1.05);
  box-shadow: 0 3px 15px rgba(0,0,0,0.2);
}

/* テキスト部分のスタイル */
#recommendations .push0 {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 500;
}

/* 記事間のbrタグを非表示（gapで管理） */
#recommendations br {
  display: none;
}

/* 3つ目の記事に特別な演出 */
#recommendations .push0:nth-child(5) {
  background: linear-gradient(135deg, rgba(220,20,60,0.02) 0%, transparent 100%);
}

#recommendations .push0:nth-child(5):hover {
  border-color: var(--regret-red);
  background: linear-gradient(135deg, rgba(220,20,60,0.05) 0%, transparent 100%);
}

/* ローディングアニメーション風の出現 */
#recommendations .push0 {
  animation: recommendation-appear 0.5s ease-out forwards;
  opacity: 0;
}

#recommendations .push0:nth-child(1) { animation-delay: 0.1s; }
#recommendations .push0:nth-child(3) { animation-delay: 0.2s; }
#recommendations .push0:nth-child(5) { animation-delay: 0.3s; }

@keyframes recommendation-appear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  #recommendations .push0 {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }

  #recommendations .sneak {
    width: 100%;
    max-width: 300px;
    height: auto;
  }

  #recommendations .push0::before {
    font-size: 60px;
    right: -30px;
  }

  #recommendations .push0:hover::before {
    right: 10px;
  }

  #recommendations .push0:hover {
    transform: translateX(0) translateY(-2px);
  }
}

/* タブレット対応 */
@media (min-width: 769px) and (max-width: 1024px) {
  #recommendations .sneak {
    width: 150px;
  }

  #recommendations .push0 {
    gap: 15px;
    padding: 15px;
    font-size: 15px;
  }
}

/* 記事が1つしかない場合の特別スタイル */
#recommendations .push0:only-child {
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(to right, var(--irony-white) 0%, rgba(255,215,0,0.03) 50%, var(--irony-white) 100%);
}

/* 記事が2つの場合のグリッド表示 */
#recommendations:has(.push0:nth-child(3):last-child) {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  #recommendations:has(.push0:nth-child(3):last-child) {
    grid-template-columns: 1fr;
  }
}
