/* 1. IMPORT FONTS */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&family=Poppins:wght@300;400;600&display=swap');

/* GLOBAL STYLES */
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 50% 0%, #1a0f16, #0b0b0b 60%);
  background-attachment: fixed;
  font-family: 'Poppins', sans-serif;
  color: #eaeaea;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* CONTAINER */
.container {
  width: 100%;
  padding: 50px 20px 10px;
  text-align: center;
  box-sizing: border-box;
}

/* TITLE */
h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 64px;
  font-weight: 900;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 4px;
  background: linear-gradient(to bottom, #ff8ec6, #ff2fa6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(255, 47, 166, 0.6));
  animation: pulseTitle 3s infinite alternate;
}

@keyframes pulseTitle {
  from { filter: drop-shadow(0 0 15px rgba(255, 47, 166, 0.6)); }
  to   { filter: drop-shadow(0 0 25px rgba(255, 47, 166, 1)); }
}

/* 🟢 NAVBAR STYLES (NEW) */
.navbar {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.nav-filter {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #eaeaea;
  padding: 10px 25px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-filter:hover {
  border-color: #ff2fa6;
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 47, 166, 0.3);
}

.nav-filter.active {
  background: #ff2fa6;
  border-color: #ff2fa6;
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 47, 166, 0.5);
  transform: scale(1.05);
}

/* GALLERY GRID */
#gallery-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  padding-bottom: 80px;
}

#feed {
  display: grid;
  gap: 40px;
  padding: 20px;
  width: 100%;
  max-width: 1400px;
  justify-content: center;
}

/* 🖥️ DESKTOP COLUMNS */
@media (min-width: 1280px) { #feed { grid-template-columns: repeat(4, 280px); } }
@media (min-width: 900px) and (max-width: 1279px) { #feed { grid-template-columns: repeat(3, 280px); } }
@media (min-width: 600px) and (max-width: 899px) { #feed { grid-template-columns: repeat(2, 1fr); gap: 20px; } }

/* 📱 MOBILE OPTIMIZATION (Max-width 599px) */
@media (max-width: 599px) { 
  .container { padding: 20px 10px 0px; }
  
  h1 { 
    font-size: 28px; 
    margin-bottom: 15px; 
  }

  /* Adjust navbar for mobile */
  .nav-filter {
    padding: 8px 18px;
    font-size: 13px;
  }

  #feed { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 16px; 
    padding: 10px; 
  }
  
  .item:hover { transform: none; }
  
  .item {
    aspect-ratio: 4 / 5 !important; 
    padding: 5px; 
    border-radius: 12px; 
  }
}

/* TILE CARD */
.item {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 10px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 3 / 4; 
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 47, 166, 0.6);
    background: rgba(255, 47, 166, 0.05);
  }
  .item:hover img, .item:hover video { transform: scale(1.05); }
}

.item img, .item video {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* CLICK OVERLAY */
.click-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 5;
}

/* PLAY BUTTON */
.play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  z-index: 4;
  pointer-events: none;
}

.play-icon::after {
  content: ''; display: block; width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}

/* LIGHTBOX */
#lightbox {
  display: none;
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.98);
  justify-content: center; align-items: center;
  z-index: 9999;
  backdrop-filter: blur(15px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#lightbox-content {
  position: relative;
  width: 100%; height: 100%;
  display: flex; justify-content: center; align-items: center;
}

#lightbox-content img, #lightbox-content video {
  max-width: 100%; max-height: 100vh;
  object-fit: contain;
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

/* CLOSE BUTTON */
#close-btn {
  position: absolute; top: 20px; right: 20px;
  font-size: 40px; color: #fff; cursor: pointer;
  z-index: 10002; opacity: 0.8; font-weight: bold;
  line-height: 1; background: rgba(0,0,0,0.5);
  width: 40px; height: 40px; border-radius: 50%;
  text-align: center; display: flex; align-items: center; justify-content: center;
}

/* NAVIGATION BUTTONS */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: white;
  padding: 20px;
  cursor: pointer;
  user-select: none;
  z-index: 10001;
  opacity: 0.7;
  transition: 0.3s;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.nav-btn:hover {
  opacity: 1;
  color: #ff2fa6;
  transform: translateY(-50%) scale(1.1);
}

#prev-btn { left: 10px; }
#next-btn { right: 10px; }

@media (max-width: 599px) {
  .nav-btn { font-size: 30px; padding: 15px; }
  #prev-btn { left: 0; }
  #next-btn { right: 0; }
}

/* Add iframe to the existing rule for img and video */
#lightbox-content img, 
#lightbox-content video,
#lightbox-content iframe { /* Added iframe here */
  max-width: 100%; 
  max-height: 100vh;
  object-fit: contain;
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

/* Specific style for the video player iframe */
#lightbox-content iframe {
  width: 80vw;   /* 80% of screen width */
  height: 80vh;  /* 80% of screen height */
  border: none;
  background: #000;
}