html { 
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}
body {
  background-color: #0a0a0a;
  color: #e5e5e5;
  font-family: 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  position: relative;
}
/* Prevent horizontal scroll on all elements */
* {
  max-width: 100%;
  box-sizing: border-box;
}
img, video, iframe {
  max-width: 100%;
  height: auto;
}
/* Tối ưu thanh cuộn (Scrollbar) cho giống App */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FF7A00, #FFC700);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #FFC700; }

/* Utilities */
.text-shadow-glow { text-shadow: 0 0 10px rgba(255, 122, 0, 0.7); }
.gradient-text {
  background: linear-gradient(to right, #FF7A00, #FFC700);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* FAQ Animation */
details > summary { list-style: none; cursor: pointer; transition: all 0.3s; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { color: #FF7A00; }

/* Back to Top */
#back-to-top {
  position: fixed; bottom: 100px; right: 30px;
  width: 45px; height: 45px;
  background: linear-gradient(135deg, #FF7A00, #FFC700);
  color: #000; border: none; border-radius: 50%;
  cursor: pointer; display: none; align-items: center; justify-content: center;
  font-size: 18px; z-index: 9999;
  box-shadow: 0 4px 15px rgba(255, 122, 0, 0.5);
  transition: transform 0.3s ease;
}
#back-to-top:hover { transform: translateY(-5px) scale(1.1); }
#back-to-top.show { display: flex; animation: fadeIn 0.5s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Scroll Animation Styles */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}
.scroll-animate-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.scroll-animate-left.animate-in {
  opacity: 1;
  transform: translateX(0);
}
.scroll-animate-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.scroll-animate-right.animate-in {
  opacity: 1;
  transform: translateX(0);
}
.scroll-animate-scale {
  opacity: 0;
  transform: scale(0.85) translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), 
              transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.scroll-animate-scale.animate-in {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.scroll-animate-delay-1 { transition-delay: 0.1s; }
.scroll-animate-delay-2 { transition-delay: 0.2s; }
.scroll-animate-delay-3 { transition-delay: 0.3s; }
.scroll-animate-delay-4 { transition-delay: 0.4s; }
.scroll-animate-delay-5 { transition-delay: 0.5s; }
.scroll-animate-delay-6 { transition-delay: 0.6s; }

/* EZ TOC Styles */
#ez-toc-toggle {
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
#ez-toc-toggle:hover {
  box-shadow: 0 4px 12px rgba(255, 122, 0, 0.2);
  transform: translateY(-1px);
}
#ez-toc-toggle:active {
  transform: translateY(0);
}
#ez-toc-container {
  overflow-y: auto;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              padding-top 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              padding-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
  opacity: 0;
}
#ez-toc-container.ez-toc-open {
  max-height: 600px !important;
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  opacity: 1;
}
#ez-toc-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#ez-toc-icon.ez-toc-open {
  transform: rotate(180deg);
}
#ez-toc-container::-webkit-scrollbar {
  width: 8px;
}
#ez-toc-container::-webkit-scrollbar-track {
  background: rgba(31, 41, 55, 0.5);
  border-radius: 4px;
}
#ez-toc-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FF7A00, #FFC700);
  border-radius: 4px;
  border: 2px solid rgba(31, 41, 55, 0.5);
}
#ez-toc-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #FFC700, #FF7A00);
}
.ez-toc-nav ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.ez-toc-nav > ul > li {
  margin-bottom: 0.5rem;
  position: relative;
}
.ez-toc-nav > ul > li > a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
  font-weight: 500;
}
.ez-toc-nav > ul > li > a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, #FF7A00, #FFC700);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}
.ez-toc-nav > ul > li > a:hover {
  background: rgba(255, 122, 0, 0.1);
  padding-left: 16px;
  color: #FF7A00;
}
.ez-toc-nav > ul > li > a:hover::before {
  height: 60%;
}
.ez-toc-nav ul ul {
  margin-top: 0.5rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(255, 122, 0, 0.2);
}
.ez-toc-nav ul ul li {
  margin-bottom: 0.25rem;
}
.ez-toc-nav ul ul a {
  display: block;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}
.ez-toc-nav ul ul a:hover {
  background: rgba(255, 122, 0, 0.08);
  padding-left: 14px;
  color: #FFC700;
}

/* Giới Thiệu Content Toggle */
#gioi-thieu-content {
  transition: max-height 0.5s ease-out, overflow 0.3s;
}
#gioi-thieu-mask {
  transition: opacity 0.3s ease;
}

/* Logo Glow Effect */
.logo-glow {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 8px rgba(255, 122, 0, 0.4)) drop-shadow(0 0 12px rgba(255, 199, 0, 0.3));
  transition: filter 0.3s ease;
}
.logo-glow:hover {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 12px rgba(255, 122, 0, 0.6)) drop-shadow(0 0 18px rgba(255, 199, 0, 0.5));
}

/* NOEL EFFECTS */
/* Snowflakes Animation */
.snowflake {
  position: fixed;
  top: -10px;
  color: #fff;
  font-size: 1em;
  font-family: Arial, sans-serif;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
  animation: snowfall linear infinite;
  pointer-events: none;
  z-index: 10000;
}

@keyframes snowfall {
  0% {
    transform: translateY(0vh) translateX(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) translateX(var(--drift)) rotate(360deg);
    opacity: 0;
  }
}

/* Christmas Glow Effect */
.christmas-glow {
  animation: christmasPulse 2s ease-in-out infinite;
}

@keyframes christmasPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(220, 20, 60, 0.5), 0 0 20px rgba(34, 139, 34, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.8), 0 0 30px rgba(34, 139, 34, 0.6);
  }
}

/* Christmas Header Decoration */
.christmas-header {
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.1), rgba(34, 139, 34, 0.1));
  border-bottom: 2px solid rgba(220, 20, 60, 0.3);
}

/* Header Video Background */
header video {
  pointer-events: none;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
}

header {
  overflow: hidden;
}

/* Add padding to body to prevent content from being hidden under fixed header */
body {
  padding-top: 104px; /* Banner + Header height on mobile */
}

@media (min-width: 768px) {
  body {
    padding-top: 80px; /* Banner + Header height on desktop */
  }
}

/* Mobile Menu - Hide video background */
#mobile-menu {
  background-color: #0a0a0a !important;
  position: relative;
  z-index: 50;
}

#mobile-menu::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: #0a0a0a;
  z-index: 0;
}

#mobile-menu > * {
  position: relative;
  z-index: 10;
}

/* Fix overflow issues on mobile */
section, main {
  max-width: 100%;
  overflow-x: hidden;
}

/* Fix absolute positioned elements */
.relative {
  overflow: hidden;
}

/* Fix hero section icons */
h2.relative {
  overflow: visible;
}

/* Ensure viewport width constraint */
@media (max-width: 768px) {
  html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
  }
}

/* Ensure all containers respect viewport width */
.max-w-7xl,
.max-w-3xl,
.max-w-2xl,
.max-w-xl {
  max-width: 100%;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (max-width: 768px) {
  /* Hide decorative elements that cause overflow on mobile */
  .absolute.-left-8,
  .absolute.-right-8,
  .absolute.-left-12,
  .absolute.-right-12 {
    display: none;
  }
  
  /* Prevent any element from causing horizontal scroll */
  body > * {
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  /* Fix padding on mobile */
  .px-4,
  .px-6,
  .px-8 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Floating Christmas Icons */
.christmas-icon {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Button Snow Effect */
.button-snow {
  position: relative;
}

.snowflake-btn {
  position: absolute;
  color: white;
  font-size: 8px;
  pointer-events: none;
  opacity: 0.8;
  animation: snowOnButton 2s ease-in-out infinite;
}

.snowflake-btn:nth-child(2) {
  left: 20%;
  top: 10%;
  animation-delay: 0s;
}

.snowflake-btn:nth-child(3) {
  left: 60%;
  top: 20%;
  animation-delay: 0.5s;
}

.snowflake-btn:nth-child(4) {
  left: 80%;
  top: 15%;
  animation-delay: 1s;
}

@keyframes snowOnButton {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-5px) rotate(180deg);
    opacity: 1;
  }
}

/* Christmas Lights Border Effect */
.christmas-lights-border {
  position: relative;
  border: 2px solid transparent;
}

.christmas-lights-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 9999px;
  background: linear-gradient(
    90deg,
    #ff0000 0%,
    #00ff00 25%,
    #ffff00 50%,
    #00ff00 75%,
    #ff0000 100%
  );
  background-size: 200% 100%;
  animation: christmasLights 3s linear infinite;
  z-index: -1;
  opacity: 0.8;
}

@keyframes christmasLights {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

.christmas-lights-border::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 9999px;
  background: #0a0a0a;
  z-index: -1;
  margin: 2px;
}

