/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Màu chính */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

  /* Màu nền */
  --bg-dark: #0f0f23;
  --bg-darker: #0a0a15;
  --bg-card: rgba(255, 255, 255, 0.05);

  /* Màu chữ */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --text-muted: rgba(255, 255, 255, 0.6);

  /* Hiệu ứng */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.3);

  /* Animation */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========================================
   HEADER
   ======================================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(10, 10, 21, 0.95);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-normal);
}

header:hover {
  border-bottom-color: rgba(102, 126, 234, 0.3);
}

.logo {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--primary-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInDown 0.8s ease forwards;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.05);
}

nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  position: relative;
  transition: color var(--transition-fast);
}

nav a::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width var(--transition-normal);
}

nav a:hover {
  color: var(--text-primary);
}

nav a:hover::before {
  width: 100%;
}

/* ========================================
   LANGUAGE TOGGLE
   ======================================== */
.lang-toggle {
  position: fixed;
  top: 90px;
  right: 40px;
  z-index: 1100;
  display: flex;
  gap: 12px;
  animation: fadeInRight 0.8s ease forwards;
  animation-delay: 0.3s;
}

.lang-toggle button {
  padding: 10px 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

.lang-toggle button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(102, 126, 234, 0.5);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.lang-toggle button.active {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 40px 80px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("images/home-hero-bg.jpg") center center / cover no-repeat;
  filter: brightness(0.2) blur(1px);
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    rgba(102, 126, 234, 0.15) 0%,
    transparent 70%
  );
  z-index: -1;
}

.hero h1 {
  font-size: 64px;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.2;
  background: var(--primary-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease forwards,
    textGlow 3s ease-in-out infinite alternate;
  text-shadow: 0 0 40px rgba(102, 126, 234, 0.5);
}

.hero p {
  font-size: 20px;
  max-width: 700px;
  margin-bottom: 40px;
  color: var(--text-secondary);
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero button {
  padding: 16px 48px;
  font-size: 16px;
  font-weight: 600;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-normal);
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.4s;
  opacity: 0;
  animation-fill-mode: forwards;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
}

.hero button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.hero button:hover::before {
  left: 100%;
}

.hero button:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

.hero button:active {
  transform: translateY(-2px) scale(1.02);
}

/* ========================================
   SECTIONS
   ======================================== */
section {
  padding: 100px 40px;
  text-align: center;
  position: relative;
}

#about,
#services,
#contact {
  background: var(--bg-darker);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#about {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

h2 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  background: var(--primary-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

section p {
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ========================================
   CARDS
   ======================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 60px auto 0;
}

.card {
  background: var(--bg-card);
  padding: 40px 32px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: -1;
}

.card:hover::before {
  opacity: 0.1;
}

.card:hover {
  transform: translateY(-12px);
  box-shadow: 0 16px 48px rgba(102, 126, 234, 0.3);
  border-color: rgba(102, 126, 234, 0.5);
}

.card h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* ========================================
   FORM
   ======================================== */
form {
  max-width: 600px;
  margin: 60px auto 0;
  text-align: left;
}

form input,
form textarea,
form button {
  width: 100%;
  padding: 16px 20px;
  margin: 12px 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  transition: all var(--transition-normal);
  background: var(--bg-card);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

form input::placeholder,
form textarea::placeholder {
  color: var(--text-muted);
}

form textarea {
  min-height: 160px;
  resize: vertical;
}

form button {
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  border: none;
  margin-top: 20px;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
}

form button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 252, 248, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

form button:hover::before {
  left: 100%;
}

form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

form button:active {
  transform: translateY(-1px);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
  background: var(--bg-darker);
  color: var(--text-secondary);
  padding: 40px 20px;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
  opacity: 0.8;
}

/* ========================================
   LANGUAGE SWITCHING EFFECTS
   ======================================== */
.lang {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hidden {
  display: none !important;
  opacity: 0;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.fade-out {
  opacity: 0;
  transform: translateY(10px);
}

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes textGlow {
  from {
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5));
  }
  to {
    filter: drop-shadow(0 0 20px rgba(118, 75, 162, 0.8));
  }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
  header {
    padding: 18px 30px;
  }

  .hero h1 {
    font-size: 52px;
  }

  .cards {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  header {
    padding: 16px 24px;
  }

  .logo {
    font-size: 24px;
  }

  nav {
    gap: 20px;
  }

  nav a {
    font-size: 14px;
  }

  .lang-toggle {
    top: 80px;
    right: 24px;
    gap: 8px;
  }

  .lang-toggle button {
    padding: 8px 16px;
    font-size: 13px;
  }

  .hero {
    padding: 100px 24px 60px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero button {
    padding: 14px 36px;
    font-size: 15px;
  }

  h2 {
    font-size: 32px;
  }

  section {
    padding: 60px 24px;
  }

  section p {
    font-size: 16px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 40px;
  }

  form {
    margin-top: 40px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 28px;
  }

  nav {
    gap: 16px;
  }

  nav a {
    font-size: 13px;
  }
}

/* ========================================
   SCROLL ANIMATIONS (Optional Enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
  .scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark mode support (already dark, but this allows for future light mode) */
@media (prefers-color-scheme: light) {
  /* Add light mode styles if needed */
}
