/* 広告複製System - デザインシステム ＆ スタイリング */

:root {
  --bg-color: #f0f2f5; /* Meta広告管理画面のライトグレー背景 */
  --panel-bg: #ffffff; /* 純白カードパネル */
  --panel-border: #ccd0d5; /* 落ち着いたボーダーグレー */
  --text-main: #1c1e21; /* Meta標準のプライマリテキスト（黒） */
  --text-muted: #65676b; /* セカンダリテキスト（グレー） */
  --primary-color: #0866ff; /* Metaブルー */
  --primary-grad: #0866ff; /* フラットカラー */
  --accent-color: #e4a11b; /* 警告用ゴールド */
  --success-color: #00a400; /* Metaアクティブグリーン */
  --danger-color: #f02849; /* Metaエラーレッド */
  --radius-lg: 8px; /* シャープでプロフェッショナルな角丸 */
  --radius-md: 6px;
  --shadow-lg: 0 1px 2px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05); /* フラットな影 */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, 'Noto Sans JP', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
  overflow-y: auto; /* 全体の縦スクロールを許可 */
}

.app-container {
  width: 100%;
  max-width: 1700px; /* 画面を広く使うために拡張 */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ヘッダー - 広告マネージャ風のフラットバー */
.app-header {
  text-align: left;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 8px;
  margin-bottom: 0px;
}

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

.logo-icon {
  font-size: 28px;
  color: var(--primary-color);
  font-weight: 800;
  line-height: 1;
}

.header-logo h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e7f3ff;
  border: 1px solid rgba(8, 102, 255, 0.2);
  color: var(--primary-color);
  font-weight: 600;
}

.header-desc {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

/* メインレイアウト - 左右余白を活かした3カラム構成 */
.app-main {
  display: grid;
  grid-template-columns: 350px 1fr 1fr; /* 入力: 350px, プレビュー: 1fr, 設定: 1fr で同じ幅にする */
  gap: 16px;
  align-items: stretch; /* すべてのカラムの高さを綺麗に揃える */
}

@media (max-width: 1100px) {
  .app-main {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

@media (max-width: 768px) {
  .app-main {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

/* パネル基本スタイル */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 各カラムの高さ調整設定 */
.input-panel,
.preview-column-panel,
.style-panel {
  height: 100%; /* すべてのパネルを高さいっぱいに伸ばして下端を揃える */
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-section h2 {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #f0f2f5;
  padding-bottom: 8px;
}

.step-num {
  background: var(--primary-color);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

/* アップロードゾーン */
.upload-zone {
  border: 2px dashed var(--panel-border);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f8f9fa;
  position: relative;
  overflow: hidden;
}

.upload-zone:hover {
  border-color: var(--primary-color);
  background: #f0f8ff;
}

.upload-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.upload-text-main {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.upload-text-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* アップロード後のファイル表示 */
.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f2f5;
  border: 1px solid var(--panel-border);
  padding: 10px;
  border-radius: var(--radius-md);
}

.file-icon {
  font-size: 20px;
}

.file-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-grow: 1;
  min-width: 0;
}

.file-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.file-size {
  font-size: 11px;
  color: var(--text-muted);
}

/* ボタン関係 */
.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-icon:hover {
  background: #e4e6eb;
  color: var(--danger-color);
}

/* テキスト入力エリア */
textarea {
  width: 100%;
  height: 90px;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  line-height: 1.4;
  transition: all 0.2s;
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(8, 102, 255, 0.2);
}

.helper-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: -2px;
}

/* スタイルグリッド */
.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.input-group input[type="number"] {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  transition: all 0.2s;
}

.input-group input[type="number"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(8, 102, 255, 0.2);
}

/* カラーピッカーのラッパー */
.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 4px 8px;
  height: 34px;
}

.color-picker-wrapper input[type="color"] {
  border: 1px solid #ddd;
  background: transparent;
  width: 24px;
  height: 24px;
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
}

.color-code {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-main);
  text-transform: uppercase;
}

/* スタイル行・範囲入力 */
.style-row {
  display: flex;
  gap: 10px;
}

.range-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.range-inputs input[type="number"] {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 6px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  text-align: center;
  transition: all 0.2s;
}

.range-inputs input[type="number"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(8, 102, 255, 0.2);
}

/* 位置コントロール */
.position-controls {
  background: #f8f9fa;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.position-controls label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.position-grid {
  display: flex;
  gap: 12px;
}

.input-group-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.input-group-inline input {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 6px 8px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  width: 60px;
  text-align: center;
  transition: all 0.2s;
}

.input-group-inline input:focus:not([readonly]) {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(8, 102, 255, 0.2);
}

.input-group-inline input[readonly] {
  color: var(--text-muted);
  background: #e4e6eb;
  border-color: #ccd0d5;
}

/* メインボタン - 広告マネージャの実行ボタン風 */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.btn-primary {
  background: var(--primary-color);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover:not(:disabled) {
  background: #0055d4;
}

.btn-primary:active:not(:disabled) {
  background: #0045ab;
  transform: translateY(0);
}

.btn:disabled {
  background: #e4e6eb;
  color: #bcc0c4;
  box-shadow: none;
  cursor: not-allowed;
}

/* 右ペイン: プレビューエリア */
.preview-panel {
  flex-grow: 1;
}

.preview-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.preview-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 450px; /* プレビューの視認性をさらに高めた最大幅 */
  max-height: 800px; /* プレビュー画面が見やすくなる最適な高さ制限 */
  aspect-ratio: 9/16;
  background: #1c1e21; /* クリエイティブが映えるディープグレー背景 */
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--panel-border);
  margin: 0 auto;
}

#previewCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#previewCanvas:active {
  cursor: grabbing;
}

.preview-overlay-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 11px;
  pointer-events: none;
  background: rgba(28, 30, 33, 0.85);
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  width: 80%;
}

/* シークバー */
.seek-control {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 450px; /* プレビューの実幅に合わせて中央揃えにする */
  background: #f8f9fa;
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  margin: 0 auto;
}

.time-label {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted);
  width: 34px;
}

#seekSlider {
  flex-grow: 1;
  accent-color: var(--primary-color);
  background: #ccd0d5;
  height: 4px;
  border-radius: 2px;
  cursor: pointer;
}

.btn-play-pause {
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding-left: 2px; /* 再生アイコン（▶）を中央寄りに調整 */
}

.btn-play-pause.playing {
  background: var(--text-main);
  padding-left: 0; /* 一時停止アイコン（⏸）用の中央リセット */
}

.btn-play-pause:hover:not(:disabled) {
  background: #0055d4;
  transform: scale(1.05);
}

.btn-play-pause.playing:hover:not(:disabled) {
  background: #333333;
}

.btn-play-pause:active:not(:disabled) {
  transform: scale(0.95);
}

.btn-play-pause:disabled {
  background: #ccd0d5;
  color: #bcc0c4;
  cursor: not-allowed;
}


/* プログレスカード */
.progress-card {
  background: #f8f9fa;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-status-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.progress-count {
  font-size: 12px;
  font-family: monospace;
  color: var(--text-muted);
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: #ccd0d5;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  transition: width 0.2s ease;
  position: relative;
}

.current-processing-info {
  font-size: 11px;
  color: var(--accent-color);
  font-weight: 600;
}

.output-list-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 6px;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 4px;
}

.output-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 2px;
}

.output-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--panel-border);
  transition: all 0.15s;
}

.output-item:hover {
  background: #f0f2f5;
  border-color: #ccd0d5;
}

.output-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
  background: #e7f3ff;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}

.btn-download:hover {
  background: var(--primary-color);
  color: #fff;
}

/* フォント検索入力欄 */
.font-search-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  transition: all 0.2s;
  margin-bottom: 6px;
}

.font-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(8, 102, 255, 0.2);
}

.font-search-input::placeholder {
  color: var(--text-muted);
}

/* ビジュアルフォントセレクター */
.font-selector-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 6px;
  background: #f8f9fa;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* スクロールバーのカスタマイズ (ライトテーマ用) */
.font-selector-container::-webkit-scrollbar {
  width: 6px;
}
.font-selector-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}
.font-selector-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
.font-selector-container::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

.font-card {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--panel-border);
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  user-select: none;
}

.font-card:hover {
  background: #f0f2f5;
  border-color: #ccd0d5;
}

/* 選択中のカード：広告マネージャ風の爽やかなブルー配色 */
.font-card.active {
  background: #e7f3ff;
  border-color: var(--primary-color);
  border-width: 1px;
}

.font-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.font-card-name {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* 選択中のカードのテキストカラーをMetaブルーに */
.font-card.active .font-card-name {
  color: var(--primary-color);
}

.font-card-badge {
  font-size: 9px;
  background: #fff0d4;
  color: #a05a00;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  border: 1px solid rgba(228, 161, 27, 0.2);
}

/* テキストが見やすいようにカラーを白から黒へ */
.font-card-preview {
  font-size: 18px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 0;
}

.font-card.active .font-card-preview {
  color: #002d7a;
  font-weight: 600;
}

.font-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.btn-font-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-font-action:hover {
  background: #f0f2f5;
  border-color: #ccd0d5;
  color: var(--text-main);
}

.btn-font-action:active {
  background: #e4e6eb;
}

.btn-font-upload {
  background: #e7f3ff;
  border: 1px solid rgba(8, 102, 255, 0.2);
  color: var(--primary-color);
}

.btn-font-upload:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.btn-font-upload:active {
  background: #0045ab;
}

/* お気に入り（スター）ボタンのスタイル */
.font-card-fav-btn {
  background: none;
  border: none;
  color: #ccd0d5; /* 通常は薄いグレーの星 */
  font-size: 15px;
  cursor: pointer;
  padding: 4px;
  margin-left: auto; /* メタ情報の右端に寄せる */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
  border-radius: 4px;
}

.font-card-fav-btn:hover {
  color: #ffb300; /* ホバー時はゴールド */
  background-color: rgba(255, 179, 0, 0.1);
  transform: scale(1.15);
}

.font-card-fav-btn.active {
  color: #ffb300; /* お気に入り登録時は星マークをゴールドに */
}

.font-card-fav-btn.active:hover {
  background-color: rgba(255, 179, 0, 0.15);
}

/* お気に入り登録されているカード自体のスタイル */
.font-card.favored {
  border-left: 3px solid #ffb300; /* 左側にゴールド of ワンポイント線 */
}

/* ==========================================
   ユーザー認証画面 (ログイン・登録フォーム)
   ========================================== */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
}

.auth-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-header .logo-icon {
  font-size: 40px;
  color: var(--primary-color);
  font-weight: 800;
  display: inline-block;
  margin-bottom: 12px;
  animation: float 3s ease-in-out infinite;
}

.auth-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.15s;
}

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

/* ヘッダーのログインステータス */
.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.user-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

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

.user-email-display {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.btn-logout {
  background: #f0f2f5;
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-logout:hover {
  background: var(--danger-color);
  color: #ffffff;
  border-color: var(--danger-color);
}

/* ==========================================
   作成履歴テーブル
   ========================================== */
.history-section {
  margin-top: 12px;
  width: 100%;
}

.history-table-wrapper {
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  overflow-y: auto;
  max-height: 180px; /* 履歴が多くなっても画面を突き抜けないように */
  background: #ffffff;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.history-table th,
.history-table td {
  padding: 12px 16px;
  font-size: 13px;
}

.history-table th {
  background: #f8f9fa;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--panel-border);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.history-table td {
  border-bottom: 1px solid #f0f2f5;
  color: var(--text-main);
  vertical-align: middle;
}

.history-table tr:last-child td {
  border-bottom: none;
}

.history-table tbody tr:hover {
  background: #fcfdfe;
}

.history-table .no-data {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
  font-style: italic;
}

.btn-table-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: #e7f3ff;
  color: var(--primary-color);
  border: 1px solid rgba(8, 102, 255, 0.2);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0 auto;
}

.btn-table-download:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(8, 102, 255, 0.2);
}

.btn-table-download:active {
  background: #0045ab;
  transform: translateY(1px);
}

/* アニメーション */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* アニメーション & シャドウ調整パネル用スタイル */
#animationType {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  transition: all 0.2s;
  cursor: pointer;
}

#animationType:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(8, 102, 255, 0.2);
}

.shadow-settings-panel {
  transition: background-color 0.2s ease;
}

.shadow-controls-grid.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* 操作防止シールドオーバーレイのスタイル */
.control-panel {
  position: relative;
}

.panel-shield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85); /* 半透明の白で隠す */
  backdrop-filter: blur(2px); /* グラスモフィズムぼかし */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: var(--radius-lg);
  animation: fadeIn 0.2s ease;
}

.shield-content {
  text-align: center;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  max-width: 85%;
}

.shield-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 12px;
  animation: float 2s infinite ease-in-out;
}

.shield-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
}

/* 処理状況インジケーターを操作防止シールド（z-index: 9999）の前面に浮かび上がらせる */
.progress-section {
  position: relative;
  z-index: 10000;
}
