/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1e40af;
  --primary-light: #3b82f6;
  --success-color: #059669;
  --success-light: #10b981;
  --warning-color: #d97706;
  --warning-light: #f59e0b;
  --danger-color: #dc2626;
  --danger-light: #ef4444;
  --neutral-color: #6b7280;

  --bg-page: #f3f4f6;
  --bg-card: #ffffff;
  --bg-light: #f9fafb;
  --bg-dark: #111827;

  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-tertiary: #9ca3af;

  --border-light: #e5e7eb;
  --border-medium: #d1d5db;

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto",
    sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  padding: 24px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 70px;
    width: 1000px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 10px;
  padding: 10px;
      /* background: var(--bg-card); */
    /* border-radius: var(--radius-lg); */
    /* box-shadow: var(--shadow-sm); */
    /* border: 1px solid var(--border-light); */
    /* border-bottom: 4px solid var(--primary-color); */
}

.header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.platform-logos {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.platform-logos-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 4px;
  vertical-align: middle;
}

.platform-logo {
  display: inline-block;
  vertical-align: middle;
}

/* Card Styles */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-light);
  gap: 16px;
}

.card-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.card-body {
  color: var(--text-primary);
  margin: 0;
}

/* Overview Card */
.overview-card {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: 20px;
}

.overview-card:hover {
  box-shadow: var(--shadow-md);
}

.overview-content {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: center;
}

.overview-left h2 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
      border-bottom: 1px solid #00000017;
}

.summary-text {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 400;
}

.metadata {
  display: flex;
  gap: 16px;
  /* margin-bottom: 20px; */
  flex-wrap: wrap;
}

.metadata-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-light);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.metadata-item strong {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 12px;
}

.icon {
  width: 16px;
  height: 16px;
}

.ai-notice {
  font-size: 12px;
  /* margin-top: 8px; */
  padding: 8px 12px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  display: inline-block;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.overview-right {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chart-container {
  width: 200px;
  height: 200px;
  position: relative;
  margin-bottom: 20px;
}

.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.positive {
  background-color: #10b981;
}

.legend-dot.neutral {
  background-color: #fbbf24;
}

.legend-dot.negative {
  background-color: #ef4444;
}

/* Row Layout - Masonry 2 Columns */
.row {
  column-count: 2;
  column-gap: 20px;
  margin-bottom: 20px;
}

.row .card,
.row .verdict-banner {
  break-inside: avoid;
  margin-bottom: 20px;
  display: block;
  width: 100%;
}

/* Two Column Layout (Legacy) */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
  align-items: start;
}

.two-column .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.two-column .card-body {
  flex: 1;
}

/* Badges */
.rating-badge {
      display: flex;
    align-items: center;
    gap: 6px;
    /* background: var(--bg-light); */
    color: var(--text-primary);
    /* padding: 8px 16px; */
    /* border-radius: 20px; */
    font-weight: 600;
    font-size: 14px;
    /* border: 2px solid var(--border-light); */
    white-space: nowrap;
}

.rating-badge .stars {
  color: var(--warning-color);
  font-size: 16px;
  letter-spacing: 2px;
}

.rating-badge .rating-number {
  color: var(--text-primary);
  font-weight: 700;
}

.sentiment-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.sentiment-badge.positive {
  background: #d1fae5;
  color: #065f46;
  border: 2px solid #10b981;
}

.sentiment-badge.mixed {
  background: #fef3c7;
  color: #78350f;
  border: 2px solid #f59e0b;
}

.sentiment-badge.negative {
  background: #fee2e2;
  color: #991b1b;
  border: 2px solid #ef4444;
}

/* Subsections */
.subsection {
  margin-bottom: 20px;
}

.subsection:last-child {
  margin-bottom: 0;
}

.subsection h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #111827d4;
}

.highlight-title {
  color: var(--success-color);
}

.concern-title {
  color: var(--warning-color);
}

.pros-title {
  color: var(--success-color);
}

.cons-title {
  color: var(--danger-color);
}

.actionable-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--primary-color);
}

/* Lists */
.bullet-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bullet-list li {
  padding: 10px 14px 10px 36px;
  position: relative;
  line-height: 1.6;
  color: var(--text-secondary);
  font-size: 12px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--border-medium);
}

.bullet-list li::before {
  content: "•";
  position: absolute;
  left: 16px;
  font-weight: bold;
  color: var(--text-tertiary);
  font-size: 16px;
}

.bullet-list.highlights li {
  color: var(--text-secondary);
  background: #f0fdf4;
  border-left-color: var(--success-color);
}

.bullet-list.highlights li::before {
  content: "✓";
  color: var(--success-light);
}

.bullet-list.concerns li {
  background: #fffbeb;
  border-left-color: var(--warning-color);
}

.bullet-list.concerns li::before {
  content: "⚠";
  color: var(--warning-light);
}

.bullet-list.pros li {
  background: #f0fdf4;
  border-left-color: var(--success-color);
}

.bullet-list.pros li::before {
  content: "✓";
  color: var(--success-light);
}

.bullet-list.cons li {
  background: #fef2f2;
  border-left-color: var(--danger-color);
}

.bullet-list.cons li::before {
  content: "✗";
  color: var(--danger-light);
}

.bullet-list.actionable li {
  background: #eff6ff;
  border-left-color: var(--primary-color);
}

.bullet-list.actionable li::before {
  content: "→";
  color: var(--primary-light);
}

#key-insights-list li {
  background: #eff6ff;
  border-left-color: var(--primary-color);
}

#key-insights-list li::before {
  content: "💡";
  left: 12px;
}

.alert-list {
  list-style: none;
  padding-left: 0;
}

.alert-list li {
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fffbeb;
  border-left: 3px solid var(--warning-color);
  border-radius: var(--radius-sm);
  color: #78350f;
  font-size: 14px;
  line-height: 1.5;
}

/* Facilities Grid */
.facilities-grid {
  display: grid;
  gap: 14px;
}

.facility-item {
  padding: 7px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary-light);
      display: flex;
    gap: 5px;
}

.facility-item strong {
  display: block;
  /* margin-bottom: 6px; */
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.facility-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

/* Trend Alerts */
.trend-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trend-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: #fffbeb;
  border-left: 3px solid var(--warning-color);
  border-radius: var(--radius-md);
  gap: 12px;
}

.trend-alert-text {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #78350f;
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}

.trend-alert-badge {
  background: var(--warning-color);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* Ratings Table */
.ratings-table-wrapper {
  overflow-x: auto;
}

.ratings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.ratings-table thead th {
  background: var(--bg-light);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ratings-table thead th:first-child {
  border-top-left-radius: var(--radius-md);
}

.ratings-table thead th:last-child {
  border-top-right-radius: var(--radius-md);
}

.ratings-table tbody td {
  padding: 7px;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  vertical-align: middle;
}

.ratings-table tbody td:first-child {
  font-weight: 500;
  color: var(--text-primary);
}

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

.ratings-table tbody tr:hover {
  background: var(--bg-light);
}

.rating-cell {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating-stars {
  color: var(--warning-color);
  font-size: 16px;
  letter-spacing: 1px;
}

.rating-value {
  background: var(--bg-light);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border-light);
}

/* Verdict Banner */
.verdict-banner {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--border-medium);
}

.verdict-banner.not-recommended {
  background: #fef2f2;
  border-color: var(--danger-color);
  border-left-width: 6px;
}

.verdict-banner.caution,
.verdict-banner.proceed-with-caution {
  background: #fffbeb;
  border-color: var(--warning-color);
  border-left-width: 6px;
}

.verdict-banner.mixed,
.verdict-banner.mixed-reviews {
  background: #eff6ff;
  border-color: var(--primary-light);
  border-left-width: 6px;
}

.verdict-banner.recommended {
  background: #f0fdf4;
  border-color: var(--success-color);
  border-left-width: 6px;
}

.verdict-banner.highly-recommended {
  background: #dbeafe;
  border-color: var(--primary-color);
  border-left-width: 6px;
}

.verdict-content {
  display: flex;
  align-items: center;
  gap: 28px;
}

.verdict-icon {
  font-size: 52px;
  line-height: 1;
  flex-shrink: 0;
}

.verdict-text h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.verdict-text p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.verdict-subtitle {
  font-style: italic;
  opacity: 0.75;
  font-size: 13px;
}

/* Disclaimer */
.disclaimer {
  text-align: center;
  padding: 20px 24px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  margin-top: 24px;
  border: 1px solid var(--border-light);
}

.disclaimer p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 16px;
  }

  .container{
        width: 100%;
    padding: 0;
  }
  .sentiment-badge.mixed{
        padding: 7px;
    font-size: 12px;
  }
  .overview-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .row {
    column-count: 1;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .chart-container {
    width: 180px;
    height: 180px;
  }

  .header {
    padding: 24px 20px;
  }

  .header h1 {
    font-size: 24px;
  }

  .card {
    padding: 20px;
  }

  .overview-card {
    padding: 24px;
  }

  .verdict-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .verdict-icon {
    font-size: 36px;
  }

  .verdict-text h2 {
    font-size: 20px;
  }

  .verdict-banner {
    padding: 7px;
  }
}

@media (max-width: 480px) {
  .metadata {
    flex-direction: column;
    gap: 8px;
  }

  .chart-legend {
    flex-direction: column;
    gap: 8px;
  }
}

/* Loading State */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 20px;
  color: var(--text-tertiary);
  font-style: italic;
  font-size: 14px;
}

/* Insight Cards */
.insight-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-card {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 14px;
  border-left: 4px solid var(--primary-color);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.insight-card-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  border: 2px solid var(--primary-light);
}

.insight-card-content {
  flex: 1;
}

.insight-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.insight-card-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Trend Alert Categories */
.trend-category {
  margin-bottom: 18px;
}

.trend-category:last-child {
  margin-bottom: 0;
}

.trend-category-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trend-category-icon {
  font-size: 16px;
}

.trend-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trend-alert-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 12px;
  background: #fffbeb;
  border-left: 3px solid var(--warning-color);
  border-radius: var(--radius-md);
  gap: 12px;
}

.trend-alert-item.high-intensity {
  border-left-width: 5px;
  background: #fef3c7;
  font-weight: 500;
}

.trend-mention-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mention-bar {
  width: 40px;
  height: 6px;
  background: var(--bg-light);
  border-radius: 3px;
  overflow: hidden;
}

.mention-bar-fill {
  height: 100%;
  background: var(--warning-color);
  transition: width 0.3s ease;
}

/* Smooth transitions */
.card,
.verdict-banner,
.facility-item,
.trend-alert-item,
.insight-card {
  transition: all 0.2s ease;
}

.insight-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}
