*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  background: linear-gradient(165deg, #f8fafc 0%, #f1f5f9 40%, #e2e8f0 100%);
  color: #1e293b;
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.5);
}

.header-text {
  flex: 1;
  min-width: 0;
}

.title {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.subtitle {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 500;
}

.header-status {
  flex-shrink: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status--disconnected {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.status--connecting {
  background: rgba(234, 179, 8, 0.2);
  color: #a16207;
}

.status--connected {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.alerts {
  min-height: 0;
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-weight: 500;
}

.alert--error {
  background: rgba(254, 226, 226, 0.9);
  color: #991b1b;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.alert--info {
  background: rgba(219, 234, 254, 0.9);
  color: #1e40af;
  border: 1px solid rgba(96, 165, 250, 0.4);
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.list-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #475569;
}

.filters {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

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

.filter-group--sites {
  flex-direction: column;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.filter-input {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 8px;
  color: #334155;
  min-width: 120px;
}

.filter-sites {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.filter-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #475569;
  cursor: pointer;
  font-weight: 500;
}

.filter-checkbox input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.05s, opacity 0.2s;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.primary {
  background: #2563eb;
  color: white;
}

.btn.primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.btn.ghost {
  background: rgba(148, 163, 184, 0.25);
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.btn.ghost:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.35);
  color: #334155;
}

.btn.small {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.reviews {
  display: flex;
  flex-direction: column-reverse;
  gap: 16px;
  margin-top: 4px;
}

.review-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.review-author {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
}

.review-rating {
  font-size: 0.9rem;
  color: #b45309;
}

.review-domain {
  font-size: 0.8rem;
  color: #64748b;
  background: rgba(148, 163, 184, 0.2);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.review-address {
  font-size: 0.8rem;
  color: #475569;
  background: rgba(59, 130, 246, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.review-datetime {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

.review-body,
.review-answer {
  margin-top: 12px;
}

.review-body h3,
.review-answer h3 {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.review-text,
.review-answer-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  color: #334155;
}

.review-link-wrap {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.review-link {
  font-size: 0.88rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.review-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.review-answer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.review-answer-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.review-answer-text {
  margin-top: 8px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 3px solid rgba(59, 130, 246, 0.6);
  color: #334155;
}

@media (max-width: 600px) {
  .page {
    padding: 20px 16px 40px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .review-answer-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
