/* Optimized CSS with better performance and responsiveness */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;600;700;800&display=swap");

/* CSS Variables for better maintainability */
:root {
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-bg-hover: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  --glass-blur: blur(20px);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
  --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-display {
  font-family: "Poppins", sans-serif;
}

/* Enhanced loading states */
.loading {
  visibility: hidden;
}

.loaded {
  visibility: visible;
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Optimized Glassmorphism Base Styles */
.glass-card {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition: all var(--transition-normal);
}

.glass-card-main {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-normal);
  will-change: transform;
}

.glass-card-main:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Enhanced Navigation */
.glass-nav {
  transition: all var(--transition-normal);
  will-change: background-color, backdrop-filter;
}

.glass-nav.scrolled {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 12px;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Enhanced Buttons with better mobile support */
.glass-button {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: white;
  padding: 12px 16px;
  transition: all var(--transition-fast);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.glass-button:hover,
.glass-button:focus {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  outline: none;
}

/* Added music button specific styling with enhanced visual feedback */
.music-btn {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.25) !important;
  border: 2px solid rgba(255, 255, 255, 0.4) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.music-btn:hover {
  background: rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}

.music-btn:active {
  transform: translateY(-1px) scale(1.02);
  transition-duration: 0.1s;
}

.music-btn i {
  transition: all 0.3s ease;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.music-btn:hover i {
  transform: scale(1.15);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Music button animation for playing state */
@keyframes music-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
  }
  25% {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1);
  }
  75% {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
  }
}

.music-btn.playing {
  animation: music-pulse 2.5s infinite ease-in-out;
  background: rgba(255, 255, 255, 0.35) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
}

.music-btn.playing i {
  color: #fbbf24 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

/* Added ripple effect styles for better user feedback */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

@keyframes ripple-animation {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* Enhanced text shadows for better readability */
.text-shadow-lg {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.drop-shadow-lg {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.drop-shadow-md {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Performance optimizations for better loading */
.shape {
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
  transform-style: preserve-3d;
}

/* Improved glassmorphism effects with better browser support */
.glass-card,
.glass-card-main {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Enhanced focus styles for better accessibility */
.glass-button:focus,
.glass-button-primary:focus,
.glass-button-secondary:focus,
.nav-link:focus,
.music-btn:focus {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);
}

/* Enhanced hover states for touch devices */
@media (hover: none) and (pointer: coarse) {
  .glass-card-main:hover,
  .glass-feature-card:hover,
  .glass-highlight-card:hover {
    transform: none;
  }

  .music-btn:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.35) !important;
  }
}

/* Better mobile responsiveness for music button */
@media (max-width: 768px) {
  .music-btn {
    padding: 16px;
    min-width: 52px;
    min-height: 52px;
    border-width: 2px;
  }

  .music-btn i {
    font-size: 1.2rem;
  }

  .music-btn:hover {
    transform: translateY(-2px) scale(1.05);
  }
}

@media (max-width: 480px) {
  .music-btn {
    padding: 14px;
    min-width: 48px;
    min-height: 48px;
  }

  .music-btn i {
    font-size: 1.1rem;
  }
}

/* Optimized Glassmorphism Base Styles */

/* Enhanced Icons */
.glass-icon {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.glass-icon-large {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.glass-icon:hover,
.glass-icon-large:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

/* Enhanced Special Cards */
.glass-badge {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 12px 24px;
  color: white;
  font-weight: 600;
}

.glass-info-card {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  transition: all var(--transition-normal);
}

.glass-highlight-card {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  padding: 32px;
  text-align: center;
  transition: all var(--transition-normal);
  will-change: transform;
}

.glass-highlight-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.glass-feature-card {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  transition: all var(--transition-normal);
  will-change: transform;
}

.glass-feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.glass-event-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 20px;
  transition: all var(--transition-normal);
}

.glass-event-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(10px);
}

.glass-final-event {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
}

/* Added styles for event highlights mini cards */
.glass-highlight-mini {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: all var(--transition-normal);
  will-change: transform;
}

.glass-highlight-mini:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.glass-contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  transition: all var(--transition-normal);
}

.glass-contact-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.glass-link-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 24px;
  transition: all var(--transition-normal);
}

.glass-link-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.glass-social-link {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all var(--transition-normal);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.glass-social-link:hover,
.glass-social-link:focus {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-5px) scale(1.1);
  outline: none;
}

.glass-image-frame {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  padding: 16px;
  transition: all var(--transition-normal);
  will-change: transform;
}

.glass-image-frame:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* Enhanced Background Pattern */
.bg-pattern {
  background-image: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  background-size: 100px 100px;
  animation: patternMove 20s ease-in-out infinite;
}

@keyframes patternMove {
  0%,
  100% {
    background-position: 0% 0%, 100% 100%;
  }
  50% {
    background-position: 100% 100%, 0% 0%;
  }
}

/* Enhanced Floating Background Shapes */
.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.shape {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 20s infinite linear;
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
  transform-style: preserve-3d;
}

.shape-1 {
  width: 100px;
  height: 100px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 10%;
  animation-delay: -5s;
}

.shape-3 {
  width: 80px;
  height: 80px;
  top: 80%;
  left: 20%;
  animation-delay: -10s;
}

.shape-4 {
  width: 120px;
  height: 120px;
  top: 40%;
  right: 30%;
  animation-delay: -15s;
}

.shape-5 {
  width: 90px;
  height: 90px;
  top: 10%;
  right: 50%;
  animation-delay: -7s;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.3;
  }
  100% {
    transform: translateY(0px) rotate(360deg);
    opacity: 0.7;
  }
}

/* Enhanced Text Effects */
.hero-title {
  color: white;
  text-shadow: var(--text-shadow);
  font-weight: 800;
  line-height: 1.1;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: var(--text-shadow);
  font-weight: 600;
}

.section-title {
  color: white;
  text-shadow: var(--text-shadow);
  font-weight: 700;
}

.event-title {
  color: white;
  text-shadow: var(--text-shadow);
  font-weight: 600;
}

.event-description {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Enhanced Animations */
.animate-fade-in-up {
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Countdown Display */
.countdown-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.countdown-item {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  min-width: 80px;
  transition: all var(--transition-normal);
}

.countdown-item:hover {
  transform: scale(1.05);
}

/* Back to top button */
#back-to-top {
  transition: all var(--transition-normal);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Enhanced Responsive Design */
@media (max-width: 1024px) {
  .glass-card-main {
    margin: 12px;
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .glass-card-main {
    margin: 16px;
    padding: 24px;
  }

  .glass-button-primary,
  .glass-button-secondary {
    width: 100%;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
    padding: 12px 24px;
  }

  .glass-contact-item {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .glass-icon,
  .glass-icon-large {
    margin: 0 auto;
  }

  .shape {
    display: none;
  }

  .countdown-display {
    gap: 0.5rem;
  }

  .countdown-item {
    min-width: 70px;
    padding: 0.75rem;
  }

  /* Enhanced mobile styles for better event display */
  .glass-event-card {
    padding: 16px;
    margin-bottom: 12px;
  }

  .glass-event-card:hover {
    transform: translateX(5px);
  }

  .glass-final-event {
    padding: 24px;
    border-radius: 16px;
  }

  .glass-highlight-mini {
    padding: 16px;
  }

  .glass-highlight-mini:hover {
    transform: translateY(-3px);
  }

  /* Enhanced mobile music button styling */
  .music-btn {
    padding: 14px;
    min-width: 48px;
    min-height: 48px;
  }

  .music-btn i {
    font-size: 1.1rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Enhanced mobile styles for better event display */
  .glass-event-card {
    padding: 14px;
    border-radius: 12px;
  }

  .glass-final-event {
    padding: 20px;
    border-radius: 16px;
  }

  .glass-highlight-mini {
    padding: 14px;
    border-radius: 12px;
  }
}

/* Added performance optimizations for animations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .floating-shapes,
  .music-btn.playing {
    animation: none !important;
  }

  .shape {
    display: none;
  }
}

/* Added focus styles for better accessibility */
.glass-event-card:focus-within,
.glass-highlight-mini:focus-within {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

/* Added audio element styling (hidden but accessible) */
#background-music {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Skip to content link styling for accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Video Section Styles */
.video-gallery-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.video-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

.video-gallery-item {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.video-gallery-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
}

.video-thumbnail-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  background-size: 200% 200%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% -200%;
  }
  100% {
    background-position: 200% 200%;
  }
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-gallery-item:hover .video-overlay {
  opacity: 1;
}

.video-play-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 85px;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 30px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.video-play-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.95));
  transform: scale(1.15);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
}

.video-play-btn i {
  margin-left: 4px; /* Optical alignment for play icon */
}

.video-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 20px 16px 16px;
  color: white;
}

.video-modal-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stronger active state for modal */
.video-modal.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Enhanced modal content styling */
.video-modal-content {
  position: relative;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 85vh;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.8) translateY(50px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.video-modal.active .video-modal-content {
  animation: modalFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-modal video {
  width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  background: #000;
}

/* Modern close button with better positioning and effects */
.video-modal-close {
  position: absolute;
  top: -15px;
  right: -15px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.video-modal-close:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.95));
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Better focus states for accessibility */
.video-gallery-item:focus-within {
  outline: 3px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

/* Touch device optimizations for gallery */
@media (hover: none) and (pointer: coarse) {
  .video-gallery-item:hover {
    transform: none;
  }

  .video-gallery-item:hover .video-thumbnail {
    transform: none;
  }

  .video-play-btn:hover {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.4);
  }

  .video-gallery-item:active {
    transform: scale(0.98);
  }
}

@keyframes modalFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(50px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 768px) {
  .video-modal-content {
    max-width: 95vw;
    max-height: 80vh;
    padding: 15px;
    border-radius: 15px;
  }

  .video-modal-close {
    top: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .video-modal video {
    border-radius: 12px;
  }

  .video-play-btn {
    width: 75px;
    height: 75px;
    font-size: 26px;
  }
}
