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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  line-height: 1.6;
  min-height: 100vh;
}

/* ========================================
   ヘッダー
   ======================================== */
.header {
  background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
  padding: 14px 24px;
  border-bottom: 2px solid #e94560;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 16px;
}

.header-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-icon {
  color: #e94560;
  margin-right: 4px;
}

/* ヘッダー右側（ログイン/クレジット/アバター） */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-guest {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* クレジット残量バッジ */
.credit-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: #e0e0e0;
  white-space: nowrap;
}

.credit-icon {
  font-size: 14px;
}

/* CTAボタン（小） */
.btn-cta-small {
  background: linear-gradient(135deg, #e94560, #ff6b6b);
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-cta-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

/* ゴーストボタン（枠線のみ） */
.btn-ghost {
  background: transparent;
  color: #ccc;
  border: 1px solid #3a3a5c;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
  border-color: #e94560;
  color: #fff;
}

/* ユーザーアバター・メニュー */
.user-menu {
  position: relative;
  cursor: pointer;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e94560;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.user-dropdown {
  position: absolute;
  top: 44px;
  right: 0;
  background: #1a1a2e;
  border: 1px solid #3a3a5c;
  border-radius: 10px;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 100;
  overflow: hidden;
}

.dropdown-header {
  padding: 14px 16px;
}

.dropdown-header span {
  display: block;
}

#dropdownEmail {
  font-size: 13px;
  color: #ccc;
}

.dropdown-plan {
  font-size: 11px;
  color: #e94560;
  margin-top: 2px;
}

.dropdown-divider {
  height: 1px;
  background: #2a2a4a;
}

.dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: #ccc;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-logout {
  color: #e94560;
}

/* ========================================
   メインコンテンツ
   ======================================== */
.main {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ========================================
   カード
   ======================================== */
.card {
  background: #16213e;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.step-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #e94560;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.step-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
}

/* ========================================
   ドロップゾーン
   ======================================== */
.dropzone {
  border: 2px dashed #3a3a5c;
  border-radius: 10px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: #e94560;
  background: rgba(233, 69, 96, 0.05);
}

.dropzone-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.dropzone-text {
  font-size: 16px;
  color: #aaa;
  margin-bottom: 8px;
}

.dropzone-sub {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}

/* ========================================
   アップロード進捗
   ======================================== */
.upload-progress {
  margin-top: 20px;
  text-align: center;
}

.upload-status {
  margin-top: 8px;
  font-size: 14px;
  color: #aaa;
}

/* ========================================
   プログレスバー
   ======================================== */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #2a2a4a;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-large {
  height: 10px;
  border-radius: 5px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e94560, #ff6b6b);
  border-radius: inherit;
  transition: width 0.4s ease;
}

/* ========================================
   動画情報
   ======================================== */
.video-info {
  margin-top: 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.info-item {
  background: #1a1a2e;
  border-radius: 8px;
  padding: 12px 16px;
}

.info-label {
  display: block;
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.info-value {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  word-break: break-all;
}

/* ========================================
   ボタン共通
   ======================================== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  text-align: center;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #2a2a4a;
  color: #e0e0e0;
}

.btn-primary {
  background: linear-gradient(135deg, #e94560, #c0392b);
  color: #fff;
}

.btn-accent {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: #fff;
}

.btn-large {
  padding: 16px 48px;
  font-size: 18px;
  border-radius: 10px;
  width: 100%;
}

/* ========================================
   APIキー設定（折りたたみ）
   ======================================== */
.option-details {
  margin-bottom: 20px;
  background: #1a1a2e;
  border-radius: 8px;
  overflow: hidden;
}

.option-summary {
  padding: 14px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #ccc;
  list-style: none;
  transition: background 0.2s;
}

.option-summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.option-summary::-webkit-details-marker {
  display: none;
}

.option-summary::before {
  content: "▶ ";
  font-size: 10px;
  margin-right: 6px;
  transition: transform 0.2s;
  display: inline-block;
}

details[open] .option-summary::before {
  transform: rotate(90deg);
}

.option-body {
  padding: 0 18px 18px;
}

.api-note {
  font-size: 12px;
  color: #e94560;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: rgba(233, 69, 96, 0.1);
  border-radius: 6px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 4px;
}

.input {
  width: 100%;
  padding: 10px 14px;
  background: #16213e;
  border: 1px solid #3a3a5c;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.input:focus {
  border-color: #e94560;
}

/* ========================================
   オプションセクション
   ======================================== */
.option-section {
  margin-bottom: 16px;
  background: #1a1a2e;
  border-radius: 8px;
  padding: 16px 18px;
}

.option-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

/* チェックボックス */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #3a3a5c;
  border-radius: 4px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: #e94560;
  border-color: #e94560;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.sub-option {
  margin-top: 14px;
  font-size: 14px;
  color: #ccc;
}

/* オプションパネル（アニメーション） */
.option-panel {
  max-height: 3000px;
  overflow: visible;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
  opacity: 1;
  margin-top: 16px;
}

.option-panel.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.option-desc {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 12px;
}

/* ラジオボタン */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #ccc;
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 18px;
  height: 18px;
  border: 2px solid #3a3a5c;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.radio-label input[type="radio"]:checked + .radio-custom {
  border-color: #e94560;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  background: #e94560;
  border-radius: 50%;
}

/* ========================================
   テロップ位置スライダー
   ======================================== */
.telop-position-area {
  margin-top: 8px;
}

.position-preview-box {
  position: relative;
  width: 180px;
  height: 320px;
  background: #0d1117;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #3a3a5c;
  margin: 0 auto 12px;
}

.position-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.position-line {
  display: none;
}

.position-label {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -130%);
  top: 75%;
  background: rgba(255,255,255,0.95);
  color: #000;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 3px;
  white-space: nowrap;
  transition: top 0.15s ease;
  pointer-events: none;
  font-weight: bold;
}

.position-horizontal-slider {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 300px;
  margin: 0 auto;
}

.pos-endpoint {
  color: #888;
  font-size: 13px;
  flex-shrink: 0;
}

.position-horizontal-slider .slider {
  flex: 1;
  accent-color: #e94560;
}

/* ========================================
   テロップスタイルグリッド
   ======================================== */
.telop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.telop-card {
  background: #666;
  border: 2px solid #888;
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: center;
}

.telop-card:hover {
  border-color: #555;
}

.telop-card.selected {
  border-color: #e94560;
  box-shadow: 0 0 12px rgba(233, 69, 96, 0.3);
}

.telop-card-name {
  font-size: 11px;
  color: #888;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.telop-preview {
  font-size: 20px;
  line-height: 1.4;
  padding: 4px 0;
}

/* テロップスタイル個別（10パターン）
   paint-order: stroke fill で滑らかな縁取りを実現 */

/* 1. M+丸ゴシック 白+黒縁 */
.telop-s01 {
  color: #fff;
  font-family: "Rounded Mplus 1c", "M PLUS Rounded 1c", sans-serif;
  font-weight: 900;
  -webkit-text-stroke: 5px #000;
  paint-order: stroke fill;
}

/* 2. コーポレートロゴ 白+黒縁 */
.telop-s02 {
  color: #fff;
  font-family: "Corporate Logo Rounded ver2", sans-serif;
  font-weight: 700;
  -webkit-text-stroke: 5px #000;
  paint-order: stroke fill;
}

/* 3. ラノベPOP 白+黒縁 */
.telop-s03 {
  color: #fff;
  font-family: "LightNovelPopV2", "ラノベPOP", sans-serif;
  font-weight: 400;
  -webkit-text-stroke: 5px #000;
  paint-order: stroke fill;
}

/* 4. けいふぉんと 白+黒縁 */
.telop-s04 {
  color: #fff;
  font-family: "Keifont", "けいふぉんと", sans-serif;
  font-weight: 400;
  -webkit-text-stroke: 4px #000;
  paint-order: stroke fill;
}

/* 5. 明朝 白+黒縁 */
.telop-s05 {
  color: #fff;
  font-family: "Noto Serif JP", serif;
  font-weight: 900;
  -webkit-text-stroke: 4px #000;
  paint-order: stroke fill;
}

/* 6. M+丸ゴシック 黄色+黒縁 */
.telop-s06 {
  color: #ffe600;
  font-family: "Rounded Mplus 1c", "M PLUS Rounded 1c", sans-serif;
  font-weight: 900;
  -webkit-text-stroke: 5px #000;
  paint-order: stroke fill;
}

/* 7. ラノベPOP 水色+濃紺縁 */
.telop-s07 {
  color: #80ffff;
  font-family: "LightNovelPopV2", "ラノベPOP", sans-serif;
  font-weight: 400;
  -webkit-text-stroke: 5px #000080;
  paint-order: stroke fill;
}

/* 8. コーポレートロゴ 半透明黒帯 */
.telop-s08 {
  color: #fff;
  font-family: "Corporate Logo Rounded ver2", sans-serif;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 16px;
  border-radius: 4px;
  display: inline-block;
}

/* 9. 明朝 半透明白帯+黒文字 */
.telop-s09 {
  color: #111;
  font-family: "Noto Serif JP", serif;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.5);
  padding: 6px 16px;
  border-radius: 4px;
  display: inline-block;
}

/* 10. けいふぉんと ピンク+白縁 */
.telop-s10 {
  color: #ff8080;
  font-family: "Keifont", "けいふぉんと", sans-serif;
  font-weight: 400;
  -webkit-text-stroke: 4px #fff;
  paint-order: stroke fill;
}

/* ========================================
   BGMリスト
   ======================================== */
.bgm-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  max-height: 320px;
  overflow-y: auto;
}

.bgm-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0f0f23;
  border: 2px solid #2a2a4a;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.bgm-card:hover {
  border-color: #555;
}

.bgm-card.selected {
  border-color: #e94560;
  box-shadow: 0 0 8px rgba(233, 69, 96, 0.2);
}

.bgm-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #e94560;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.bgm-play-btn:hover {
  background: #c0392b;
}

.bgm-info {
  flex: 1;
}

.bgm-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.bgm-genre {
  display: inline-block;
  font-size: 11px;
  color: #aaa;
  background: #2a2a4a;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
}

/* 音量スライダー */
.volume-control {
  display: flex;
  align-items: center;
  gap: 14px;
}

.volume-control label {
  font-size: 14px;
  color: #ccc;
  white-space: nowrap;
  min-width: 80px;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  background: #2a2a4a;
  border-radius: 3px;
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #e94560;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* ========================================
   Step 3: 実行エリア
   ======================================== */
#step3 {
  text-align: center;
}

.processing-area {
  margin-top: 24px;
}

.process-stage {
  margin-top: 12px;
  font-size: 14px;
  color: #aaa;
}

.complete-area {
  margin-top: 24px;
}

.complete-text {
  font-size: 20px;
  font-weight: 700;
  color: #2ecc71;
  margin-bottom: 16px;
}

.error-area {
  margin-top: 24px;
}

.error-text {
  color: #e94560;
  font-size: 14px;
  padding: 14px 18px;
  background: rgba(233, 69, 96, 0.1);
  border: 1px solid rgba(233, 69, 96, 0.3);
  border-radius: 8px;
}

/* ========================================
   アップロード注意書き
   ======================================== */
.upload-notes {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.note-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #888;
}

.note-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.note-credit {
  color: #e94560;
  font-weight: 500;
}

/* 消費クレジット表示 */
.info-credit-cost {
  color: #e94560 !important;
}

/* ========================================
   クレジット確認（Step 3上部）
   ======================================== */
.credit-confirm {
  background: rgba(233, 69, 96, 0.1);
  border: 1px solid rgba(233, 69, 96, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #ccc;
  margin-bottom: 16px;
  text-align: center;
}

.credit-confirm strong {
  color: #e94560;
}

/* 処理時間目安 */
.process-estimate {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

/* ========================================
   クレジット警告バナー（残りわずか）
   ======================================== */
.credit-warning {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 10px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #ffc107;
}

.btn-cta-inline {
  background: #e94560;
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-cta-inline:hover {
  background: #c0392b;
}

/* ========================================
   クレジット切れブロック画面
   ======================================== */
.credit-block {
  text-align: center;
  padding: 48px 24px;
}

.credit-block-inner {
  background: #16213e;
  border-radius: 16px;
  padding: 48px 32px;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.credit-block-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.credit-block h2 {
  font-size: 22px;
  color: #fff;
  margin-bottom: 12px;
}

.credit-block p {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 24px;
}

.credit-block-price {
  margin-bottom: 24px;
}

.price-amount {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
}

.price-period {
  font-size: 16px;
  color: #888;
}

.btn-cta-large {
  background: linear-gradient(135deg, #e94560, #ff6b6b);
  color: #fff;
  border: none;
  padding: 14px 40px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-cta-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.credit-block-sub {
  font-size: 12px;
  color: #666;
  margin-top: 12px;
}

.credit-block-sub a {
  color: #e94560;
  text-decoration: underline;
}

/* ========================================
   ウォーターマーク通知
   ======================================== */
.watermark-notice {
  background: rgba(233, 69, 96, 0.1);
  border: 1px solid rgba(233, 69, 96, 0.2);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #ccc;
}

.watermark-notice p {
  margin-bottom: 8px;
}

/* ========================================
   フッター
   ======================================== */
.footer {
  background: #0f0f23;
  border-top: 1px solid #2a2a4a;
  padding: 24px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 12px;
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:visited {
  color: #888;
}

.footer-links a:hover {
  color: #ccc;
}

.footer-copy {
  font-size: 11px;
  color: #444;
}

.footer-copy a {
  color: #888;
  text-decoration: none;
}

.footer-copy a:visited {
  color: #888;
}

/* ========================================
   モーダル共通
   ======================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-box {
  background: #16213e;
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box-wide {
  max-width: 700px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #888;
  font-size: 28px;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 13px;
  color: #888;
  text-align: center;
  margin-bottom: 24px;
}

.modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.modal-divider::before,
.modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #2a2a4a;
}

.modal-divider span {
  font-size: 12px;
  color: #666;
}

.modal-terms {
  font-size: 11px;
  color: #555;
  text-align: center;
  margin-top: 16px;
}

.modal-terms a {
  color: #888;
  text-decoration: underline;
}

/* Googleボタン */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: #fff;
  color: #333;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.btn-google:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.google-icon {
  flex-shrink: 0;
}

/* ========================================
   プライシングカード
   ======================================== */
.pricing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.pricing-card {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 12px;
  padding: 24px 20px;
  position: relative;
}

.pricing-card-highlight {
  border-color: #e94560;
  box-shadow: 0 0 20px rgba(233, 69, 96, 0.15);
}

.pricing-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #e94560;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 10px;
}

.pricing-card-header h3 {
  font-size: 16px;
  color: #fff;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
}

.pricing-period {
  font-size: 14px;
  font-weight: 400;
  color: #888;
}

.pricing-annual {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

.pricing-features {
  list-style: none;
  margin: 20px 0;
}

.pricing-features li {
  font-size: 13px;
  color: #ccc;
  padding: 6px 0;
}

.feature-disabled {
  color: #555 !important;
}

/* クレジット追加購入 */
.credit-purchase {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.credit-purchase h3 {
  font-size: 15px;
  color: #fff;
  margin-bottom: 6px;
}

.credit-purchase p {
  font-size: 12px;
  color: #888;
  margin-bottom: 14px;
}

.credit-purchase-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* FAQ */
.pricing-faq {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 20px;
}

.pricing-faq h3 {
  font-size: 15px;
  color: #fff;
  margin-bottom: 14px;
}

.faq-item {
  margin-bottom: 14px;
}

.faq-item strong {
  display: block;
  font-size: 13px;
  color: #ccc;
  margin-bottom: 4px;
}

.faq-item p {
  font-size: 12px;
  color: #888;
}

/* ========================================
   ユーティリティ
   ======================================== */
.hidden {
  display: none !important;
}

/* BGMリストのスクロールバー */
.bgm-list::-webkit-scrollbar {
  width: 6px;
}

.bgm-list::-webkit-scrollbar-track {
  background: transparent;
}

.bgm-list::-webkit-scrollbar-thumb {
  background: #3a3a5c;
  border-radius: 3px;
}

/* ========================================
   レスポンシブ（スマホ対応）
   ======================================== */
@media (max-width: 600px) {
  .header {
    padding: 12px 16px;
    flex-direction: column;
    gap: 10px;
  }

  .pricing-cards {
    grid-template-columns: 1fr;
  }

  .credit-warning {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ========================================
   テロップ編集UI
   ======================================== */
.telop-edit-area {
  margin-top: 16px;
}

.telop-edit-container {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.telop-edit-preview {
  flex: 0 0 270px;
  position: sticky;
  top: 16px;
  align-self: flex-start;
}

.edit-preview-video {
  width: 100%;
  border-radius: 8px;
  background: #000;
}

.telop-edit-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 8px;
}

.telop-edit-list::-webkit-scrollbar {
  width: 6px;
}
.telop-edit-list::-webkit-scrollbar-track {
  background: #1a1a2e;
  border-radius: 3px;
}
.telop-edit-list::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.telop-segment-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #16213e;
  border: 1px solid #2a2a4a;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.telop-segment-item:hover {
  border-color: #e94560;
  background: #1a2744;
}

.telop-segment-item.active {
  border-color: #e94560;
  background: #1e2d50;
}

.segment-time {
  flex: 0 0 auto;
  font-size: 12px;
  color: #888;
  font-family: monospace;
  padding-top: 4px;
  white-space: nowrap;
  min-width: 55px;
}

.segment-text-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #e0e0e0;
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  outline: none;
  font-family: system-ui, -apple-system, sans-serif;
  min-height: 24px;
  overflow: hidden;
}

.segment-text-input:focus {
  color: #fff;
}

.segment-delete-btn {
  flex: 0 0 auto;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.segment-delete-btn:hover {
  color: #e94560;
  background: rgba(233, 69, 96, 0.1);
}

.telop-edit-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* スマホ対応 */
@media (max-width: 600px) {
  .telop-edit-container {
    flex-direction: column;
  }
  .telop-edit-preview {
    flex: none;
    position: static;
  }
  .telop-edit-list {
    max-height: 400px;
  }
}
