/* ===================================================
   PAGINA CERCA
   =================================================== */

.search-page {
  padding: 8px 32px 40px;
}

.search-page h1 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  margin-bottom: 20px;
}

.search-input-container {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  padding: 10px 16px;
  margin-bottom: 28px;
  border-radius: 500px;
  background-color: #242424;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.search-input-container:focus-within {
  background-color: #2c2c2c;
  border-color: #4a4a4a;
}

.search-input-container .bi-search {
  color: var(--spotify-light-gray);
  font-size: 18px;
  flex: 0 0 auto;
}

.search-input-container input {
  flex: 1 1 auto;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: #fff;
  font-size: 15px;
}

.search-input-container input::placeholder {
  color: #9a9a9a;
}

.search-section-title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
}

.search-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.category-card {
  position: relative;
  overflow: hidden;
  height: 100px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  text-align: left;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.category-card:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.category-card span {
  position: relative;
  z-index: 1;
  max-width: 70%;
  line-height: 1.15;
}

.category-card img {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 60px;
  object-fit: cover;
  transform: rotate(25deg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.podcast { background-color: #ff4500; }
.create { background-color: #1e3a8a; }
.nuove-uscite { background-color: #e91e63; }
.pop { background-color: #4caf50; }
.hip-hop { background-color: #d2691e; }
.dance { background-color: #ff7f50; }
.latina { background-color: #e91e63; }
.classifiche { background-color: #8e44ad; }

.search-results-title {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}

#search-results {
  margin-bottom: 32px;
}

#search-results .empty-state {
  padding: 40px 12px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.04);
}

#search-results .empty-state i {
  font-size: 2.4rem;
}

/* ---------------------------------------------------
   RESPONSIVE
   --------------------------------------------------- */

@media (min-width: 992px) {
  .search-categories {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .category-card {
    height: 130px;
    padding: 16px;
    font-size: 20px;
  }

  .category-card img {
    width: 90px;
    height: 90px;
  }
}

@media (max-width: 992px) {
  .search-page {
    padding: 4px 14px 24px;
  }

  .search-page h1 {
    margin-bottom: 14px;
  }

  .search-input-container {
    margin-bottom: 20px;
  }

  .search-categories {
    gap: 12px;
  }

  .category-card {
    height: 100px;
    font-size: 18px;
    padding: 12px;
  }

  .category-card img {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 400px) {
  .search-categories {
    grid-template-columns: 1fr 1fr;
  }
}
