:root {
  --bg: #f4f7f6;
  --card: #ffffff;
  --muted: #6b7a78;
  --accent: #1f7a3a;
  --accent-2: #2e7d32;
  --surface: #f8faf8;
  --border: #e6efea;
  --text: #0e2a25;
  --radius: 14px;
  --shadow: 0 12px 30px rgba(7, 20, 15, 0.08);
  font-family: Inter, "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(160deg, #edf5f2 0%, var(--bg) 100%);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden; /* permite rolagem vertical */
  overflow-y: auto;
}

/* App Container */
.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 100vh; /* cresce conforme conteúdo */
  padding: 1.2vw;
  gap: 1vw;
}

/* Header */
.header { text-align: center; margin-bottom: 0.5vw; }
.brand-title {
  color: var(--accent-2);
  font-size: clamp(16px, 1.4vw, 22px);
  font-weight: 700;
  margin: 0;
}
.brand-sub {
  color: var(--muted);
  font-size: clamp(12px, 1vw, 15px);
  margin: 0;
}

/* Card */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  width: clamp(600px, 80vw, 900px);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(16px, 2vw, 32px);
  overflow: visible;
  transition: all 0.3s ease-in-out;
}

/* Barra de progresso */
.progress {
  height: 18px;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.2vw;
  position: relative;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .5s ease;
}
.progress-info {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(11px, 0.9vw, 13px);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Questões */
.question-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.q-title {
  font-size: clamp(18px, 1.6vw, 24px);
  margin: 0 0 0.6vw 0;
  font-weight: 700;
  color: var(--text);
}
.q-sub {
  font-size: clamp(12px, 1vw, 14px);
  color: var(--muted);
  margin-bottom: 1vw;
}

/* Respostas */
.answers-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vw;
}
.answers-fieldset {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(6px, 0.8vw, 14px);
  border: none;
  margin: 0;
  padding: 0;
  width: 100%;
}
.answer-option {
  flex: 1;
  min-width: 80px;
  max-width: 120px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: clamp(10px, 1vw, 14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.answer-option:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.answer-option.selected {
  background: linear-gradient(180deg, rgba(46,125,50,0.08), rgba(46,125,50,0.02));
  border-color: rgba(46,125,50,0.35);
  transform: scale(1.06);
  box-shadow: 0 8px 20px rgba(46,125,50,0.1);
}
.answer-option .opt-num {
  font-size: clamp(14px, 1.1vw, 18px);
  color: var(--accent-2);
  font-weight: 700;
}
.answer-option .opt-label {
  font-size: clamp(11px, 0.9vw, 13px);
  color: var(--muted);
  text-align: center;
}
.answer-option input[type="radio"] { display: none; }

/* Botões */
.controls {
  display: flex;
  gap: 1vw;
  justify-content: center;
  margin-top: 1vw;
  flex-wrap: wrap;
}
.btn {
  padding: clamp(8px, 1vw, 12px) clamp(16px, 1.4vw, 20px);
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: clamp(13px, 1vw, 15px);
  transition: all .25s ease;
}
.btn-primary {
  background: var(--accent-2);
  color: #fff;
  box-shadow: 0 4px 10px rgba(46,125,50,0.2);
}
.btn-primary:hover { transform: scale(1.05); }
.btn-ghost {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid var(--border);
}
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Resultados */
.result-wrap { text-align: center; padding: 1vw; }
.result-box {
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: clamp(12px, 1vw, 18px);
  border-radius: 10px;
  font-size: clamp(13px, 1vw, 15px);
  color: var(--muted);
}
.result-box h4 { margin-top: 10px; color: var(--accent-2); }

/* Rodapé */
.footer {
  text-align: center;
  font-size: clamp(11px, 0.9vw, 13px);
  color: var(--muted);
}

/* Logo */
.sen-logo-wrapper {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
}
.sen-logo {
  width: clamp(70px, 7vw, 120px);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}
.sen-logo:hover { transform: scale(1.05); }
