.content-analyzer-pro {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  margin: 20px 0;
  max-width: 800px;
}

.analyzer-form h3 {
  margin-top: 0;
  font-size: 18px;
}

.api-selection {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.api-selection label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
}

.provider-options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.provider-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: normal;
}

.provider-options a {
  color: #0073aa;
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
}

.provider-options a:hover {
  text-decoration: underline;
}

.analyzer-form p {
  margin: 15px 0;
}

.analyzer-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.analyzer-form input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

.analyzer-form small {
  display: block;
  color: #666;
  margin-top: 3px;
  font-size: 12px;
}

#loading-indicator {
  color: #0073aa;
  font-style: italic;
  margin-top: 10px;
}

#loading-indicator.hidden,
#analyzer-results.hidden,
#error-message.hidden {
  display: none;
}

.error-message {
  background: #fff5f5;
  border: 1px solid #c00;
  color: #c00;
  padding: 10px;
  border-radius: 4px;
  margin-top: 10px;
}

.tabs {
  border-bottom: 2px solid #ddd;
  margin: 30px 0 20px 0;
  display: flex;
  gap: 0;
}

.tab-button {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  color: #666;
}

.tab-button:hover {
  color: #0073aa;
}

.tab-button.active {
  border-bottom-color: #0073aa;
  color: #0073aa;
}

.tab-content {
  display: none;
  padding: 15px 0;
}

.tab-content.active {
  display: block;
}

#content-display p,
#analysis-display p {
  margin: 10px 0;
  line-height: 1.6;
}

#analysis-display h4 {
  margin-top: 20px;
  margin-bottom: 10px;
}

#analysis-display ul {
  list-style: disc;
  margin-left: 20px;
}

#analysis-display li {
  margin: 8px 0;
}

/* ======================================
   COLOR-CODED COHERENCE DISPLAY
   ====================================== */

.coherence-dashboard {
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.stat-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #666;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 32px;
  font-weight: bold;
  color: #2c3e50;
}

.scoring-explanation {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
}

.scoring-explanation h4 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 14px;
  color: #2c3e50;
}

.strength-key {
  display: flex;
  gap: 25px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.strength-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.strength-badge {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ======================================
   ANALYZED CONTENT WITH COLOR CODING
   ====================================== */

.analyzed-content {
  margin-top: 30px;
  background: white;
  padding: 20px;
  border-radius: 8px;
}

.article-title {
  color: #2c3e50;
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

/* ======================================
   HIERARCHICAL CONTENT STRUCTURE
   ====================================== */

.hierarchical-content {
  margin-top: 20px;
}

.section-block {
  margin: 20px 0;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.section-block:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header {
  margin-bottom: 12px;
}

.section-heading {
  margin: 0 0 8px 0;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.3;
  display: block;
}

.section-heading h1,
.section-heading h2,
.section-heading h3,
.section-heading h4,
.section-heading h5,
.section-heading h6 {
  margin: 0 0 8px 0;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.3;
}

h1.section-heading {
  font-size: 22px;
}

h2.section-heading {
  font-size: 20px;
}

h3.section-heading {
  font-size: 18px;
}

h4.section-heading {
  font-size: 16px;
}

h5.section-heading {
  font-size: 15px;
}

h6.section-heading {
  font-size: 14px;
}

.section-metrics {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.paragraphs-group {
  margin-left: 0;
}

.paragraph-block {
  margin: 12px 0;
  padding: 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.paragraph-block:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.paragraph-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.paragraph-block p {
  margin: 8px 0 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

.sentences-group {
  margin-top: 10px;
  padding-left: 10px;
  border-left: 2px dashed #ddd;
  margin-left: 10px;
}

.sentences-analysis {
  margin-top: 20px;
}

.sentence-block {
  transition: all 0.2s ease;
  margin: 12px 0;
}

.sentence-block:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateX(4px);
}

.sentence-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.sentence-block p {
  margin: 10px 0 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}

.sentence-scores {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  font-size: 12px;
  color: #555;
  flex-wrap: wrap;
}

.sentence-scores span {
  display: inline-block;
}

/* ======================================
   COLOR GRADIENT THRESHOLDS
   ====================================== */

/* Strong: > 75% - Green (WCAG AA compliant) */
.strength-strong {
  border-left: 4px solid #1e7e34;
  background-color: rgba(30, 126, 52, 0.15);
}

.strength-strong .sentence-badge {
  background-color: #1e7e34;
}

/* Moderate: 50-75% - Orange (WCAG AA compliant) */
.strength-moderate {
  border-left: 4px solid #d68400;
  background-color: rgba(214, 132, 0, 0.15);
}

.strength-moderate .sentence-badge {
  background-color: #d68400;
}

/* Weak: < 50% - Red (WCAG AA compliant) */
.strength-weak {
  border-left: 4px solid #c62828;
  background-color: rgba(198, 40, 40, 0.15);
}

.strength-weak .sentence-badge {
  background-color: #c62828;
}

/* ======================================
   RESPONSIVE ADJUSTMENTS
   ====================================== */

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

  .strength-key {
    flex-direction: column;
    gap: 10px;
  }

  .stat-value {
    font-size: 24px;
  }

  .article-title {
    font-size: 20px;
  }

  h1.section-heading {
    font-size: 18px;
  }

  h2.section-heading {
    font-size: 17px;
  }

  h3.section-heading {
    font-size: 16px;
  }

  h4.section-heading {
    font-size: 15px;
  }

  h5.section-heading {
    font-size: 14px;
  }

  h6.section-heading {
    font-size: 13px;
  }

  .section-metrics {
    flex-direction: column;
    gap: 6px;
  }

  .paragraph-header {
    flex-direction: column;
    gap: 4px;
  }

  .sentence-block {
    padding: 10px;
  }

  .sentence-scores {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .coherence-dashboard {
    padding: 15px;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .stat-box {
    padding: 15px;
  }

  .stat-value {
    font-size: 20px;
  }

  h1.section-heading {
    font-size: 16px;
  }

  h2.section-heading {
    font-size: 15px;
  }

  h3.section-heading {
    font-size: 14px;
  }

  h4.section-heading {
    font-size: 13px;
  }

  h5.section-heading {
    font-size: 12px;
  }

  h6.section-heading {
    font-size: 12px;
  }

  .section-block {
    margin: 12px 0;
    padding: 10px;
  }

  .section-metrics {
    flex-direction: column;
    gap: 4px;
  }

  .paragraph-block {
    margin: 8px 0;
    padding: 8px;
  }

  .paragraph-header {
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
  }

  .sentence-block {
    padding: 8px;
  }
}
