@charset "UTF-8";

/* Google Fontsを読み込む */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* =========================================
   style.css - シネマティックデザイン (全体共通)
   ========================================= */

/* --- カラー変数の定義 --- */
:root {
  --bg-body: #141414;        /* 全体の背景色（深い黒） */
  --bg-card: #1f1f1f;        /* コンテンツの背景色（暗いグレー） */
  --text-main: #ffffff;      /* メイン文字色（白） */
  --text-sub: #b3b3b3;       /* サブ文字色（グレー） */
  --accent-color: #ff8b5e;   /* アクセント単色 */
  --accent-gradient: linear-gradient(135deg, #ff9966, #ff5e62); /* リッチなグラデーション */
  --border-color: rgba(255, 255, 255, 0.1); /* 薄い境界線 */
}

/* すべてのwebページに適用 */
html {
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  border: none;
  background-color: var(--bg-body);
}

html * {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-body);
  /* 背景にわずかなグラデーションを入れて奥行きを出す */
  background-image: radial-gradient(circle at top, #2a2a2a, #141414);
  background-attachment: fixed; /* スクロールしても背景を固定 */
}

h1,h2,p,ul,a,li {
  padding: 0;
  margin: 0;
}

a,li {
  text-decoration: none;
  color: var(--text-main);
  list-style: none;
  transition: opacity 0.3s;
}

a:hover {
  opacity: 0.8;
}

/* --- ヘッダー --- */
header {
  background-color: rgba(20, 20, 20, 0.9); /* 半透明の黒 */
  backdrop-filter: blur(10px); /* すりガラス効果 */
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
  position: sticky; /* スクロール追従 */
  top: 0;
  z-index: 1000;
}

.head {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* タイトルロゴをグラデーションにする */
h1 a {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* --- Main レイアウト --- */
main {
  width: 95%;
  max-width: 1200px;
  margin: 40px auto;
  display: flex;
  gap: 30px; /* 間隔を少し広げる */
}

/* mainの左部分 */
.left {
  width: 65%;
  display: flex;
  flex-direction: column;
}

.movie {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5); /* 映画館のような影 */
  border: 1px solid var(--border-color);
  background-color: #000;
}

.movie iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
  margin: 0 auto;
  box-sizing: border-box;
  /* transform: scale(1.5); ← scaleを使うと画角からはみ出る場合があるので、必要なければ削除推奨 */
}

/* --- 翻訳部分のスタイル --- */
.translation-section {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  margin: 30px 0 0 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card); /* カード背景 */
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.language-tabs {
  display: flex;
  background-color: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border-color);
}

.tab-button {
  flex: 1;
  padding: 15px 0;
  text-align: center;
  border: none;
  background-color: transparent;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-sub);
  transition: all 0.3s;
}

.tab-button:not(.active):hover {
  background-color: rgba(255,255,255,0.05);
  color: #fff;
}

.tab-button.active {
  background-color: transparent;
  color: #fff;
  font-weight: 700;
  border-bottom: 2px solid var(--accent-color);
}

.translation-content {
  position: relative;
  background-color: var(--bg-card);
  padding: 20px;
  height: 300px; /* 少し高く */
  overflow: hidden;
  flex-grow: 1;
}

.lang-text {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  visibility: hidden;
  padding: 20px;
  z-index: 1;
}

.lang-text.active {
  visibility: visible;
  z-index: 2;
}

.lang-text p {
  position: relative;
  margin: 6px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 8px 12px;
  border-radius: 6px;
  color: rgba(255,255,255,0.8);
}

.lang-text p:hover {
  background-color: rgba(255,255,255,0.1);
  color: #fff;
}

.lang-text p.active {
  background-color: rgba(255, 139, 94, 0.2); /* オレンジの薄い背景 */
  font-weight: bold;
  color: #fff;
  border-left: 3px solid var(--accent-color);
}

.subtitle-line {
  overflow-anchor: none;
  position: relative;
  padding-right: 24px;
  display: flex;
  align-items: center;
}

/* お気に入りスターアイコン */
.lang-text p:hover .star-icon {
  opacity: 1;
}

.star-icon {
  position: absolute;
  right: 8px;
  opacity: 0;
  font-size: 18px;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
}

.star-icon:hover {
  color: #ffe37c; /* 薄い黄色 */
  transform: scale(1.2);
}

.star-icon:active {
  font-weight: bold;
}

.star-icon.star-active {
  color: #ffc107; /* 濃い黄色 */
  opacity: 1;
  text-shadow: 0 0 5px rgba(255, 193, 7, 0.5);
}

/* スクロール補助ボタン */
.scroll-helper-btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 139, 94, 0.9); /* アクセントカラー */
  color: white;
  font-size: 20px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  display: none;
  user-select: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: transform 0.2s;
}

.scroll-helper-btn:hover {
  transform: translateX(-50%) scale(1.1);
}

#scroll-up-btn {
  top: 15px;
}

#scroll-down-btn {
  bottom: 15px;
}


/* --- クイズ部分のスタイル --- */
.right {
  width: 35%;
}

.quiz-section {
  padding: 30px;
  background-color: var(--bg-card);
  border-radius: 12px;
  margin: 0;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.quiz-title {
  font-size: 22px;
  /* グラデーションの下線 */
  border-bottom: 2px solid;
  border-image: var(--accent-gradient) 1;
  padding-bottom: 10px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
}

.quiz-item {
  margin-top: 30px;
  padding: 20px;
  background-color: rgba(255,255,255,0.03);
  border-radius: 8px;
}

.question {
  margin-bottom: 10px;
  font-weight: 700;
  color: #fff;
}

.question-sentence {
  margin-bottom: 15px;
  font-style: italic;
  color: var(--text-sub);
  padding: 10px;
  border-left: 2px solid var(--text-sub);
  background-color: rgba(0,0,0,0.2);
}

.answer-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
}

.answer-button {
  font-size: 14px;
  /* グラデーションボタン */
  background: var(--accent-gradient);
  color: #fff;
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s, opacity 0.2s;
  box-shadow: 0 4px 10px rgba(255, 94, 98, 0.3);
}

.answer-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.answer-text {
  font-weight: 700;
  color: #4CAF50; /* 正解の緑は視認性のため維持 */
  font-size: 16px;
  text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.hidden {
  display: none;
}


/* --- フッター --- */
.footer {
  margin-top: 60px;
  padding: 40px 15px;
  font-size: 12px;
  color: var(--text-sub);
  background-color: #000;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

/* ===============================
   画面幅が768px以下の時のスタイル
   ================================ */
@media (max-width: 768px) {
  main {
    flex-direction: column;
    width: 90%;
  }

  .left, .right {
    width: 100%;
  }
  
  .quiz-section {
    padding: 20px;
  }
}