/* ============================================
   LovelyWe - Calculadora de Namoro
   Tema dark romântico
   ============================================ */

:root {
  --bg-dark: #0f0a0f;
  --bg-card: #1a1218;
  --bg-input: #251c24;
  --border: rgba(220, 100, 130, 0.2);
  --text: #f0e6ed;
  --text-muted: #b8a4b0;
  --accent-pink: #e84a7a;
  --accent-rose: #d46482;
  --accent-red: #c73e54;
  --gradient-romantic: linear-gradient(135deg, #e84a7a 0%, #c73e54 50%, #a82d4a 100%);
  --gradient-soft: linear-gradient(135deg, #f8b4c8 0%, #e84a7a 100%);
  --shadow-glow: 0 0 40px rgba(232, 74, 122, 0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Padrão de fundo sutil */
.bg-pattern {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(232, 74, 122, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(167, 45, 74, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(212, 100, 130, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Language toggle */
.lang-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  position: relative;
  z-index: 2;
}

.lang-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.lang-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  color: #fff;
  background: var(--gradient-romantic);
}

.lang-btn:focus {
  outline: none;
}

.lang-btn:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent-pink);
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.header {
  text-align: center;
  padding: 1.5rem 1.5rem 1rem;
  position: relative;
  z-index: 1;
}

.site-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  background: var(--gradient-romantic);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Main content */
.main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

/* Calculator hero: form first, emphasized */
.calculator-hero {
  margin-bottom: 2.5rem;
}

.calculator-intro {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.section {
  margin-bottom: 2.5rem;
}

.section-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-rose);
  background: var(--gradient-soft);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.intro-text,
.usage-text {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.intro-text:last-of-type,
.usage-text:last-of-type {
  margin-bottom: 0;
}

.intro-text strong,
.usage-text strong {
  color: var(--text);
}

/* Calculator form — emphasized, larger */
.calculator-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  margin: 0 0 1.5rem;
  box-shadow: var(--shadow-glow);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-of-type {
  margin-bottom: 1.75rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 0.9rem 1.15rem;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 3px rgba(232, 74, 122, 0.2);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-submit {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--gradient-romantic);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(232, 74, 122, 0.35);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 74, 122, 0.4);
}

/* Result */
.result-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  margin: 0 auto 1.5rem;
  max-width: 520px;
  text-align: center;
  box-shadow: var(--shadow-glow);
}

.result-wrapper[hidden] {
  display: none !important;
}

.result-label {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-output {
  margin: 0;
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.result-output .highlight {
  background: var(--gradient-romantic);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-live {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.result-placeholder {
  text-align: center;
  padding: 1.75rem;
  color: var(--text-muted);
  font-size: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  max-width: 520px;
  margin: 0 auto;
}

.result-placeholder[hidden] {
  display: none !important;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.faq-question {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-rose);
}

.faq-answer {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsivo */
@media (min-width: 480px) {
  .calculator-form,
  .result-wrapper {
    padding: 2.25rem 2rem;
  }
}

@media (min-width: 640px) {
  .header {
    padding: 2rem 1.5rem 1.25rem;
  }

  .calculator-form {
    padding: 2.5rem 2.25rem;
  }

  .result-wrapper {
    padding: 2.25rem 2rem;
  }

  .main {
    padding-bottom: 5rem;
  }

  .section-title {
    font-size: 1.35rem;
  }
}
