body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  color: #2c3e50;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  text-align: center;
}

.container {
  width: 80%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
}

.policy-content {
  width: 100%;
  max-width: 1200px;
  text-align: left;
}

.policy-content .container {
  max-width: none;
  width: 100%;
}

h1, h2 {
  color: #6c63ff;
  margin: 20px 0;
  text-align: center;
}

.site-icon {
  height: 1.2em;
  width: auto;
  margin-right: 0.3em;
  vertical-align: text-top;
  display: inline-block;
}

.footer {
  margin-top: auto;
  padding: 0 10px 10px 10px;
  width: 90%;
  text-align: center;
  font-size: 0.9em;
  color: #6c757d;
}

.section-divider {
  border: none;
  height: 1px;
  background-color: #444;
  margin: 40px auto;
  width: 80%;
  max-width: 600px;
}

.footer .section-divider {
  margin: 20px auto 15px auto;
}

.hidden {
  display: none;
}

.hero-section {
  margin: 40px 0 30px 0;
  text-align: center;
}

.hero-tagline {
  font-size: 2.2em;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 15px 0;
  line-height: 1.3;
}

.hero-description {
  font-size: 1.2em;
  color: #6c757d;
  margin: 0 0 40px 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.features-section {
  margin: 60px 0 40px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.feature-item {
  text-align: center;
  padding: 20px;
}

.feature-icon {
  font-size: 3em;
  margin-bottom: 15px;
}

.feature-title {
  font-size: 1.3em;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 10px 0;
}

.feature-description {
  font-size: 1em;
  color: #6c757d;
  line-height: 1.5;
}

.analysis-form {
  margin: 30px 0;
  display: flex;
  gap: 10px;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
}

.analysis-form form {
  display: flex;
  gap: 10px;
  align-items: stretch;
  width: 100%;
  max-width: 600px;
}

.content-input {
  padding: 14px 16px;
  border: 2px solid #dee2e6;
  border-radius: 5px;
  background-color: #ffffff;
  color: #2c3e50;
  font-size: 16px;
  flex: 1;
  min-width: 0;
}

.content-input:focus {
  outline: none;
  border-color: #6c63ff;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.analysis-form button {
  background-color: #6c63ff;
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.3s, transform 0.1s;
  white-space: nowrap;
}

.analysis-form button:hover {
  background-color: #5a52d5;
  transform: translateY(-1px);
}

.analysis-form button:active {
  transform: translateY(0);
}

.analysis-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.status-message {
  background: #ffffff;
  border: 1px solid #dee2e6;
  padding: 20px;
  border-radius: 5px;
  text-align: center;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.status-message p {
  margin: 10px 0;
  color: #2c3e50;
}

.analysis-results {
  margin-top: 30px;
}

.analysis-results.hidden {
  display: none;
}

.sentiment-analysis-result {
  background: #ffffff;
  border: 1px solid #dee2e6;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sentiment-analysis-result h2 {
  color: #6c63ff;
  margin-bottom: 20px;
}

.sentiment-narrative {
  color: #2c3e50;
  line-height: 1.6;
  margin-bottom: 20px;
}

.sentiment-narrative p {
  margin: 0;
}

.detailed-scores {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 5px;
  margin-top: 10px;
}

.detailed-scores p {
  color: #2c3e50;
  font-size: 16px;
}

.login-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

.login-page h1 {
  color: #6c63ff;
  margin-bottom: 10px;
}

.login-page p {
  color: #2c3e50;
  margin-bottom: 20px;
}

.auth-status {
  background: #ffffff;
  border: 1px solid #dee2e6;
  padding: 20px;
  border-radius: 5px;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.auth-status p {
  margin: 10px 0;
  color: #2c3e50;
}

.sign-in-container {
  margin: 30px 0;
}

.connect-provider-button {
  background-color: #6c63ff;
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.3s, transform 0.1s;
  margin: 20px auto;
  display: block;
}

.connect-provider-button:hover {
  background-color: #5a52d5;
  transform: translateY(-1px);
}

.connect-provider-button:active {
  transform: translateY(0);
}

.connect-provider-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}

.provider-signin-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

.provider-signin-page h1 {
  color: #6c63ff;
  margin-bottom: 10px;
}

.user-profile-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

.user-profile-container {
  width: 100%;
  position: relative;
  left: -80px;
}

.monitoring-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.monitoring-table th,
.monitoring-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.monitoring-table th {
  background-color: #007cba;
  color: white;
}

.monitoring-table tr:hover {
  background-color: #f5f5f5;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.metric-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 5px;
  border-left: 4px solid #007cba;
  transition: all 0.3s ease;
  position: relative;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.metric-card.error-card {
  border-left-color: #dc3545;
}

.metric-value {
  font-size: 2em;
  font-weight: bold;
  color: #007cba;
}

.error-card .metric-value {
  color: #dc3545;
}

.metric-label {
  color: #666;
  font-size: 0.9em;
  margin-top: 5px;
}

.error-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5em;
}

.success-rate.good {
  color: #28a745;
  font-weight: bold;
}

.success-rate.warning {
  color: #ffc107;
  font-weight: bold;
}

.success-rate.error {
  color: #dc3545;
  font-weight: bold;
}

.tooltip-text {
  cursor: help;
  text-decoration: underline dotted;
}

#page-container > a {
  text-decoration: none;
  color: inherit;
}

#page-container > a:hover,
#page-container > a:visited,
#page-container > a:active,
#page-container > a:focus {
  text-decoration: none;
  color: inherit;
}

#page-container > a h1 {
  color: #6c63ff;
}

@media (max-width: 768px) {
  .container {
    width: 92%;
    max-width: none;
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 0 8px;
  }

  .footer {
    width: 100%;
    padding: 12px;
  }

  .section-divider {
    margin: 30px auto;
    width: 90%;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 1.4rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .analysis-form button {
    padding: 10px 12px;
    font-size: 1em;
  }
}
