@font-face {
  font-family: 'Google Sans Flex';
  src: url('Google_Sans_Flex/GoogleSansFlex-VariableFont_GRAD,ROND,opsz,slnt,wdth,wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Google Sans Flex', sans-serif;
  background: linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 100%);
  color: #fff;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Bubbles Effect - iOS Compatible */
.bubbles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bubble {
  position: absolute;
  bottom: -75%;
  display: block;
  border-radius: 50%;
  animation: float-up 12s ease-in infinite;
}

.bubble::before {
  position: absolute;
  content: '';
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: hsla(183, 94%, 76%, 0.25);
  border-radius: inherit;
  animation: sway-left-to-right 4s ease-in-out alternate infinite;
  box-shadow: 0 0 20px hsla(183, 94%, 76%, 0.4);
}

@keyframes float-up {
  to {
    transform: translateY(-175vh);
  }
}

@keyframes sway-left-to-right {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes sway-right-to-left {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle 4px at 20% 30%, rgba(255, 255, 255, 0.9), transparent 5px),
    radial-gradient(circle 5px at 60% 70%, rgba(25, 97, 185, 1), transparent 6px),
    radial-gradient(circle 3px at 50% 50%, rgba(0, 212, 255, 0.85), transparent 4px),
    radial-gradient(circle 4px at 80% 10%, rgba(255, 255, 255, 0.8), transparent 5px),
    radial-gradient(circle 3px at 90% 60%, rgba(25, 97, 185, 0.9), transparent 4px),
    radial-gradient(circle 5px at 33% 80%, rgba(255, 255, 255, 0.75), transparent 6px),
    radial-gradient(circle 3px at 15% 90%, rgba(0, 212, 255, 0.8), transparent 4px),
    radial-gradient(circle 4px at 45% 20%, rgba(255, 255, 255, 0.7), transparent 5px),
    radial-gradient(circle 3px at 70% 45%, rgba(25, 97, 185, 0.85), transparent 4px),
    radial-gradient(circle 5px at 10% 55%, rgba(0, 212, 255, 0.9), transparent 6px),
    radial-gradient(circle 3px at 85% 85%, rgba(255, 255, 255, 0.8), transparent 4px),
    radial-gradient(circle 4px at 25% 65%, rgba(25, 97, 185, 0.75), transparent 5px);
  background-size: 200% 200%;
  animation: particlesFloat 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes particlesFloat {
  0%, 100% {
    background-position: 0% 0%, 100% 100%, 50% 50%, 80% 20%, 10% 90%, 30% 70%, 70% 30%;
  }
  50% {
    background-position: 100% 100%, 0% 0%, 80% 80%, 20% 80%, 90% 10%, 70% 30%, 30% 70%;
  }
}

header, section, .modal {
  position: relative;
  z-index: 1;
}

/* Header */
header {
  padding: 60px 20px 40px;
  text-align: center;
  background: linear-gradient(180deg, rgba(25, 97, 185, 0.15) 0%, transparent 100%);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.logo {
  font-size: clamp(1.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  line-height: 1.2;
  word-wrap: break-word;
}

.tagline {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: #00d4ff;
  font-weight: 500;
  letter-spacing: 0.3px;
  line-height: 1.7;
  margin-bottom: 18px;
  max-width: 100%;
  padding: 0 10px;
  word-wrap: break-word;
}

.description {
  font-size: clamp(0.85rem, 2.2vw, 1rem);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  line-height: 1.8;
  margin-bottom: 15px;
  max-width: 100%;
  padding: 0 10px;
  word-wrap: break-word;
}

.subtitle {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  color: #ffd700;
  font-weight: 600;
  letter-spacing: 0.3px;
  font-style: italic;
  margin-top: 5px;
  padding: 0 10px;
  word-wrap: break-word;
}

/* Carousel Section */
.carousel-section {
  padding: 40px 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper {
  width: 100%;
  padding: 0 0 50px;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  will-change: transform;
  contain: layout style paint;
}

/* Swiper Slide - 120fps Optimized */
.swiper-slide {
  width: 340px;
  height: 440px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.8;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  -webkit-perspective: 1000px;
  will-change: transform, opacity;
  contain: layout style paint;
  content-visibility: auto;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  will-change: transform;
  contain: layout style;
}

/* Overlay */
.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(10, 14, 26, 0.95) 0%, rgba(10, 14, 26, 0.3) 30%, transparent 60%);
  z-index: 1;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

/* Active Slide */
.swiper-slide-active {
  opacity: 1;
  transform: scale3d(1.08, 1.08, 1) translate3d(0, 0, 0.1px);
  -webkit-transform: scale3d(1.08, 1.08, 1) translate3d(0, 0, 0.1px);
  will-change: transform;
}

/* Category Badge */
.category {
  position: absolute;
  top: 20px;
  left: 0;
  background: #1961b9;
  color: #fff;
  padding: 6px 18px 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 0 15px 15px 0;
  z-index: 3;
}

/* Slide Content */
.slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 25px 20px;
  z-index: 2;
}

.slide-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.3;
}

.slide-content p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

/* Play Button - 120fps Optimized */
.play-button {
  position: absolute;
  top: 39%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  -webkit-transform: translate3d(-50%, -50%, 0);
  width: 65px;
  height: 65px;
  background: rgba(25, 97, 185, 0.9);
  border: 3px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 3;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.15s;
  pointer-events: none;
  will-change: opacity, transform;
  contain: layout style paint;
}

.play-button svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
  pointer-events: none;
}

.swiper-slide:hover .play-button {
  opacity: 1;
  visibility: visible;
  transform: translate3d(-50%, -50%, 0) scale3d(1.05, 1.05, 1);
  -webkit-transform: translate3d(-50%, -50%, 0) scale3d(1.05, 1.05, 1);
}

/* Show play button on mobile/touch devices including iOS */
@media (hover: none) and (pointer: coarse) {
  .swiper-slide-active .play-button {
    opacity: 1;
    visibility: visible;
  }
  
  /* iOS specific touch handling */
  .swiper-slide {
    -webkit-tap-highlight-color: rgba(25, 97, 185, 0.2);
  }
}

/* Pagination */
.swiper-pagination {
  position: relative !important;
  bottom: 0 !important;
  left: 0;
  right: 0;
  z-index: 100 !important;
  pointer-events: auto !important;
  padding: 25px 0 15px 0;
  margin-top: 15px;
  touch-action: auto !important;
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  cursor: pointer;
  margin: 0 6px !important;
  transition: all 0.3s ease;
  position: relative;
}

/* Tăng vùng nhấn cho pagination bullets */
.swiper-pagination-bullet::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
}

.swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.swiper-pagination-bullet-active {
  background: #1961b9;
  width: 32px;
  border-radius: 6px;
}

.swiper-pagination-bullet-active:hover {
  background: #1961b9;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 16, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 1200px;
  background: #0a0e1a;
  border: 2px solid #1961b9;
  border-radius: 16px;
  overflow: hidden;
}

.modal-header {
  padding: 22px 28px;
  background: linear-gradient(90deg, rgba(25, 97, 185, 0.2), transparent);
  border-bottom: 1px solid rgba(25, 97, 185, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  flex: 1;
  padding-right: 20px;
}

.close-btn {
  background: rgba(25, 97, 185, 0.2);
  border: 2px solid #1961b9;
  color: #fff;
  font-size: 1.6rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.close-btn:hover {
  background: #1961b9;
  transform: rotate(90deg);
}

.modal-body {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}

.video-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0e1a;
}

::-webkit-scrollbar-thumb {
  background: #1961b9;
  border-radius: 5px;
}

/* Footer */
.footer {
  padding: 15px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.designed-by {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  letter-spacing: 0.5px;
  margin: 0;
}

.designed-by span {
  color: #00d4ff;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 1024px) {
  .header-content {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 40px 15px 30px;
  }

  .header-content {
    padding: 0 10px;
  }

  .logo {
    letter-spacing: 1px;
    margin-bottom: 15px;
  }

  .tagline, .description, .subtitle {
    padding: 0 5px;
  }

  .carousel-section {
    padding: 30px 0 15px;
  }

  .swiper-slide {
    width: 300px;
    height: 400px;
  }

  .slide-content h2 {
    font-size: 1.1rem;
  }

  .modal-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 50px 10px 20px;
  }

  .logo {
    letter-spacing: 0.5px;
    margin-bottom: 12px;
  }

  .tagline {
    margin-bottom: 12px;
  }

  .description {
    margin-bottom: 10px;
  }

  .carousel-section {
    padding: 50px 0 10px;
  }

  .swiper-slide {
    width: 280px;
    height: 380px;
  }

  .play-button {
    width: 55px;
    height: 55px;
    font-size: 1.1rem;
  }
}

@media (max-width: 375px) {
  header {
    padding: 25px 8px 15px;
  }

  .header-content {
    padding: 0 5px;
  }

  .carousel-section {
    padding: 15px 0 8px;
  }

  .swiper-slide {
    width: 260px;
    height: 360px;
  }
}