/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #2c3e50;
  line-height: 1.7;
}

/* ===== HOMEPAGE – ĐẸP, CHUYÊN NGHIỆP ===== */
.homepage {
  min-height: 100vh;
  padding: 40px 20px;
  text-align: center;
}

.homepage .container {
  max-width: 1100px;
  margin: 0 auto;
}

.homepage .header {
  margin-bottom: 60px;
}

.homepage .logo {
  font-size: 2.5rem;
  font-weight: 700;
  color: #3498db;
  margin-bottom: 10px;
}

.homepage .tagline {
  font-size: 1.2rem;
  color: #7f8c8d;
  font-weight: 500;
}

.homepage .hero {
  margin-bottom: 80px;
}

.homepage .hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #3498db, #8e44ad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.homepage .hero p {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto 30px;
  color: #555;
}

.homepage .btn-primary {
  display: inline-block;
  background: #3498db;
  color: white;
  padding: 16px 36px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
  transition: all 0.3s;
}

.homepage .btn-primary:hover {
  background: #2980b9;
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(52, 152, 219, 0.4);
}

.homepage .test-grid {
  margin-top: 80px;
}

.homepage .section-title {
  font-size: 2.2rem;
  margin-bottom: 40px;
  color: #2c3e50;
}

.homepage .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.homepage .test-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: all 0.3s;
  text-align: center;
  border: 1px solid #eee;
}

.homepage .test-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.homepage .card-icon {
  font-size: 2.8rem;
  font-weight: 700;
  color: #3498db;
  margin-bottom: 15px;
}

.homepage .test-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: #2c3e50;
}

.homepage .test-info {
  display: block;
  font-size: 0.95rem;
  color: #95a5a6;
  margin: 15px 0;
}

.homepage .btn-test {
  background: #27ae60;
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s;
}

.homepage .btn-test:hover {
  background: #219653;
  transform: translateY(-2px);
}

/* ===== TEST PAGE – GỌN, TẬP TRUNG ===== */
.test-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.test-page .container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 600px;
  overflow: hidden;
}

/* ===== SECTION & NAVIGATION (dùng chung) ===== */
.section {
  padding: 40px;
  text-align: center;
  display: none;
}

.section.active {
  display: block;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

p {
  color: #7f8c8d;
  margin-bottom: 2rem;
}

/* ===== BUTTONS (dùng chung) ===== */
button, .btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  margin: 10px;
  font-weight: 600;
}

button:hover, .btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

button:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
}

/* ===== PROGRESS & QUESTION ===== */
.progress {
  height: 6px;
  background: #ecf0f1;
  border-radius: 3px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: #3498db;
  width: 0;
  transition: width 0.4s ease;
}

.question-number {
  font-size: 0.9rem;
  color: #95a5a6;
  margin-bottom: 10px;
}

#questionText {
  font-size: 1.3rem;
  margin: 20px 0;
  line-height: 1.6;
  color: #2c3e50;
}

/* ===== OPTIONS ===== */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 25px 0;
}

.option {
  background: #f8f9fa;
  color: #2c3e50;
  border: 2px solid transparent;
  padding: 14px;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s;
  text-align: center;
  cursor: pointer;
}

.option:hover {
  background: #e9ecef;
  border-color: #3498db;
}

.option.selected {
  background: #3498db;
  color: white;
  border-color: #2980b9;
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

/* ===== RESULT ===== */
.mbti-type {
  font-size: 3rem;
  font-weight: 700;
  margin: 20px 0;
  color: #2c3e50;
}

.mbti-desc {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
  line-height: 1.7;
  color: #34495e;
  text-align: left;
  border-left: 5px solid #3498db;
}

/* ===== NÚT TRANG CHỦ - CHỈ TRONG TEST PAGE ===== */
.test-page .home-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  background: #3498db;
  color: white;
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
  transition: all 0.3s;
  z-index: 1000;
}

.test-page .home-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .homepage .hero h1 { font-size: 2.3rem; }
  .homepage .grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .test-page .container { margin: 10px; padding: 20px; }
  h1 { font-size: 1.6rem; }
  .option { padding: 12px; font-size: 0.95rem; }
  .mbti-type { font-size: 2.2rem; }
}
/* ===== BIG FIVE RESULT ===== */
.result-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
}

.factor {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 12px;
  border-left: 4px solid #3498db;
}

.factor-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #2c3e50;
}

.bar-container {
  height: 12px;
  background: #e9ecef;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.bar {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2980b9);
  border-radius: 6px;
  transition: width 0.6s ease;
}

.factor-desc {
  font-size: 0.95rem;
  color: #555;
}