body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f5f7fa;
  color: #333;
}

header {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  color: white;
  padding: 30px 20px;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 1px;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

.ad-section {
  max-width: 100%;
  margin: 20px auto;
  text-align: center;
  background: transparent;
  padding: 10px 0;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.ad-placeholder {
  background: #e9ecef;
  padding: 30px;
  border-radius: 6px;
  font-size: 14px;
  color: #666;
}

.cat-section {
  margin-bottom: 50px;
}

.cat-title {
  font-size: 20px;
  margin-bottom: 15px;
  padding-left: 10px;
  text-align: center;
}

.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.wallpaper-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.wallpaper-card:hover {
  transform: translateY(-5px);
}

.wallpaper-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.wallpaper-card img.loaded {
  opacity: 1;
}

.wallpaper-card .info {
  padding: 10px;
  text-align: center;
  font-weight: bold;
  color: #2c5364;
}

a {
  text-decoration: none;
}

footer {
  text-align: center;
  padding: 30px 20px;
  background: #111;
  color: #ccc;
  margin-top: 40px;
}

@media (max-width: 768px) {
  header h1 {
    font-size: 22px;
  }
}

.user-nav {
  display: flex;
  justify-content: center;
  /* pushes buttons to the right */
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  font-family: "Segoe UI", Arial, sans-serif;
}

.user-nav span {
  margin-right: 15px;
  font-weight: bold;
  color: #333;
}

.user-nav .btn {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, #2c5364, #203a43);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
  width: 20%;
  text-align: center;
}

.user-nav .btn:hover {
  background: linear-gradient(135deg, #203a43, #2c5364);
  transform: translateY(-2px);
}

.view-category {
  display: block;
  text-align: center;
  margin-top: 10px;
  padding: 10px;
  background: #2c5364;
  color: #fff;
  border-radius: 6px;
  font-weight: bold;
  transition: 0.2s;
}

.view-category:hover {
  background: #203a43;
}
