/* ============================================================
   Transcription Tool App - style.css
   ============================================================ */

:root {
  --primary: #d4af37;
  --primary-hover: #eab308;
  --bg-color: #050505;
  --panel-bg: rgba(15, 15, 15, 0.85);
  --text-primary: #f8fafc;
  --text-secondary: #a1a1aa;
  --accent: #fef08a;
  --error: #ef4444;
  --success: #10b981;
  --radius: 16px;
  --shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top right, #1a1a1a, #050505);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  line-height: 1.6;
}

/* --- 背景アニメーション --- */
.background-blobs {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}

.blob-1 {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  width: 500px;
  height: 500px;
  top: -150px;
  left: -150px;
  animation: float1 12s ease-in-out infinite alternate;
}

.blob-2 {
  background: linear-gradient(135deg, #d4af37, #fef08a);
  width: 350px;
  height: 350px;
  bottom: -80px;
  right: -80px;
  animation: float2 10s ease-in-out infinite alternate-reverse;
}

.blob-3 {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  width: 250px;
  height: 250px;
  top: 50%;
  right: 20%;
  animation: float3 14s ease-in-out infinite alternate;
}

@keyframes float1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.1); }
}

@keyframes float2 {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-40px, -30px) rotate(15deg); }
}

@keyframes float3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-50px, 30px) scale(0.9); }
}

/* --- メインコンテナ --- */
.container {
  width: 92%;
  max-width: 820px;
  padding: 2.5rem;
  z-index: 1;
  margin: 2rem 0;
}

.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.glass-panel-inner {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.1);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

/* --- ヘッダー --- */
header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo-mark {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  animation: pulse 3s ease-in-out infinite;
}

.app-logo {
  width: 180px;
  height: 180px;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

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

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #d4af37, #facc15, #fef08a);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- 設定ボタン --- */
.settings-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.settings-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(90deg);
}

/* --- コンテンツグリッド --- */
.content-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-label {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* --- タブ --- */
.tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  padding: 0.9rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-family: inherit;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.tab-btn.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--primary);
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.tab-icon {
  font-size: 1.3rem;
}

.tab-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  color: var(--text-muted);
}

.tab-btn.active .tab-badge {
  background: rgba(99, 102, 241, 0.3);
  color: var(--primary);
}

/* --- ドロップゾーン --- */
.drop-zone {
  border: 2px dashed rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-md);
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(212, 175, 55, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary-color);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

.drop-zone-icon {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}

.drop-zone-text {
  color: var(--text-muted);
  pointer-events: none;
  line-height: 1.6;
  font-size: 0.95rem;
}

.drop-zone-text strong {
  color: var(--primary);
}

.drop-zone-hint {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.6);
  margin-top: 0.25rem;
}

/* --- Drive ゾーン --- */
.drive-zone {
  border: 2px dashed rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-md);
  padding: 2.5rem 1rem;
  text-align: center;
  background: rgba(168, 85, 247, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.drive-zone:hover {
  border-color: rgba(168, 85, 247, 0.5);
}

.secondary-btn {
  padding: 0.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

/* --- ファイル名表示 --- */
.file-name-display {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: right;
  word-break: break-all;
  transition: color 0.3s;
}

.file-name-display.has-file {
  color: var(--success-color);
}

.file-icon {
  margin-right: 0.25rem;
}

.file-size {
  opacity: 0.6;
  font-size: 0.8rem;
}

/* --- 速度アップのコツ --- */
.compression-tip {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(212, 175, 55, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  text-align: left;
}

.tip-icon {
  font-size: 1.25rem;
  line-height: 1;
  color: var(--primary);
  margin-top: 0.1rem;
}

.tip-content {
  flex: 1;
}

.tip-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.tip-text strong {
  color: var(--primary);
  font-weight: 600;
}

/* --- フォーム --- */
.form-group {
  margin-top: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.label-hint {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.8rem;
}

.form-group input {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.form-group input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

/* --- オプションセクション --- */
.options-section {
  margin-top: 1.5rem;
}

.options-toggle {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius, 16px);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.options-toggle:hover {
  background: rgba(212, 175, 55, 0.06);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--primary);
}

.options-toggle.active {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--primary);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.options-toggle-icon {
  font-size: 1rem;
}

.options-toggle-arrow {
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.options-toggle.active .options-toggle-arrow {
  transform: rotate(180deg);
}

.options-panel {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-top: none;
  border-bottom-left-radius: var(--radius, 16px);
  border-bottom-right-radius: var(--radius, 16px);
  padding: 1.25rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.option-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.option-group-full {
  margin-top: 1rem;
  grid-column: 1 / -1;
}

.option-group select,
.option-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}

.option-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a1a1aa' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}

.option-group select:focus,
.option-group textarea:focus {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.option-group select:hover,
.option-group textarea:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.option-group textarea {
  resize: vertical;
  min-height: 50px;
  line-height: 1.5;
}

.option-group textarea::placeholder {
  color: rgba(148, 163, 184, 0.4);
  font-size: 0.8rem;
}

.option-group select option {
  background: #1a1a1a;
  color: #f8fafc;
  padding: 0.5rem;
}

@media (max-width: 640px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
}

/* --- プライマリボタン --- */
.primary-btn {
  width: 100%;
  padding: 1rem;
  margin-top: 2rem;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #111;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.35);
}

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

.primary-btn:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: #555;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-icon {
  font-size: 0.85rem;
}

/* --- ステータスセクション --- */
.status-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --- ステップインジケーター --- */
.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding: 0 0.25rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  opacity: 0.3;
  transition: all 0.4s ease;
}

.step.active {
  opacity: 1;
}

.step.completed {
  opacity: 0.7;
}

.step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.step.active .step-icon {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.step.completed .step-icon {
  background: rgba(52, 211, 153, 0.2);
  border-color: var(--success-color);
  color: var(--success-color);
}

.step-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.step.active .step-label {
  color: var(--text-main);
  font-weight: 500;
}

/* --- プログレスバー --- */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  margin: 1rem 0 0.5rem 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
  border-radius: 3px;
}

.progress-bar.indeterminate {
  width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent), #0ea5e9, var(--primary));
  background-size: 300% 100%;
  animation: shimmer 2.5s infinite linear;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.progress-detail {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
}

#status-text {
  font-size: 1rem;
  font-weight: 500;
}

#status-text.error {
  color: var(--error-color);
}

/* --- 結果カード --- */
.result-card {
  text-align: center;
  padding: 2rem;
  animation: fadeInUp 0.5s ease;
}

.result-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.result-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--success-color), #6ee7b7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.result-card p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.doc-link-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(110, 231, 183, 0.1));
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: var(--radius-sm);
  color: var(--success-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  gap: 0.5rem;
  font-size: 1rem;
}

.doc-link-btn:hover {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.25), rgba(110, 231, 183, 0.15));
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.2);
}

/* --- モーダル (設定画面) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  width: 90%;
  max-width: 450px;
  background: var(--bg-surface);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h2 {
  font-size: 1.25rem;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--error-color);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- フッター --- */
.app-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

.app-footer p {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.4);
  letter-spacing: 0.02em;
}

/* --- レスポンシブ --- */
@media (max-width: 640px) {
  .container {
    width: 95%;
    padding: 1.5rem;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .tabs {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tab-btn {
    flex-direction: row;
    justify-content: center;
    padding: 0.75rem;
  }

  .step-indicator {
    gap: 0.1rem;
  }

  .step-label {
    font-size: 0.55rem;
  }

  .step-icon {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .drop-zone {
    padding: 2rem 1rem;
  }
}

/* --- リーガルページ用スタイル --- */
.page-content {
  max-width: 800px;
}

.page-content header {
  margin-bottom: 2rem;
}

.page-content h2 {
  color: var(--primary);
  margin-top: 1rem;
  font-size: 1.5rem;
}

.small-logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
  transition: transform 0.3s ease;
}

.small-logo:hover {
  transform: scale(1.05);
}

.legal-text {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.legal-text h3 {
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  border-left: 4px solid var(--primary);
  padding-left: 0.8rem;
}

.legal-text p {
  margin-bottom: 1rem;
}

.legal-text ul, .legal-text ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.legal-text li {
  margin-bottom: 0.5rem;
}

/* ============================================================
   画面内プレビュー＆マルチフォーマット書き出しスタイル
   ============================================================ */
.preview-container {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  margin: 1.5rem 0;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: rgba(212, 175, 55, 0.05);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.preview-tabs {
  display: flex;
  gap: 0.5rem;
}

.preview-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.preview-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.preview-tab.active {
  color: #111;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.copy-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.4);
  color: var(--primary);
  transform: translateY(-1px);
}

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

.preview-body {
  padding: 1.25rem;
  max-height: 250px;
  overflow-y: auto;
  text-align: left;
}

/* スクロールバーの美化 */
.preview-body::-webkit-scrollbar {
  width: 6px;
}
.preview-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.preview-body::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}
.preview-body::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}

.preview-content {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-all;
}

.export-options-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  border-left: 3px solid var(--primary);
  padding-left: 0.5rem;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.export-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.8rem 0.5rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.25s ease;
}

.export-btn-icon {
  font-size: 1.3rem;
}

/* ボタン個別のホバーカラー */
.txt-btn:hover {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.4);
  color: #f8fafc;
  box-shadow: 0 4px 12px rgba(148, 163, 184, 0.15);
}

.md-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.word-btn:hover {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.4);
  color: #3b82f6;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.gdoc-btn:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.gdoc-status {
  font-size: 0.8rem;
  margin-top: 0.75rem;
  color: #34d399;
  text-align: center;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================================
   話者色分け・聞き取り不明箇所の装飾スタイル
   ============================================================ */
.speaker-1 {
  color: #38bdf8 !important; /* 明るいスカイブルー（話者A） */
  font-weight: 600;
}

.speaker-2 {
  color: #fb7185 !important; /* 温かみのあるローズピンク（話者B） */
  font-weight: 600;
}

.speaker-3 {
  color: #34d399 !important; /* 爽やかなエメラルドグリーン（話者C） */
  font-weight: 600;
}

.speaker-4 {
  color: #fbbf24 !important; /* 知的なアンバーゴールド（話者D） */
  font-weight: 600;
}

.unclear {
  color: #f87171 !important; /* 視認性の高い赤 */
  background: rgba(248, 113, 113, 0.15) !important;
  border: 1px solid rgba(248, 113, 113, 0.3) !important;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
  margin: 0 2px;
}

@media (max-width: 640px) {
  .export-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- アプデ履歴のスクロールバー美化 --- */
.history-container {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 0.5rem;
}
.history-container::-webkit-scrollbar {
  width: 6px;
}
.history-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
.history-container::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.25);
  border-radius: 3px;
}
.history-container::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.45);
}

/* API Quota Checker */
.quota-checker {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
  margin-bottom: 15px;
}
.quota-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.quota-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}
.quota-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #34d399, #d4af37);
  transition: width 0.5s ease-out;
}
.quota-message {
  font-size: 0.8rem;
  margin-top: 6px;
  color: #34d399;
}
