/* Custom CSS for additional effects */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Orbitron:wght@400;500;600;700;800;900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800;900&family=Nunito:wght@400;500;600;700;800;900&display=swap");

/* Custom Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(-50%) rotate(0deg);
  }
  50% {
    transform: translateY(-60%) rotate(1deg);
  }
}

@keyframes glow {
  0%,
  100% {
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
  }
  50% {
    text-shadow: 0 0 25px rgba(0, 245, 255, 0.5);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulseNeon {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.6), 0 0 40px rgba(191, 0, 255, 0.3);
  }
}

/* Particle System */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particles::before,
.particles::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: #00f5ff;
  border-radius: 50%;
  animation: particleFloat 8s linear infinite;
}

.particles::before {
  left: 20%;
  animation-delay: 0s;
}

.particles::after {
  left: 80%;
  animation-delay: 4s;
  background: #bf00ff;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}

/* Navigation Effects */
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00f5ff, #bf00ff);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Button Effects */
.btn-glass {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.05);
}

.btn-neon {
  position: relative;
  overflow: hidden;
}

.btn-neon::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-neon:hover::before {
  left: 100%;
}

/* Mobile Menu */
.hamburger {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.line {
  width: 25px;
  height: 3px;
  background: #00f5ff;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger.active .line:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .line:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Character positioning for mobile */
@media (max-width: 768px) {
  .character-left,
  .character-right {
    display: none;
  }

  .floating-icons {
    display: none;
  }
}

/* Tablet and below desktop */
@media (max-width: 1024px) {
  .character-left {
    left: -5%;
    top: 300px; /* 👈 Thêm dòng này để đẩy xuống */
  }

  .character-right {
    right: -5%;
    top: 300px; /* 👈 Thêm dòng này để đẩy xuống */
  }

  .character-left img,
  .character-right img {
    width: 200px;
    height: 200px;
  }
}

/* Desktop - thêm nếu cần */
@media (min-width: 1025px) {
  .character-left {
    top: 200px; /* 👈 Đẩy xuống */
  }

  .character-right {
    top: 200px; /* 👈 Đẩy xuống */
  }
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00f5ff, #bf00ff);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #bf00ff, #ff0080);
}

/* Loading animation */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0f;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 245, 255, 0.3);
  border-top: 3px solid #00f5ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Enhanced background effects */
.hero-bg-enhanced::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(0, 245, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(191, 0, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(57, 255, 20, 0.1) 0%, transparent 50%);
  animation: backgroundPulse 8s ease-in-out infinite;
}

@keyframes backgroundPulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

* {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced card animations */
.nft-card {
  animation: slideUpSmooth 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

.nft-card.animated {
  opacity: 1;
  transform: translateY(0);
}

@keyframes slideUpSmooth {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Button hover effects */
.nft-card button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nft-card button:hover {
  transform: scale(1.05) translateY(-2px);
}

/* Tooltip styles */
.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}

/* Fix hero text animation */
.hero-title {
  animation: heroFadeIn 1.5s ease-out forwards;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typing effect cursor */
#heroTitle::after {
  content: "|";
  color: #00f5ff;
  animation: blink 1s infinite;
  font-weight: 100;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* Remove cursor after typing is complete */
#heroTitle.typing-complete::after {
  display: none;
}

/* Enhanced gradient stats */
.stats-gradient {
  background: linear-gradient(45deg, #00f5ff, #bf00ff, #ff0080, #39ff14);
  background-size: 300% 300%;
  animation: gradientShift 3s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
/* Carousel Styles */
.carousel-container {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.carousel-dot.active {
  background-color: #00f5ff !important;
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

@media (max-width: 768px) {
  .carousel-slide .px-12 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .carousel-slide h3 {
    font-size: 2rem;
  }

  .carousel-slide p {
    font-size: 1rem;
  }
}

/* Article Section Styles */
.prose p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.prose .grid > div > div:hover {
  transform: translateX(5px);
  transition: transform 0.3s ease;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .character-left,
  .character-right {
    display: none !important;
  }

  .floating-icons {
    display: none !important;
  }

  /* Hero section mobile fixes */
  #home {
    padding-top: 80px;
    min-height: calc(100vh - 80px);
  }

  /* Carousel mobile fixes */
  .carousel-container {
    border-radius: 1rem;
  }

  /* Article section mobile fixes */
  .prose p {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
  }

  /* Button mobile fixes */
  .btn-hero-primary,
  .btn-hero-secondary {
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
  }

  /* Stats mobile fixes */
  .stats-gradient {
    font-size: 1.25rem;
  }

  /* Navigation mobile fixes */
  .mobile-menu {
    display: none !important;
  }

  .hamburger {
    display: none !important;
  }

  /* Header mobile fixes */
  header nav {
    padding: 0.75rem 1rem;
  }

  /* Floating buttons mobile position */
  .fixed.bottom-6.right-6 {
    bottom: 1rem;
    right: 1rem;
  }

  .fixed.bottom-6.right-6 button {
    width: 3rem;
    height: 3rem;
  }

  .fixed.bottom-6.right-6 i {
    font-size: 1rem;
  }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
  .character-left,
  .character-right {
    display: none;
  }

  #home {
    padding-top: 100px;
  }
}


/* Mobile header optimizations */
@media (max-width: 768px) {
  /* Header mobile fixes */
  header nav {
    padding: 0.75rem 1rem;
  }

  /* Auth buttons mobile */
  .auth-buttons button {
    min-width: 44px;
    height: 36px;
  }

  .carousel-container {
    margin: 0;
    border-radius: 1rem;
  }

  /* Better button spacing */
  .flex.items-center.space-x-2 button {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .flex.items-center.space-x-2 button i {
    font-size: 0.875rem;
  }
}

/* Better button styles */
.auth-buttons button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-buttons button:hover {
  transform: translateY(-1px);
}

/* Carousel video optimization */
.carousel-slide-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Mobile touch improvements */
@media (max-width: 768px) {
  .carousel-container {
    touch-action: pan-x;
  }

  .carousel-prev,
  .carousel-next {
    touch-action: manipulation;
  }

  /* Better mobile video display */
  .carousel-slide-video {
    overflow: hidden;
  }

  .carousel-slide-video video,
  .carousel-slide-video img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    background-color: #000;
  }
}

/* Banner video fixes - MOBILE FIRST */
.carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-slide-video {
  position: relative;
  width: 100%;
}

.carousel-slide-video video {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  max-width: 100%;
}

/* Mobile banner - FIX HOÀN TOÀN */
@media (max-width: 640px) {
  .carousel-wrapper {
    height: 200px !important;
    overflow: hidden;
  }

  .carousel-slide-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .carousel-slide-video video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* ✅ Sửa tại đây */
    object-position: center;
    background-color: #000;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .carousel-wrapper {
    height: 250px !important;
    overflow: hidden;
  }

  .carousel-slide-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .carousel-slide-video video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* ✅ Sửa tại đây */
    object-position: center;
    background-color: #000;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .carousel-wrapper {
    height: 320px !important;
  }

  .carousel-slide-video video {
    max-height: 320px;
    object-fit: contain;
  }
}

@media (min-width: 1025px) {
  .carousel-wrapper {
    height: 450px !important;
  }

  .carousel-slide-video video {
    max-height: 450px;
    object-fit: contain;
  }
}

/* Read more animation - FIX PC */
#moreContent {
  transition: all 0.5s ease-in-out;
  overflow: hidden;
}

/* PC specific fixes */
@media (min-width: 1025px) {
  #moreContent {
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
  }

  #moreContent.show {
    max-height: 1000px !important;
    opacity: 1;
    transform: translateY(0);
  }

  .prose .grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
}

/* Mobile read more */
@media (max-width: 1024px) {
  #moreContent {
    max-height: 0;
    opacity: 0;
  }

  #moreContent.show {
    max-height: 2000px !important;
    opacity: 1;
  }
}

/* Smooth transitions for article content */
.prose {
  transition: all 0.3s ease;
}

/* Better mobile video display */
@media (max-width: 768px) {
  .carousel-container {
    border-radius: 1rem;
    margin: 0;
  }
}
