:root {
  --primary-color: #e63946;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100vh;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  background-color: #121212;
  color: white;
  overflow: hidden;
}

nav {
  border-bottom: 1px solid #333;
  width: 99%;
  padding: 12px 0;
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #1e1e1e;
  z-index: 10;
  position: fixed;
  top: 0;
  border-radius: 10px;
  margin: 0px 4px;
}

.nav-content {
  width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: bold;
  font-size: 1.1rem;
}
.logo img{
  width: 20px;
}
.logo a{
  display: flex;
  align-items: center;
  justify-content: center;
}
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

#search-input {
  background-color: #333;
  border: 1px solid #555;
   box-shadow: inset 2px 5px 10px rgb(5, 5, 5);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  width: 150px;
}

button {
    background: #333;
    color: white;
    border: 1px solid #555;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}
button img{
  border: 1px solid rgb(134, 134, 134);
  border-radius: 4px;
  padding: 1px 5px;
}

.main-content {
  display: flex;
  justify-content: center;
  width: 100%;
  flex-grow: 1;
  min-height: 0;
}

/* --- Menu Styles --- */
.icon-btn {
    background: none;
    border: none;
    font-size: 1.5rem; /* Larger icon */
    color: white;
    cursor: pointer;
    padding: 0 10px;
}
.menu-container {
  position: relative; /* Context for the dropdown */
  display: flex;
  gap: 1rem;
}
.menu-links {
  position: absolute;
  top: 140%; /* Position below the button */
  left: 30%;
  background-color: #2c2c2c;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 20;
  width: 120px;
  /* Hidden state */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease-in-out;
}
.menu-links.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.menu-links a {
  color: white;
  text-decoration: none;
  padding: 10px;
  border-radius: 5px;
}
.menu-links a:hover {
    background-color: #444;
}



/* --- Image Scroller --- */
.filter-display {
  overflow-y: auto; /* changed */
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch; /* smoother iOS momentum */
  width: 460px;
  scrollbar-width: none;
  background-color: black;
  position: relative;
}
.filter-display::-webkit-scrollbar {
  display: none;
}

section {
  height: 100vh; /* changed from 100% */
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always; /* force snap */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- Icons & Actions --- */
.icons {
  position: absolute;
  bottom: 6%;
  right:8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
.imgs .img1{
  width: 30px;
  border-radius: 10%;
  margin-bottom:-4px;
  margin-right: -28px;
  z-index: 2;
   box-shadow: 4px 4px 10px rgba(0,0,0,0.3);
   border: 1px solid white;
}
.imgs .img2{
  width: 30px;
  border-radius: 10%;
  margin-bottom: -9.5px;
  margin-left: 0px;
  z-index: 2;
   box-shadow: 4px 4px 10px rgba(0,0,0,0.3);
   border: 1px solid white;
}
#gallery h6{
  margin-top: 10px;
  color: rgb(255, 255, 255);
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}
#share{
  color: rgb(255, 255, 255);
}
#copy{
  color: rgb(220, 220, 220);
}
#ai{
  display: flex;
  align-items: center;
  justify-content: center;
  
}
.ai-img{
  width: 20px;
  border-radius: 20%;
}
#ai a{
  text-decoration: none;
}
.ai-icons{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.ai-icons img{
  width: 40px;
}
#ai h6{
  color: white;
  margin: 1px;
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}
.icon-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.icon-wrapper i {
  font-size: 28px;
  color: white;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s ease, color 0.2s ease;
}

.icon-wrapper:hover i {
  transform: scale(1.1);
}

.icon-wrapper.liked .fa-heart {
  color: #f11325;
  font-weight: 900;
}
.icon-wrapper.liked .fa-heart::before {
  content: '\f004';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.icon-wrapper.saved .fa-bookmark {
  color: #dddddd;
}
.icon-wrapper.saved .fa-bookmark::before {
  content: '\f02e';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.like-count {
  font-size: 0.9rem;
  color: white;
  margin-top: 5px;
  text-shadow: 1px 1px 2px black;
}

/* --- Loader & Messages --- */
.loader-container,
.message-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
}
.loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- Toast Notification --- */
.toast {
  visibility: hidden;
  min-width: 150px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 5px;
  padding: 16px;
  position: fixed;
  z-index: 101;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  opacity: 0;
  transition: all 0.3s ease-in-out;
}
.toast.show {
  visibility: visible;
  opacity: 1;
  bottom: 300px;
}

/* --- NEW: Off-Canvas Styles --- */
.offcanvas-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
}
.offcanvas-overlay.open {
  opacity: 1;
  visibility: visible;
}
.offcanvas-panel {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100%);
  width: 460px;
  max-width: 100%;
  background-color: #1e1e1e;
  border-top: 1px solid #444;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 20px 20px 40px 20px;
  box-sizing: border-box;
  z-index: 100;
  transition: transform 0.3s ease-in-out;
  color: white;
}
.offcanvas-panel.open {
  transform: translate(-50%, 0);
}
.offcanvas-panel h2 {
  margin-top: 10px;
  margin-bottom: 20px;
  text-align: center;
}
.offcanvas-panel .close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #888;
  cursor: pointer;
  padding: 5px;
}
.contact-icons {
  display: flex;
  justify-content: center;
  gap: 40px;
  font-size: 2.2rem;
  margin-top: 20px;
}
.contact-icons a {
  color: white;
  transition: color 0.2s;
}
.contact-icons a:hover {
  color: var(--primary-color);
}


@keyframes bounce-up {
  0%, 20%, 50%, 80%, 100% {
    transform: translate(-50%, 0); /* Start/End position */
  }
  40% {
    transform: translate(-50%, -15px); /* Move up */
  }
}

@keyframes fade-in-out {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

#swipe-indicator i {
  /* Rotate the chevron to point up */
  transform: rotate(180deg); 
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.bounce-swipe {
  animation: bounce 1s ease infinite alternate;
}

@keyframes bounce {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-20px); }
  100% { transform: translateY(0); }
}





/* --- Filter Dropdown Styles --- */
.filters {
  position: relative; /* give positioning context */
}

.filter-dropdown {
  position: absolute;     /* absolute inside .filters */
  top: 89%;              /* exactly below filter button */
  right: 0%;  
  left: 2.1%;              /* align with filter button’s left edge */
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 20;
  min-width: 100px;       /* ensures it’s not too small */
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s ease-in-out;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  visibility: hidden;
}

.filter-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-dropdown button {
  width: 60px;           /* match filter button width */
  text-align: center;
  justify-content: center;
  background: #333;
  border: 1px solid #555;
  padding: 6px 12px;
  border-radius: 5px;
  color: white;
  cursor: pointer;
}
