/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1; 
} 
*/


body {
  font-family: Arial, sans-serif;
  background: #181818;
  color: white;
}

/* Header */
header {
  background: #0f0f0f;
  padding: 8px 16px;
}

nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 20px;
}

.logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.search-bar {
  flex: 1;
  display: flex;
  max-width: 600px;
  background: #121212;
  border: 1px solid #303030;
  border-radius: 50px;
  overflow: hidden;
}

.search-bar input {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 16px;
}

.search-btn {
  background: #222;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  color: white;
  font-size: 18px;
}

.mic-btn {
  margin-left: 8px;
  background: #222;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
}

.nav-right {
  margin-left: auto;
}

.create-btn {
  background: #222;
  border: none;
  border-radius: 50px;
  padding: 8px 16px;
  color: white;
  font-size: 14px;
  cursor: pointer;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  overflow-x: auto;/*If the filter items are too wide for the screen, this allows horizontal scrolling.*/
  white-space: nowrap;/*Keeps everything in a single horizontal row.*/
  scrollbar-width: none;/*hides the scrollbar for firefox and safari*/
}

.filter-bar::-webkit-scrollbar {
  display: none;/*hides the scrollbar for google chrome*/
}

.filter {
  background: #222;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;/*It tells the browser: Do not let this flex item shrink, even if there isn’t enough space*/
  transition: transform 0.2s ease;
}

.filter:hover{
    background-color:rgb(98, 98, 98);
    color: white;
}

.filter.active {
  background: #fff;
  color: #000;
  font-weight: bold;
}

/* Grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding: 20px;
}
/* No results page */
#no-results {
  grid-column: 1 / -1; /* spans full grid width */
  text-align: center;
  color:#aaa;
  padding: 40px 0;
}

/* Card */
.card {
  display: flex;
  flex-direction: column;
}

.card-link {
  text-decoration: none;
  color: inherit;
}

.thumb {
  width: 100%;
  aspect-ratio: 16 / 9; /* ensures all thumbnails same size */
  border-radius: 12px;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* crop to uniform size */
  transition: transform 0.3s ease;
}

.thumb img:hover {
  transform: scale(1.05);
}

.card-title {
  margin-top: 8px;
  font-size: 16px;
  font-weight: bold;
}

.card-auth {
  font-size: 13px;
  color: #aaa;
}

/* Footer */
footer {
  background: #111;
  color: white;
  text-align: center;
  padding: 16px;
  margin-top: 20px;
}

.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .search-bar {
    max-width: 100%;
  }
}
