:root {
  --gf-purple: #673ab7;
  --gf-purple-dark: #5e35b1;
  --gf-gray: #f1f3f4;
  --gf-border: #dadce0;
  --gf-text: #202124;
  --gf-text-light: #5f6368;
  --gf-error: #d93025;
}

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

body {
  font-family: "Roboto", Arial, sans-serif;
  font-size: 15px;
  color: var(--gf-text);
  background: #f0ebf8;
  line-height: 1.5;
}

a { color: #ffffff; text-decoration: none; }
.hidden { display: none !important; }

/* ---------- Header tím kiểu Google Forms ---------- */
.gf-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(90deg, #673ab7 0%, #7b3ff2 100%);
  color: #fff;
  display: flex;
  align-items: center;
  z-index: 50;
  box-shadow: 0 2px 6px rgba(32, 33, 36, 0.28);
}
.gf-header-inner {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gf-brand { font-weight: 700; font-size: 18px; letter-spacing: 0.3px; }
.gf-switch-link a { font-size: 13px; opacity: 0.9; }
.gf-switch-link a:hover { opacity: 1; text-decoration: underline; }

/* ---------- Main card ---------- */
.gf-main {
  max-width: 700px;
  margin: 84px auto 40px;
  padding: 0 12px;
}

.gf-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--gf-border);
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15);
  margin-bottom: 16px;
  padding: 28px 24px;
}

.gf-title-card { border-top: 10px solid #673ab7; }
.gf-title-card h1 { font-size: 26px; font-weight: 500; margin-bottom: 10px; line-height: 1.35; }
.gf-desc { color: var(--gf-text-light); margin-bottom: 16px; }

.gf-progress {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--gf-purple-dark);
  background: #f3edfd;
  border-radius: 20px;
  padding: 5px 14px;
  font-weight: 500;
}

/* ---------- Câu hỏi ---------- */
.gf-question {
  background: var(--gf-gray);
  border-radius: 9px;
  padding: 22px 18px;
  margin-top: 16px;
}
.gf-q-label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}
.gf-required { color: var(--gf-error); font-weight: 700; }
.gf-q-hint { font-size: 13px; color: var(--gf-text-light); margin-bottom: 10px; }

.gf-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  cursor: pointer;
  font-size: 15px;
}
.gf-opt input[type="radio"] {
  width: 19px;
  height: 19px;
  margin-top: 3px;
  accent-color: var(--gf-purple);
  cursor: pointer;
  flex-shrink: 0;
}

.gf-opt.dimmed { opacity: 0.45; }

.gf-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--gf-border);
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  padding: 10px 2px 8px;
  outline: none;
}
.gf-input:focus { border-bottom: 2px solid var(--gf-purple); }
.gf-input.invalid { border-bottom: 2px solid var(--gf-error); }

.gf-error { color: var(--gf-error); font-size: 13px; margin-top: 6px; min-height: 18px; }

/* ---------- Nút ---------- */
.gf-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.gf-submit {
  background: var(--gf-purple);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  padding: 11px 26px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.gf-submit:hover { background: var(--gf-purple-dark); box-shadow: 0 1px 3px rgba(60, 64, 67, 0.4); }
.gf-reset {
  background: transparent;
  color: var(--gf-purple-dark);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  padding: 11px 8px;
}
.gf-reset:hover { background: #f3edfd; border-radius: 6px; }

.gf-footnote { margin-top: 22px; font-size: 12.5px; color: var(--gf-text-light); }

/* ---------- Màn hình kết quả ---------- */
.gf-result { text-align: center; padding: 40px 24px; }
.gf-result-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #f3edfd;
  color: var(--gf-purple);
  font-size: 26px;
  font-weight: 700;
  line-height: 60px;
}
.gf-result h2 { font-size: 22px; font-weight: 500; margin-bottom: 10px; }
.gf-result p { color: var(--gf-text-light); margin-bottom: 6px; }

/* ---------- Footer ---------- */
.gf-footer {
  text-align: center;
  color: #8f8997;
  font-size: 13px;
  padding: 18px 0 30px;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .gf-main { margin-top: 76px; padding: 0 6px; }
  .gf-card { padding: 22px 16px; }
  .gf-title-card h1 { font-size: 21px; }
  .gf-question { padding: 18px 14px; }
  .gf-opt { font-size: 14.5px; }
}