/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* BODY */
body {
  background: linear-gradient(135deg, #0f172a, #020617);
  color: white;
}

/* HEADER FIXED */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(12px);
  padding: 10px 15px;
}

/* HEADER TOP */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LOGO */
.logo-box {
  position: absolute;
  top: 10px;
  right: 15px;

  display: flex;
  align-items: center;
  gap: 8px;
}

.logo {
  height: 40px;
}

.logo-box h1 {
  font-size: 22px;
  background: linear-gradient(90deg,#3b82f6,#9333ea,#ff4d4d);
  -webkit-background-clip: text;
  color: transparent;
}

/* TOP BAR (SEARCH ROW) */
.top-bar {
  display: flex;
  gap: 10px;
  margin-top: 10px;

  justify-content: center; 
}

.top-bar input {
  flex: none;          
  width: 400px;        
  max-width: 90%;      

  padding: 20px;
  border-radius: 12px;
  border: none;
  background: rgba(255,255,255,0.05);
  color: white;
}

.top-bar select {
  padding: 12px 35px 12px 12px; /* 👈 right space arrow ke liye */
  border-radius: 12px;
  border: none;
  background: rgba(255,255,255,0.05);
  color: rgb(186, 102, 228);

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  cursor: pointer;

  /* CUSTOM ARROW */
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* CATEGORY */
  .categories {
  display: flex;
  gap: 10px;
  overflow-x: auto;

  justify-content: center; 
  align-items: center; 
  padding: 8px 0;
}

.categories button {
  padding: 7px 14px;
  border-radius: 20px;
  border: none;
  background: #1e293b;
  color: white;
  cursor: pointer;
  flex: none;
}

.categories button.active,
.categories button:hover {
  background: #3b82f6;
}

/* GRID */
.grid {
  margin-top: 140px; /* header ke niche */
  display: grid;
  gap: 12px;
  padding: 10px;
}

/* MOBILE WALLPAPERS (DEFAULT) */
.grid {
  grid-template-columns: repeat(8, 1fr);
}

/* LAPTOP WALLPAPERS */
.pc-mode .grid {
  grid-template-columns: repeat(4, 1fr);
}

/* IMAGE */
.grid img {
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
}

/* POPUP */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 4000;

}

#popupImg {
  max-width: 80vw;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  z-index: 1;
}

/* CLOSE */
.closeBtn {
  position: fixed;      /* 👈 important */
  top: 20px;
  right: 20px;

  z-index: 99999;       /* 👈 sabse upar */
  font-size: 24px;
  cursor: pointer;

  background: rgba(0,0,0,0.6);
  padding: 6px 10px;
  border-radius: 6px;
}

/* DOWNLOAD */
#downloadBtn {
  margin-top: 15px;
  padding: 12px 25px;
  border-radius: 10px;
  border: none;
  background: #3b82f6;
  color: white;
}

/* LOAD MORE */
#loadMoreBtn {
  margin: 20px auto;
  display: block;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  background: #3b82f6;
  color: white;
}

/* HEART (GRID) */
.heart {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 18px;
}

/* POPUP HEART */
.popup-img-box {
  position: relative;
}

#popupHeart {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* MENU */
#menuBtn {
  position: fixed;
  top: 15px;
  left: 10px;

  z-index: 99999;   
  cursor: pointer;
  font-size: 26px;
  background: rgba(0,0,0,0.6); /* optional but helpful */
  padding: 10px 14px;
  border-radius: 8px;
}

/* SIDE PANEL */
#sidePanel {
  position: fixed;
  top: 0;
  left: -250px; /* initially hidden */
  width: 220px;
  height: 100%;
  background: #020617;

  padding: 90px 20px 20px;  
  transition: 0.3s;

  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 5000;
}
 
#sidePanel.active {
  left: 0;
}

#sidePanel a {
  color: #cbd5e1;
  text-decoration: none;

  padding: 10px 12px;
  border-radius: 8px;

  font-size: 15px;
  transition: 0.3s;
  z-index: 5000;
}

#sidePanel a:hover {
  background: rgba(59,130,246,0.2);
  color: #3b82f6;
  transform: translateX(5px);
}

/* MOBILE FIX */
@media (max-width: 768px) {

  .top-bar {
    flex-direction: column;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

.social {
  margin-top: auto;  /* 👈 ye magic hai */
}

.social a {
  color: #e1306c; /* instagram vibe */
  font-weight: 500;
}

/* ===== INNER PAGES UI ===== */

.page-container {
  max-width: 800px;
  margin: 30px auto 40px;  /* 👈 header ke niche */
  padding: 30px;

  background: rgba(255,255,255,0.03);
  border-radius: 12px;

  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.page-container h1 {
  font-size: 28px;
  margin-bottom: 15px;
  
  text-align: center;
  background: linear-gradient(90deg,#3b82f6,#9333ea,#ff4d4d);
  -webkit-background-clip: text;
  color: transparent;
}

.page-container p {
  font-size: 16px;       /* 👈 readable size */
  color: #cbd5e1;

  line-height: 1.8;      /* 👈 space between lines */
  margin-bottom: 16px;   /* 👈 gap between paragraphs */

}

.page-container a {
  color: #3b82f6;
}

/* PAGE TOP LOGO */
.page-logo {
  text-align: center;
  margin-top: 10px;   /* 👈 thoda upar */
  margin-bottom: 10px; /* 👈 neeche gap control */
}

.page-logo img {
  width: 90px;
  margin-bottom: 5px;
}

.page-logo h2 {
  font-size: 20px;
  background: linear-gradient(90deg,#3b82f6,#9333ea,#ff4d4d);
  -webkit-background-clip: text;
  color: transparent;
}

/* ===== CONTACT FORM ===== */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border-radius: 10px;
  border: none;

  background: rgba(255,255,255,0.05);
  color: white;

  outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #94a3b8;
}

.contact-form button {
  padding: 12px;
  border-radius: 10px;
  border: none;

  background: linear-gradient(90deg,#3b82f6,#9333ea,#ff4d4d);
  color: white;

  font-weight: 500;
  cursor: pointer;
  transition: 0.3s;
}

.contact-form button:hover {
  opacity: 0.85;
}

/* CONTACT INFO BOX */
.contact-info {
  background: rgba(255,255,255,0.04);
  padding: 12px 15px;
  border-radius: 10px;

  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.6;

  margin-bottom: 15px;
}

/* ===== PREMIUM MOBILE UI (FINAL) ===== */
@media (max-width: 768px) {

  body {
    overflow-x: hidden;
  }

  /* HEADER CLEAN */
  .header {
    padding: 5px;
  }

  /* LOGO ONLY (RIGHT SIDE) */
  .logo-box {
    position: absolute;
    top: 10px;
    right: 12px;
    gap: 0;
  }

  .logo-box h1 {
    display: none; /* WallHub text hata diya */
  }

  .logo {
    height: 28px;
  }

  /* MENU (3 LINE SMALL) */
  #menuBtn {
    font-size: 12px;
    padding: 5px 7px;
    top: 10px;
    left: 10px;
  }

  /* CLOSE BTN */
  .closeBtn {
    font-size: 18px;
    padding: 5px 7px;
  }

  /* TOP BAR = 1 LINE LAYOUT */
  .top-bar {
    display: flex;
    flex-direction: row;
    gap: 6px;
    margin-top: 35px;
    padding: 0 5px;
  }

  /* NEW/OLD */
  #sortSelect {
    flex: 1;
    font-size: 12px;
    padding: 8px;
  }

  /* SEARCH */
  .top-bar input {
    flex: 2;
    font-size: 12px;
    padding: 8px;
  }

  /* DEVICE SELECT */
  #deviceSelect {
    flex: 1;
    font-size: 12px;
    padding: 8px;
  }

  /* CATEGORY → 2 LINE GRID */
  .categories {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    padding: 6px;
  }

  .categories button {
    font-size: 6px;
    padding: 5px;
    border-radius: 8px;
  }

  /* GRID */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 1px;
    padding: 20px;
  }

  .grid img {
    height: 150px;
    border-radius: 10px;
  }

  /* HEART */
  .heart {
    font-size: 14px;
  }

  /* POPUP IMAGE */
  #popupImg {
    max-width: 95vw;
    max-height: 60vh;
  }

}

/* ===== FINAL MOBILE WALLPAPER UI FIX ===== */
@media (max-width: 768px) {

  /* 📱 Mobile wallpapers (tall look) */
  body:not(.pc-mode) .grid img {
    height: 240px;   /* 👈 lamba look */
    object-fit: cover;
  }

  /* 📱 Mobile grid (2 per row) */
  body:not(.pc-mode) .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 💻 Laptop wallpapers (full width) */
  .pc-mode .grid {
    grid-template-columns: 1fr !important;  /* 👈 1 per row */
  }

  .pc-mode .grid img {
    height: 180px;  /* 👈 wide look */
    object-fit: cover;
  }

}

 /* FINAL FIX - DESKTOP MOBILE WALLPAPERS */
 body:not(.pc-mode) .grid img {
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.fav-box {
  position: relative;
}

.remove-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  cursor: pointer;
  font-size: 18px;
}

/* ===== FAVORITES FINAL CLEAN ===== */

/* base */
#favorites {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* laptop */
  gap: 15px;
  padding: 20px;
}

#favorites img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
}
.heart {
  display: none;
}
