/* Deep Research UI Styles */

.research-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.research-form-section,
.research-progress-section,
.research-results-section {
  background: var(--card, #12161b);
  border-radius: var(--radius-lg, 14px);
  border: 1px solid var(--border, #222831);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.15));
}

.research-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--fg, #e7eaee);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.75rem;
  border: 1px solid var(--border, #222831);
  border-radius: var(--radius-sm, 6px);
  font-size: 1rem;
  background: var(--bg-secondary, #12161b);
  color: var(--fg, #e7eaee);
  transition: all var(--transition-fast, 150ms ease);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand, #6699cc);
  box-shadow: 0 0 0 2px rgba(102, 153, 204, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.checkbox-group {
  display: flex;
  gap: 1rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
}

/* Research-specific button overrides - inherits from main style.css */
.research-form-section .btn-primary,
.research-results-section .btn-primary {
  background: linear-gradient(135deg, var(--brand, #6699cc), var(--accent, #6655dd));
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md, 10px);
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-base, 250ms ease);
  box-shadow: 0 2px 8px rgba(102, 153, 204, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.research-form-section .btn-primary:hover,
.research-results-section .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 153, 204, 0.3);
  background: linear-gradient(135deg, var(--brand-hover, #7dd3fc), var(--accent-hover, #818cf8));
}

.research-form-section .btn-primary:active,
.research-results-section .btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary, #12161b);
  color: var(--fg, #e7eaee);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--border, #222831);
  text-decoration: none;
  margin-right: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-base, 250ms ease);
}

.btn-secondary:hover {
  background: var(--card-hover, #1a1e25);
  border-color: var(--brand, #6699cc);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.1));
}

.progress-bar-container {
  margin: 1rem 0;
}

.progress-bar {
  width: 100%;
  height: 30px;
  background: var(--bg-secondary, #12161b);
  border-radius: var(--radius-lg, 14px);
  border: 1px solid var(--border, #222831);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand, #6699cc), var(--accent, #6655dd));
  transition: width var(--transition-base, 250ms ease);
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 0 10px rgba(102, 153, 204, 0.3);
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  color: var(--fg, #e7eaee);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.progress-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--fg-secondary, #cbd5e0);
}

.progress-status.error {
  color: var(--error, #ef4444);
}

/* Loading Spinner */
.progress-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(102, 153, 204, 0.3);
  border-top-color: var(--brand, #6699cc);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.progress-status.loading::before {
  content: '';
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(102, 153, 204, 0.3);
  border-top-color: var(--brand, #6699cc);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.report-actions {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border, #222831);
}

.report-content {
  line-height: 1.8;
  color: var(--fg, #e7eaee);
  font-size: 1.05rem;
  max-width: 100%;
  overflow-x: auto;
  background: transparent;
}

/* Professional Report Header */
.report-header {
  background: linear-gradient(135deg, rgba(102, 153, 204, 0.1), rgba(102, 85, 221, 0.1));
  border-left: 4px solid var(--brand, #6699cc);
  padding: 1.5rem;
  border-radius: var(--radius-md, 10px);
  margin-bottom: 2rem;
}

.report-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg, #e7eaee);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.report-header .query-badge {
  display: inline-block;
  background: var(--brand, #6699cc);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

/* Executive Summary Card */
.executive-summary-card {
  background: var(--card, #12161b);
  border: 1px solid var(--border, #222831);
  border-left: 4px solid var(--accent, #6655dd);
  border-radius: var(--radius-md, 10px);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.executive-summary-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fg, #e7eaee);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.executive-summary-card p {
  color: var(--fg-secondary, #cbd5e0);
  line-height: 1.8;
  margin: 0;
  font-size: 1.05rem;
}

/* Findings Cards */
.findings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.finding-card {
  background: var(--card, #12161b);
  border: 1px solid var(--border, #222831);
  border-radius: var(--radius-md, 10px);
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.finding-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 153, 204, 0.2);
  border-color: var(--brand, #6699cc);
}

.finding-card:active {
  transform: translateY(0);
}

.read-aloud-btn {
  background: none !important;
  border: none !important;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin-left: 0.5rem;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
  color: var(--fg-secondary, #cbd5e0);
}

.read-aloud-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.read-aloud-btn:active {
  transform: scale(0.95);
}

.finding-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--brand, #6699cc), var(--accent, #6655dd));
  transition: width 0.3s ease;
}

.finding-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 153, 204, 0.2);
  border-color: var(--brand, #6699cc);
}

.finding-card:hover::before {
  width: 6px;
}

.finding-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.finding-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--brand, #6699cc), var(--accent, #6655dd));
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.finding-title {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg, #e7eaee);
  margin: 0;
  line-height: 1.4;
}

.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.confidence-score {
  font-size: 0.7rem;
  opacity: 0.9;
  margin-left: 0.25rem;
}

.confidence-high {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.confidence-medium {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.confidence-low {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.finding-insight {
  color: var(--fg-secondary, #cbd5e0);
  line-height: 1.7;
  margin: 1rem 0;
  font-size: 1rem;
}

.evidence-quotes {
  margin: 1rem 0;
  padding: 0;
}

.evidence-quote {
  background: rgba(102, 153, 204, 0.05);
  border-left: 3px solid var(--brand, #6699cc);
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0;
  font-style: italic;
  color: var(--fg-secondary, #cbd5e0);
  line-height: 1.7;
  position: relative;
}

.evidence-quote::before {
  content: '"';
  font-size: 3rem;
  position: absolute;
  top: -0.5rem;
  left: 0.5rem;
  color: rgba(102, 153, 204, 0.2);
  font-family: Georgia, serif;
  line-height: 1;
}

.citations-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #222831);
}

.citation-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-secondary, #12161b);
  border: 1px solid var(--border, #222831);
  border-radius: var(--radius-sm, 6px);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--brand, #6699cc);
  text-decoration: none;
  transition: all 0.2s ease;
}

.citation-badge:hover {
  background: var(--brand, #6699cc);
  color: white;
  border-color: var(--brand, #6699cc);
  transform: translateY(-1px);
}

/* Story Story Timeline Section */
.timeline-section {
  margin: 2rem 0;
}

.timeline-container {
  position: relative;
  padding-left: 2rem;
  margin: 2rem 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--brand, #6699cc), var(--accent, #6655dd));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  background: var(--brand, #6699cc);
  border: 3px solid var(--card, #12161b);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--brand, #6699cc);
}

.timeline-date {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand, #6699cc), var(--accent, #6655dd));
  color: white;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-event {
  background: var(--card, #12161b);
  border: 1px solid var(--border, #222831);
  border-radius: var(--radius-md, 10px);
  padding: 1rem 1.25rem;
  color: var(--fg, #e7eaee);
  line-height: 1.7;
  margin-top: 0.5rem;
}

.timeline-citations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Source Type Badges */
.source-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.badge-trove {
  background: rgba(102, 153, 204, 0.2);
  color: var(--brand, #6699cc);
  border: 1px solid rgba(102, 153, 204, 0.3);
}

.badge-web {
  background: rgba(101, 85, 221, 0.2);
  color: var(--accent, #6655dd);
  border: 1px solid rgba(101, 85, 221, 0.3);
}

.badge-verified {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-unverified {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Archive Archive Sources Section */
.sources-section {
  margin: 2rem 0;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.source-card {
  background: var(--card, #12161b);
  border: 1px solid var(--border, #222831);
  border-radius: var(--radius-md, 10px);
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.source-card:hover {
  border-color: var(--brand, #6699cc);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 153, 204, 0.15);
}

.source-title {
  font-weight: 600;
  color: var(--fg, #e7eaee);
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  line-height: 1.4;
}

.source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--fg-secondary, #cbd5e0);
  margin-top: 0.75rem;
}

.source-year {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.relevance-score {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(102, 153, 204, 0.1);
  border-radius: var(--radius-sm, 6px);
  font-size: 0.875rem;
  font-weight: 500;
}

.relevance-score.relevance-high {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success, #10b981);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.relevance-score.relevance-medium {
  background: rgba(244, 162, 97, 0.15);
  color: var(--warn, #f4a261);
  border: 1px solid rgba(244, 162, 97, 0.3);
}

.relevance-score.relevance-low {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error, #ef4444);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.source-snippet {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--fg-secondary, #cbd5e0);
  line-height: 1.6;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm, 6px);
  border-radius: var(--radius-sm, 6px);
  font-weight: 600;
  color: var(--brand, #6699cc);
}

.source-link {
  color: var(--brand, #6699cc);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.source-link:hover {
  color: var(--accent, #6655dd);
  text-decoration: underline;
}

/* Read-Aloud Button Styles */
.btn-read-aloud-card {
  background: rgba(102, 126, 234, 0.15) !important;
  border: 1px solid rgba(102, 126, 234, 0.3) !important;
  color: var(--accent, #818cf8) !important;
  padding: 0.375rem 0.75rem !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 0.875rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  transition: all 0.2s ease !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

.btn-read-aloud-card:hover {
  background: rgba(102, 126, 234, 0.25) !important;
  border-color: rgba(102, 126, 234, 0.5) !important;
  color: var(--accent, #a5b4fc) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2) !important;
}

.btn-read-aloud-card:active {
  transform: translateY(0) !important;
  box-shadow: 0 1px 2px rgba(102, 126, 234, 0.15) !important;
}

.btn-read-aloud-card.active,
.btn-read-aloud-card.playing {
  background: rgba(102, 126, 234, 0.3) !important;
  border-color: rgba(102, 126, 234, 0.6) !important;
  color: var(--accent, #c7d2fe) !important;
}

/* TTS Voice Settings Panel */
.tts-settings-panel {
  background: var(--card, #12161b);
  border: 1px solid var(--border, #222831);
  border-radius: var(--radius-lg, 14px);
  padding: 0;
  margin: 1.5rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tts-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border, #222831);
}

.tts-settings-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg, #e7eaee);
}

.tts-settings-close {
  background: transparent;
  border: none;
  color: var(--fg-secondary, #cbd5e0);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.tts-settings-close:hover {
  background: var(--bg-secondary, #1a1f2e);
  color: var(--fg, #e7eaee);
}

.tts-settings-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tts-setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tts-setting-group label {
  font-weight: 600;
  color: var(--fg, #e7eaee);
  font-size: 0.9rem;
}

.tts-voice-select {
  padding: 0.75rem;
  border: 1px solid var(--border, #222831);
  border-radius: var(--radius-sm, 6px);
  background: var(--bg-secondary, #12161b);
  color: var(--fg, #e7eaee);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tts-voice-select:focus {
  outline: none;
  border-color: var(--brand, #6699cc);
  box-shadow: 0 0 0 2px rgba(102, 153, 204, 0.1);
}

.tts-dial {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-secondary, #12161b);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.tts-dial::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand, #6699cc);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.tts-dial::-webkit-slider-thumb:hover {
  background: var(--accent, #6655dd);
  transform: scale(1.1);
}

.tts-dial::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand, #6699cc);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.tts-dial::-moz-range-thumb:hover {
  background: var(--accent, #6655dd);
  transform: scale(1.1);
}

.tts-dial-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--fg-secondary, #cbd5e0);
  margin-top: 0.25rem;
}

.tts-setting-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #222831);
}

.tts-setting-actions button {
  flex: 1;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2.5rem 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border, #222831);
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--fg, #e7eaee);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-icon {
  font-size: 1.5rem;
}

.section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  background: var(--brand, #6699cc);
  color: white;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 600;
  margin-left: auto;
}

/* Stats Badge */
.stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(102, 153, 204, 0.1);
  border: 1px solid rgba(102, 153, 204, 0.2);
  border-radius: var(--radius-md, 10px);
  font-size: 0.875rem;
  color: var(--brand, #6699cc);
  margin: 0.5rem 0.5rem 0.5rem 0;
}

/* Skeleton Loading UI */
.skeleton-container {
  animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-card {
  background: var(--card, #12161b);
  border: 1px solid var(--border, #222831);
  border-radius: var(--radius-md, 10px);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.skeleton-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2.5rem 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border, #222831);
}

.skeleton-line {
  height: 1rem;
  background: linear-gradient(
    90deg,
    var(--bg-secondary, #1a1f26) 0%,
    var(--border, #222831) 50%,
    var(--bg-secondary, #1a1f26) 100%
  );
  background-size: 200% 100%;
  border-radius: var(--radius-sm, 6px);
  animation: shimmer 1.5s infinite;
}

.skeleton-title {
  height: 1.5rem;
  width: 60%;
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--fg-secondary, #cbd5e0);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Responsive - Mobile Improvements */
@media (max-width: 768px) {
  .research-container {
    padding: 1rem;
  }
  
  .research-form-section,
  .research-progress-section,
  .research-results-section {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .findings-grid,
  .sources-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .timeline-container {
    padding-left: 1.5rem;
  }
  
  .report-header h1 {
    font-size: 1.5rem;
  }
  
  .executive-summary-card {
    padding: 1.25rem;
  }
  
  .finding-card {
    padding: 1.25rem;
  }
  
  .source-card {
    padding: 1rem;
  }
  
  /* Ensure buttons are touch-friendly */
  .research-form-section .btn-primary,
  .research-results-section .btn-primary,
  .btn-secondary {
    min-height: 44px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
  }
  
  /* Stack button groups */
  .report-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .report-actions .btn-primary,
  .report-actions .btn-secondary {
    width: 100%;
  }
  
  /* Read-aloud buttons mobile optimization */
  .btn-read-aloud-card {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
  }
  
  /* TTS Settings Panel Mobile */
  .tts-settings-panel {
    margin: 1rem 0;
  }
  
  .tts-settings-content {
    padding: 1rem;
  }
  
  .tts-setting-group {
    margin-bottom: 1.25rem;
  }
}

/* Small phones (< 480px) */
@media (max-width: 480px) {
  .research-container {
    padding: 0.75rem;
  }
  
  .research-form-section,
  .research-progress-section,
  .research-results-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .report-header h1 {
    font-size: 1.25rem;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
  
  .finding-title {
    font-size: 1.1rem;
  }
  
  .executive-summary-card h2 {
    font-size: 1.25rem;
  }
}

.report-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #0066cc;
  line-height: 1.2;
}

.report-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #2c3e50;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-top: 0.5rem;
  line-height: 1.3;
}

.report-content h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #34495e;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.report-content p {
  margin: 1rem 0;
  line-height: 1.8;
  color: #2c3e50;
}

.report-content em {
  color: #666;
  font-style: italic;
  font-size: 0.95rem;
}

.report-content ul,
.report-content ol {
  margin: 1.25rem 0;
  padding-left: 2.5rem;
  line-height: 1.8;
}

.report-content li {
  margin: 0.75rem 0;
  line-height: 1.8;
}

.report-content ul li {
  list-style-type: disc;
}

.report-content ol li {
  list-style-type: decimal;
}

.report-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 6px;
  overflow: hidden;
}

.report-content table th,
.report-content table td {
  padding: 0.875rem 1rem;
  border: 1px solid #e0e0e0;
  text-align: left;
  line-height: 1.6;
}

.report-content table th {
  background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
  font-weight: 600;
  color: #2c3e50;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.report-content table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.report-content table tr:hover {
  background-color: #e8f4f8;
  transition: background-color 0.2s ease;
}

.report-content table td {
  color: #2c3e50;
}

.report-content a {
  color: #0066cc;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.report-content a:hover {
  color: #0052a3;
  border-bottom-color: #0052a3;
}

.report-content strong {
  font-weight: 600;
  color: #1a1a1a;
}

.report-content .error {
  color: #d32f2f;
  font-weight: 600;
  background-color: #ffebee;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border-left: 4px solid #d32f2f;
}

.report-content hr {
  border: none;
  border-top: 2px solid #e0e0e0;
  margin: 2rem 0;
}

.report-content blockquote {
  border-left: 4px solid #0066cc;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: #555;
  font-style: italic;
  background-color: #f8f9fa;
  padding: 1rem 1.5rem;
  border-radius: 4px;
}

.report-content code {
  background-color: #f4f4f4;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #d63384;
}

.report-content pre {
  background-color: #f4f4f4;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  border: 1px solid #e0e0e0;
}

.report-content pre code {
  background: none;
  padding: 0;
  color: #2c3e50;
}

