/* Import base styles */
@import url('styles.css');

/* Demo-specific styles */
.demo-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 3rem 2rem;
  text-align: center;
}

.demo-header h1 {
  margin: 0;
  font-size: 2.5rem;
}

.demo-header .subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-top: 0.5rem;
}

.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: #7dd3fc;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.demo-section {
  margin: 3rem auto;
}

.demo-card {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.demo-card h2 {
  margin-top: 0;
  margin-bottom: 2rem;
  color: #0f172a;
}

/* Language Direction Selector */
.language-selector {
  margin-bottom: 2rem;
}

.selector-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #334155;
}

.direction-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.direction-btn {
  flex: 1;
  min-width: 200px;
  padding: 1rem;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.direction-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.direction-btn.active {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #fff;
}

.lang-flag {
  font-size: 1.5rem;
}

/* Domain Selector */
.domain-selector {
  margin-bottom: 2rem;
}

.domain-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.domain-option {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.domain-option:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.domain-option input[type="radio"] {
  margin-right: 0.5rem;
  cursor: pointer;
}

.domain-option input[type="radio"]:checked + .domain-label {
  font-weight: 600;
  color: #0f172a;
}

.domain-label {
  cursor: pointer;
  font-size: 0.95rem;
}

/* Translation Form */
.translation-form {
  margin-top: 2rem;
}

.input-section {
  margin-bottom: 1.5rem;
}

.input-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #334155;
}

.char-count {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 400;
}

.text-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.text-input:focus {
  outline: none;
  border-color: #38bdf8;
}

.text-input::placeholder {
  color: #94a3b8;
}

.translate-btn {
  width: 100%;
  padding: 1rem;
  background: #38bdf8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.translate-btn:hover {
  background: #0ea5e9;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(56, 189, 248, 0.3);
}

.translate-btn:active {
  transform: translateY(0);
}

.translate-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
}

/* Output Section */
.output-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e2e8f0;
}

.output-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #334155;
}

.confidence-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
}

.confidence-high {
  background: #d1fae5;
  color: #065f46;
}

.confidence-medium {
  background: #fef3c7;
  color: #92400e;
}

.confidence-low {
  background: #fee2e2;
  color: #991b1b;
}

.text-output {
  padding: 1.5rem;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #0f172a;
  min-height: 80px;
}

/* Warnings Section */
.warnings-section {
  margin-top: 1rem;
  padding: 1rem;
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
}

.warnings-label {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  color: #92400e;
  font-size: 0.9rem;
}

.warnings-list {
  margin: 0;
  padding-left: 1.5rem;
  color: #78350f;
  font-size: 0.9rem;
}

.warnings-list li {
  margin-bottom: 0.25rem;
}

/* Feedback Section */
.feedback-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 8px;
}

.feedback-section h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #334155;
}

.feedback-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.feedback-btn {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: 2px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.feedback-btn:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.feedback-yes:hover {
  border-color: #22c55e;
  background: #f0fdf4;
}

.feedback-no:hover {
  border-color: #ef4444;
  background: #fef2f2;
}

.feedback-comment {
  margin-top: 1rem;
}

.feedback-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  margin-bottom: 0.75rem;
}

.feedback-input:focus {
  outline: none;
  border-color: #38bdf8;
}

.submit-feedback-btn {
  padding: 0.5rem 1.5rem;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.submit-feedback-btn:hover {
  background: #1e293b;
}

.feedback-thanks {
  padding: 1rem;
  background: #d1fae5;
  border-radius: 8px;
  color: #065f46;
  text-align: center;
  font-weight: 500;
}

/* Examples Section */
.examples-section {
  margin-top: 2rem;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 12px;
}

.examples-section h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #334155;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.example-btn {
  padding: 0.75rem 1rem;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.example-btn:hover {
  border-color: #38bdf8;
  background: #f0f9ff;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* API Info Section */
.api-info {
  margin: 3rem auto;
  padding: 2rem;
  background: #0f172a;
  color: #fff;
  border-radius: 12px;
}

.api-info h3 {
  margin-top: 0;
  color: #38bdf8;
}

.api-info pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
}

.docs-link {
  display: inline-block;
  margin-top: 1rem;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.docs-link:hover {
  color: #7dd3fc;
}

/* Responsive Design */
@media (max-width: 768px) {
  .demo-header {
    padding: 2rem 1rem;
  }

  .demo-header h1 {
    font-size: 2rem;
  }

  .demo-card {
    padding: 1.5rem;
  }

  .direction-buttons,
  .domain-options {
    flex-direction: column;
  }

  .direction-btn,
  .domain-option {
    min-width: 100%;
  }

  .feedback-buttons {
    flex-direction: column;
  }

  .examples-grid {
    grid-template-columns: 1fr;
  }
}
