:root {
  --bg-1: #f7f7f7;
  --bg-2: #e8e8e8;
  --ink: #1d1d1f;
  --muted: #5d5348;
  --card: #ffffff;
  --stroke: rgba(124, 83, 42, 0.2);
  --accent: #0c66e4;
  --accent-2: #0550ae;
  --ok: #1d7f42;
  --error: #b42318;
  --shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  padding: 24px;
}

.app {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.hero {
  background: #ffffff;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
}

h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  line-height: 1.1;
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.form-grid {
  display: grid;
  gap: 10px;
}

label {
  font-size: 0.92rem;
  font-weight: 700;
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid #d9c4aa;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fffdfb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.18);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

button:active {
  transform: translateY(0);
}

/* --- CONFIGURAÇÃO ESPECÍFICA DO BOTÃO FLUTUANTE (FAB) --- */
#btn-share {
  display: none; /* Controlado pelo JavaScript */
  position: fixed;
  justify-content: center;
  align-items: center;
  bottom: 35px;
  right: 35px;
  z-index: 1000;
  
  /* Formato circular e tamanho fixo */
  width: 70px;
  height: 70px;
  border-radius: 50%; 
  padding: 0;
  font-size: 35px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Força o display flex quando o JS mudar para inline-style */
#btn-share[style*="display: flex"] {
  display: flex !important;
}

button.wide {
  margin-top: 6px;
}

.hint {
  color: var(--muted);
}

.status {
  min-height: 24px;
  margin-top: 12px;
  font-weight: 700;
}

.status.ok {
  color: var(--ok);
}

.status.error {
  color: var(--error);
}

.result {
  margin-top: 8px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.result-item {
  background: #fffaf4;
  border: 1px solid #efdfcd;
  border-radius: 12px;
  padding: 10px 12px;
}

.result-item .label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #916f4c;
  margin-bottom: 5px;
}

.result-item .value {
  font-weight: 700;
  word-break: break-word;
}

@media (max-width: 640px) {
  body {
    padding: 14px;
  }

  .hero,
  .card {
    padding: 16px;
    border-radius: 16px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
  
  /* Ajuste opcional para o botão flutuante em telas pequenas */
  #btn-share {
    bottom: 10px;
    right: 16px;
    width: 60px;
    height: 60px;
  }
}
