/* AI Rewrite 工具样式 */

.result-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.compare-column {
  background-color: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
}

.compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: #e9ecef;
}

.compare-title {
  font-size: 15px;
  font-weight: 600;
  color: #212529;
  margin: 0;
  padding: 12px 16px;
  background-color: #e9ecef;
}

.compare-column:first-child .compare-title {
  background-color: #fff3cd;
}

.compare-column:last-child .compare-title {
  background-color: #d4edda;
}

.mode-badge {
  padding: 4px 10px;
  background-color: #007bff;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
}

.compare-content {
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #495057;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  background-color: #ffffff;
}

.original-content {
  border-right: 2px solid #ffc107;
}

.rewritten-content {
  border-left: 2px solid #28a745;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #6c757d;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e9ecef;
  border-top-color: #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

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

.loading-text {
  font-size: 14px;
}

.error-state {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 16px;
  color: #721c24;
  margin: 16px 0;
}

.error-state p {
  margin: 0;
  font-size: 14px;
}

.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border-radius: 6px;
  margin-top: 16px;
  font-size: 13px;
  color: #6c757d;
}

.stats-bar span strong {
  color: #212529;
  font-weight: 600;
}

.mode-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
  padding: 12px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.mode-btn {
  padding: 10px 18px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  background-color: #ffffff;
  color: #495057;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn:hover {
  border-color: #007bff;
  color: #007bff;
}

.mode-btn.active {
  background-color: #007bff;
  border-color: #007bff;
  color: #ffffff;
}

@media (max-width: 768px) {
  .result-compare {
    grid-template-columns: 1fr;
  }

  .original-content {
    border-right: none;
    border-bottom: 2px solid #ffc107;
  }

  .rewritten-content {
    border-left: none;
    border-top: 2px solid #28a745;
  }

  .compare-content {
    max-height: 300px;
  }

  .stats-bar {
    gap: 12px;
    font-size: 12px;
  }

  .mode-selector {
    gap: 6px;
    padding: 8px;
  }

  .mode-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
}
