/* TidoSofa - Satirical Relationship Translator */

:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --secondary: #457b9d;
  --accent: #f4a261;
  --background: #1a1a2e;
  --surface: #16213e;
  --surface-light: #1f2b47;
  --text: #edf2f4;
  --text-muted: #8d99ae;
  --success: #2a9d8f;
  --warning: #e9c46a;
  --danger: #e63946;
  --danger-high: #9d0208;

  --radius: 12px;
  --radius-lg: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  text-align: center;
  padding: 40px 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.logo-icon {
  font-size: 2.5rem;
}

.logo-text {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  color: var(--text-muted);
  font-size: 1rem;
  font-style: italic;
}

/* Hero */
.hero {
  text-align: center;
  padding: 40px 0;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero h1 em {
  color: var(--primary);
  font-style: normal;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 24px;
}

.powered-by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
}

.powered-by span {
  color: var(--text-muted);
}

.powered-by strong {
  color: var(--accent);
}

/* Translator Section */
.translator-section {
  padding: 20px 0;
}

.translator-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.input-section {
  margin-bottom: 24px;
}

.input-section label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.input-section textarea {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--surface-light);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.input-section textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.input-section textarea::placeholder {
  color: var(--text-muted);
}

.input-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Translate Button */
.translate-btn {
  width: 100%;
  padding: 18px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.translate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4);
}

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

.translate-btn.loading {
  pointer-events: none;
  background: var(--surface-light);
}

.translate-btn .btn-loading {
  display: none;
}

.translate-btn.loading .btn-text {
  display: none;
}

.translate-btn.loading .btn-loading {
  display: inline;
}

/* Results Section */
.results {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--surface-light);
  animation: fadeIn 0.4s ease;
}

.results.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-header h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.translation-box {
  background: var(--background);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  border-left: 4px solid var(--accent);
}

.translation-box p {
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Meters */
.meters {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.meter {
  background: var(--background);
  padding: 16px;
  border-radius: var(--radius);
}

.meter-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.meter-value {
  font-weight: 700;
}

.meter-bar {
  height: 8px;
  background: var(--surface-light);
  border-radius: 4px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.meter-fill.certainty {
  background: linear-gradient(90deg, var(--accent), var(--warning));
}

.meter-fill.danger {
  background: linear-gradient(90deg, var(--success), var(--warning), var(--danger));
}

.meter-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}

/* Danger Indicator */
.danger-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.danger-indicator.level-low {
  background: rgba(42, 157, 143, 0.15);
  border-color: var(--success);
}

.danger-indicator.level-medium {
  background: rgba(233, 196, 106, 0.15);
  border-color: var(--warning);
}

.danger-indicator.level-high {
  background: rgba(230, 57, 70, 0.15);
  border-color: var(--danger);
}

.danger-indicator.level-critical {
  background: rgba(157, 2, 8, 0.2);
  border-color: var(--danger-high);
}

.danger-icon {
  font-size: 1.5rem;
}

/* Suggested Reply */
.suggested-reply {
  background: var(--background);
  border-radius: var(--radius);
  padding: 20px;
}

.suggested-reply h4 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.do-not-send {
  color: var(--danger);
  font-weight: 700;
  font-size: 0.85rem;
}

.reply-box {
  background: var(--surface);
  border: 2px dashed var(--danger);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.reply-box p {
  color: var(--danger);
  font-weight: 500;
}

.send-anyway-btn {
  width: 100%;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  transition: all 0.2s;
}

.send-anyway-btn:hover {
  background: var(--danger);
  color: white;
}

/* Reviews Section */
.reviews-section {
  padding: 60px 0 40px;
}

.reviews-section h2 {
  text-align: center;
  margin-bottom: 32px;
  font-size: 1.5rem;
}

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

.review-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s;
}

.review-card:hover {
  transform: translateY(-4px);
}

.stars {
  margin-bottom: 12px;
}

.review-card p {
  font-style: italic;
  margin-bottom: 12px;
  color: var(--text);
}

.reviewer {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Disclaimer */
.disclaimer {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin: 40px 0;
}

.disclaimer h3 {
  margin-bottom: 16px;
  color: var(--warning);
}

.disclaimer ul {
  list-style: none;
}

.disclaimer li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-muted);
}

.disclaimer li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: var(--primary);
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
}

.footer p {
  margin-bottom: 8px;
}

.footer-note {
  font-size: 0.85rem;
  font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .container {
    padding: 16px;
  }

  .logo-icon {
    font-size: 2rem;
  }

  .logo-text {
    font-size: 2rem;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .translator-card {
    padding: 20px;
  }

  .translate-btn {
    padding: 16px 24px;
    font-size: 1rem;
  }
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.translate-btn.loading .btn-loading {
  animation: pulse 1.5s ease-in-out infinite;
}
