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

html, body {
  margin: 0;
  padding: 0;
  background-color: #0a1a2f;
}
html {
  scroll-behavior: smooth;
}

/*header*/
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 70px;
  background-color: #2e3b4a;
  box-shadow: 0 2px 10px rgba(29, 53, 87, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
}
.logo img {
  width: 45px;
  height: 45px;
  margin-right: 10px;
}
.site-title {
  font-size: 30px;
  font-weight: 700;
  color: #f2f3f0;
  letter-spacing: 1px;
}

nav ul {
  display: flex;
  justify-content: space-evenly;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 150px;
}
nav ul li a {
  text-decoration: none;
  color: #f2f3f0;
  font-size: 22px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}
nav ul li a::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s ease;
  z-index: -1;
}
nav ul li a:hover::before {
  opacity: 1;
  transform: scale(1);
}
nav ul li a:hover {
  transform: translateY(-2px);
  color: #f2f3f0;
  background-color: transparent;
}
nav ul li a.active {
  color: #f4dfa9;
}
nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 70%;
  height: 3px;
  background: #f4dfa9;
  border-radius: 2px;
  transition: transform 0.4s ease;
  transform-origin: center;
}
nav ul li a.active::after {
  transform: translateX(-50%) scaleX(1);
}

header.scrolled {
  background-color: #e8f0f7;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: 0.3s ease;
}
header {
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}
header.scrolled {
  background-color: rgba(29, 53, 87, 0.6);
  backdrop-filter: blur(6px);
}
/* body */
.stroke-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90vh;
  background: url("brain.png") no-repeat center center/cover;
  color: white;
  padding: 50px 8%; 
  position: relative;
}
.stroke-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90vh;
  background: 
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 80%, rgba(240, 248, 255, 1) 100%), 
    url("brain.png") no-repeat center center/cover;
  color: white;
  padding: 50px 8%; 
  position: relative;
}
.stroke-hero {
  background-attachment: fixed;
}
.stroke-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 47, 0.5);
  z-index: 0;
}
.stroke-hero * {
  position: relative;
  z-index: 1;
}
.stroke-hero .content,.stroke-hero .visual {
  position: relative;
  z-index: 1;
}
.content {
  flex: 2;
  max-width: 65%;
}
.visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1s forwards;
  animation-delay: calc(var(--i) * 0.04s);
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 1.0px;
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.main-title .sp{
  display: inline-block;
  width: .12em;
  height: 1em;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1s forwards;
  animation-delay: calc(var(--i) * 0.04s);
  letter-spacing: 0;
}

.sub-text {
  font-size: 25px;
  margin: 20px 0 40px;
  line-height: 1.6;
  color: #ffffff;
}

.stats {
  display: flex;
  gap: 40px;
  margin-top: 30px;
}
.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 30px;
  font-weight: bold;
  color: #f4dfa9;
}
.stat-label {
  display: block;
  font-size: 20px;
  color: #ffffff;
  margin-top: 6px;
}

.stroke-slogan-box {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 30px;
  max-width: 350px;
  max-height: 250px;
  text-align: center;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}
.slogan-text {
  font-style: italic;
  font-size: 20px;
  margin-bottom: 15px;
  color: #fef9e7;
}
.slogan-author {
  font-size: 18px;
  color: #e8f0f7;
}

.background {
  background: linear-gradient(180deg, #e8f0f7 0%, #f4f7fa 100%);
  padding: 50px 0;
  min-height: 100vh;
}
.background {
  background: linear-gradient(270deg, #dbeafe, #f3f8ff, #e0f2fe);
  background-size: 600% 600%;
  animation: bgMove 12s ease infinite;
  padding: 50px 0;
  min-height: 100vh;
}
@keyframes bgMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

section {
  scroll-margin-top: 100px;
}

.content-box {
  background-color: #ffffff;
  border: 1px solid #d6dee7;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(29, 53, 87, 0.15);
  max-width: 1250px;
  margin: 40px auto;
  padding: 20px 50px 40px 50px;
  transition: 0.2s ease, box-shadow 0.3s ease;
}
.content-box:hover {
  transform: translate(-3px);
  box-shadow: 0 10px 25px rgba(29, 53, 87, 0.2);
}

.content-box h2 {
  color: #1d3557;
  font-size: 30px;
  margin-top: 0px;
  margin-bottom: 20px;
  border-bottom: 2px solid #4a90e2;
  padding-bottom: 8px;
}
.content-box h3 {
  color: #294d7a;
  margin-top: 18px;
  font-size: 25px;
}
.content-box p, 
.content-box li {
  color: #1d3557;
  line-height: 1.7;
  font-size: 20px;
}

.stroke-types {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}
.stroke-box {
  flex: 1;
  background-color: #ffffff;
  border: 1px solid #cfd8dc;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 6px rgba(29, 53, 87, 0.1);
}
.stroke-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(29, 53, 87, 0.2);
  cursor: pointer;
}
.stroke-box h4 {
  text-align: center;
  color: #1d3557;
  margin-top: 0px;
  margin-bottom: 10px;
  font-size: 22px;
  border-bottom: 2px solid #4a90e2;
  padding-bottom: 15px;
}
ul {
  padding-left: 32px;
}
ul li {
  margin-bottom: 10px;
}

.box h3 {
  text-align: center;
  font-size: 25px;
  color: #294d7a;
  margin-top: 10px;
}
#start-btn {
  background-color: #1d3557;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3 ease;
}
#start-btn:hover {
  background-color: #084d9b;
  transform: scale(1.05);
}
#start-section {
  text-align: center;
  margin-top: 20px;
}

#causes {
  background-color: #e8f0f7;
  padding: 40px;
  border-radius: 15px;
}
.cause-box {
  background: white;
  border-radius: 15px;
  padding: 25px 30px;
  box-shadow: 0 4px 10px rgba(29, 53, 87, 0.1);
  margin-bottom: 25px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cause-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(29, 53, 87, 0.2);
}
.cause-box ul {
  margin-left: 20px;
  line-height: 1.6;
}
.cause-box li {
  margin-bottom: 8px;
}

/*box result*/
#result-section {
  background-color: #ffffff;
  border: 1px solid #dfe5ec;
  box-shadow: 0 6px 18px rgba(29, 53, 87, 0.1);
  border-radius: 14px;
  max-width: 1000px;
  margin: 50px auto;
  padding: 20px 50px;
  display: none;
}
#result-section.visible {
  display: block;
}
#result-section {
  text-align: center;
  background-color: #ffffff;
  border-radius: 16px;
  padding: 20px 60px;
  box-shadow: 0 4px 15px rgba(29, 53, 87, 0.1);
  margin-top: 40px;
}
#result-section h3 {
  font-size: 30px;
  color: #1d3557;
  margin-bottom: 10px;
  border-bottom: 2px solid #4a90e2;
  display: inline-block;
  padding-bottom: 10px;
}
#result-section .risk-level {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
  margin-top: 10px;
  text-align: center;
}

.Low {
  color: #2e7d32 !important;
}
.Medium {
  color: #f9a825 !important;
}
.High {
  color: #c62828 !important;
}
#result-section .advice-box {
  text-align: left;
  max-width: 900px;
  margin: 10px auto 0 auto;
  background-color: #e8f0f7;
  padding: 20px 25px;
  border-radius: 10px;
  font-size: 20px;
  line-height: 1.6;
  color: #1d3557;
}

/* footer */
footer {
  background-color: #2e3b4a;
  color: white;
  padding: 25px 0 10px;
  font-family: 'Segoe UI', sans-serif;
  border-top: 2px solid #d6dee7;
}
.footer-container {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 25px;
}
/* Cột 1 */
.footer-column1 h3 {
  font-size: 20px;
  color: #4a90e2;
  margin-bottom: 8px;
  display: inline-block;
  padding-bottom: 5px;
}
.footer-column1 ul {
  list-style: none;
  padding: 0;
}
.footer-column1 ul li {
  margin-bottom: 8px;
}
.footer-column1 ul li a {
  color: #f2f3f0;
  text-decoration: none;
  transition: color 0.3s;
}
.footer-column1 ul li a:hover {
  color: #4a90e2;
}
.footer-column1 {
  flex: 1;
  min-width: 280px;
  margin: 0 15px;
}

/* Cột 2,3 */
.footer-column {
  flex: 2;
  min-width: 280px;
  margin: 0 40px;
}
.footer-column h3 {
  font-size: 20px;
  color: #4a90e2;
  margin-bottom: 8px;
  display: inline-block;
  padding-bottom: 5px;
}
.footer-column ul {
  list-style: none;
  padding: 0;
}
.footer-column ul li {
  margin-bottom: 8px;
}
.footer-column ul li a {
  color: #f2f3f0;
  text-decoration: none;
  transition: color 0.3s;
}
.footer-column ul li a:hover {
  color: #4a90e2;
}
.footer-column p {
  line-height: 1.8;
  text-align: justify;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #ccc;
  margin-top: 30px;
  padding: 8px 0 6px 0;
  font-size: 15px;
  color: #f2f3f0;
}
.footer-bottom p {
  margin: 0;
}
footer {
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Form câu hỏi */
#form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  width: 100%;
  background: none;
  box-shadow: none;
  padding: 0;
}

.question {
  width: 60%;
  margin: 25px auto;
  padding: 25px 30px;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(29, 53, 87, 0.1);
  animation: fadeIn 0.4s ease;
  text-align: center;
}
.question p {
  font-size: 20px;
  font-weight: 600;
  color: #1d3557;
  margin-bottom: 20px;
  margin-top: 0;
}

.question input[type="number"] {
  width: 40%;
  text-align: center;
  padding: 10px 15px;
  font-size: 17px;
  border-radius: 25px;
  border: 1.5px solid #4a90e2;
  outline: none;
  transition: 0.3s;
}
.question input[type="number"]:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 6px rgba(74,144,226,0.3);
}

.choice-group {
  display: flex;
  justify-content: center;
  gap: 65px;
  margin-top: 15px;
}
.choice-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 18px;
  color: #1d3557;
  transition: color 0.3s;
}
.choice-option:hover {
  color: #4a90e2;
}

.choice-circle {
  width: 18px;
  height: 18px;
  border: 2px solid #1d3557;
  border-radius: 50%;
  position: relative;
  transition: 0.3s;
}
.choice-circle.active::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: #00C2CB;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.choice-circle::after {
  transition: all 0.2s ease;
}

.submit-section {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.submit-btn {
  margin: 40px auto;
  padding: 15px 45px;
  font-size: 20px;
  font-weight: 500;
  background: linear-gradient(135deg, #1d3557, #4a90e2);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.4s;
  box-shadow: 0 4px 10px rgba(29,53,87,0.15);
}
.submit-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #294d7a, #4a90e2);
}

.question.missing {
  border: 2px solid #c62828;
  border-radius: 8px;
  padding: 8px;
  animation: shake 0.5s ease;
}
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

/* Fade */
body {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}
body.page-visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.22,.9,.27,1), transform 0.7s cubic-bezier(.22,.9,.27,1);
  will-change: opacity, transform;
}
.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-section .fade-child {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-section.visible .fade-child {
  opacity: 1;
  transform: translateY(0);
}
.fade-section[data-delay="1"] { transition-delay: 0.06s; }
.fade-section[data-delay="2"] { transition-delay: 0.12s; }
.fade-section[data-delay="3"] { transition-delay: 0.18s; }
.stroke-hero.fade-section { transition-duration: 1s; transition-timing-function: ease-out; }
.main-title.fade-child { transition-duration: 0.9s; }