:root {
  --primary: #d63638;
  --cloudflare-orange: #f38020; /* Màu cam thương hiệu Cloudflare */
  --cloudflare-hover: #d96b0c;
  --dark: #1d2327;
  --gray: #646970;
  --light-bg: #f6f7f7;
  --white: #ffffff;
  --shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Chặn thanh cuộn ngang tuyệt đối */
html,
body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--light-bg);
  color: var(--dark);
  line-height: 1.5; /* Giảm line-height nhẹ để text gọn hơn */
}

/* Xóa gạch dưới cho mọi đường link trên trang */
a {
  text-decoration: none;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* --- HERO SECTION --- */
.hero {
  /* Giảm chiều cao tối thiểu từ 90vh xuống 70vh để gọn hơn trên Desktop */
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* Giảm padding trên dưới */
  padding: 40px 0;
  background: radial-gradient(circle at top, #fff 0%, var(--light-bg) 100%);
  position: relative;
}

.badge {
  display: inline-block;
  background: #fff;
  border: 1px solid #ddd;
  padding: 4px 12px; /* Thu nhỏ padding badge */
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 16px; /* Giảm margin bottom */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  animation: slideDown 0.8s ease-out;
}

.hero h1 {
  font-size: 3rem; /* Giảm nhẹ size chữ tiêu đề */
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 12px; /* Giảm khoảng cách dưới tiêu đề */
  letter-spacing: -1px;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
  position: relative;
  z-index: 1;
}

.hero h1 span {
  color: var(--primary);
  position: relative;
  white-space: nowrap;
  display: inline-block;
}

/* Icon Cafe bay bay */
.hero h1 span::after {
  content: "☕";
  position: absolute;
  top: -20px;
  right: -30px;
  font-size: 2rem;
  animation: float 3s ease-in-out infinite;
  pointer-events: none;
}

.hero p {
  font-size: 1.15rem; /* Giảm nhẹ size chữ mô tả */
  color: var(--gray);
  max-width: 600px;
  /* FIX CĂN GIỮA + Giảm margin bottom xuống 30px */
  margin: 0 auto 30px auto;
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
  padding: 0 10px;
}

/* --- BUTTON STYLE --- */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* ĐỔI MÀU CLOUDFLARE */
  background-color: var(--cloudflare-orange);
  color: var(--white);
  padding: 15px 32px; /* Thu gọn nút bấm lại một chút */
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(243, 128, 32, 0.3); /* Bóng đổ màu cam */
  animation: fadeInUp 0.8s ease-out 0.6s backwards;
  max-width: 100%;
}

.btn-download:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(243, 128, 32, 0.4);
  background-color: var(--cloudflare-hover);
}

.btn-download i {
  font-size: 1.2rem;
}

.version-text {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #999;
  animation: fadeIn 1s ease-out 1s backwards;
}

/* --- FEATURES GRID --- */
.features {
  /* Giảm padding section features */
  padding: 50px 0;
  background: var(--white);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  /* Giảm khoảng cách giữa các card */
  gap: 25px;
  margin-top: 10px;
}

.card {
  /* Giảm padding trong card */
  padding: 24px;
  border-radius: 12px;
  background: var(--light-bg);
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.card:hover {
  background: var(--white);
  border-color: #eee;
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.icon-box {
  width: 44px; /* Thu nhỏ icon box */
  height: 44px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 16px; /* Giảm margin icon */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
  font-weight: 700;
}
.card p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 30px 0;
  color: var(--gray);
  font-size: 0.9rem;
  border-top: 1px solid #eee;
}

footer a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
}

.pfoot {
  margin-top: 5px;
  font-size: 14px;
  opacity: 0.7;
}

.link-in-content {
  color: #2b6cb0;
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
  .hero {
    padding: 40px 0;
    min-height: auto;
  } /* Mobile không cần min-height quá lớn */

  .hero h1 {
    font-size: 2.2rem;
    padding: 0 5px;
  }

  .btn-download {
    width: 100%;
    justify-content: center;
  }

  /* Icon Cafe trên mobile: đưa lên trên đầu chữ */
  .hero h1 span::after {
    right: -5px;
    top: -35px;
    font-size: 1.8rem;
  }

  @media (max-width: 380px) {
    .hero h1 span::after {
      right: 0;
      top: -30px;
    }
  }
}