.vignettes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
  max-width: 1200px;
  margin: auto;
}

/* Make vignette content use flexbox to push buttons to bottom */
.tool-vignette {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.vignette-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 20px;
  /* Adjust padding as needed */
  box-sizing: border-box;
}

.vignette-content > div {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.vignette-action-buttons {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 15px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 25px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: fit-content;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Button types */
.btn-youtube {
  background-color: #ff0000;
  /* Official YouTube red */
  color: white;
}

.btn-spotify {
  background-color: #1db954;
  /* Official Spotify green */
  color: white;
}

.btn-website {
  background-color: #4285f4;
  /* Google blue for general web */
  color: white;
}

.btn-pdf {
  background-color: #dc143c;
  /* Adobe red */
  color: white;
}

.btn-word {
  background-color: #2b579a;
  /* Microsoft Word blue */
  color: white;
}

/* Remove the old arrow */
.vignette-arrow {
  display: none;
}
.tool-vignette {
  position: relative;
  height: auto;
  min-height: 350px;
  background: linear-gradient(
    135deg,
    rgba(15, 24, 40, 0.8) 0%,
    rgba(26, 35, 50, 0.8) 100%
  );
  border-radius: 25px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-vignette:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Frosted glass overlay */
.tool-vignette::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: inherit;
  transition: background 0.3s ease;
  z-index: 1;
}

.tool-vignette:hover::before {
  background: rgba(255, 255, 255, 0.12);
}

/* Inner glow effect */
.tool-vignette::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  bottom: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(11, 241, 115, 0.1) 100%
  );
  border-radius: calc(25px - 1px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.tool-vignette:hover::after {
  opacity: 1;
}

.vignette-content {
  position: relative;
  z-index: 2;
  padding: 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.vignette-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #0bf173, #00d4aa);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(11, 241, 115, 0.3);
}

.vignette-title {
  font-family: "Noto Serif", serif;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.vignette-description {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.vignette-arrow {
  position: absolute;
  bottom: 20px;
  right: 25px;
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
}

.tool-vignette:hover .vignette-arrow {
  background: rgba(11, 241, 115, 0.8);
  transform: scale(1.1);
}

.vignette-arrow::after {
  content: "→";
  color: white;
  font-size: 18px;
  font-weight: bold;
}

/* Different colored accents for variety */
.tool-vignette.accent-blue .vignette-icon {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  box-shadow: 0 8px 20px rgba(79, 172, 254, 0.3);
}

.tool-vignette.accent-purple .vignette-icon {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3);
}

.tool-vignette.accent-orange .vignette-icon {
  background: linear-gradient(135deg, #ff7849, #ffb347);
  box-shadow: 0 8px 20px rgba(255, 120, 73, 0.3);
}

.tool-vignette.accent-blue:hover .vignette-arrow {
  background: rgba(79, 172, 254, 0.8);
}

.tool-vignette.accent-purple:hover .vignette-arrow {
  background: rgba(168, 85, 247, 0.8);
}

.tool-vignette.accent-orange:hover .vignette-arrow {
  background: rgba(255, 120, 73, 0.8);
}

/* Sorting Controls */
.sorting-container {
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
}

.sort-controls {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 25px 35px;
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  transition: all 0.3s ease;
}

.sort-controls:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.sort-group,
.filter-group,
.search-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sort-label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sort-select {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px 15px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.sort-select:hover,
.sort-select:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(11, 241, 115, 0.5);
}

.sort-select option {
  background: #1a2332;
  color: white;
  padding: 5px;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px 16px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateY(-1px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #0bf173, #00d4aa);
  border-color: rgba(11, 241, 115, 0.5);
  color: white;
  box-shadow: 0 4px 15px rgba(11, 241, 115, 0.3);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px 15px 8px 40px;
  color: white;
  font-size: 14px;
  width: 200px;
  transition: all 0.3s ease;
  outline: none;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-input:hover,
.search-input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(11, 241, 115, 0.5);
  width: 220px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

/* Animation for filtered items */
.vignette-hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: all 0.4s ease;
}

.vignette-show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  transition: all 0.4s ease;
}

/* No results message */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

/* Responsive design */
@media (max-width: 1024px) {
  .sort-controls {
    flex-direction: column;
    gap: 20px;
    padding: 20px 25px;
  }

  .sort-group,
  .filter-group,
  .search-group {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .sorting-container {
    margin: 0 -20px 30px -20px;
    padding: 0 20px;
  }

  .sort-controls {
    padding: 20px;
    gap: 15px;
  }

  .filter-buttons {
    justify-content: center;
  }

  .search-input {
    width: 180px;
  }

  .search-input:focus {
    width: 200px;
  }

  .vignettes-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tool-vignette {
    height: 240px;
  }

  .vignette-content {
    padding: 25px;
  }

  .vignette-title {
    font-size: 20px;
  }

  .vignette-description {
    font-size: 14px;
  }
  .vignette-content > div {
    display: block;
  }
}

.vignette-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 15px;
}

.keyword-tag {
  background: rgba(11, 241, 115, 0.2);
  border: 1px solid rgba(11, 241, 115, 0.3);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 11px;
  color: rgba(11, 241, 115, 0.9);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.keyword-tag.lesson-math {
  background: rgba(79, 172, 254, 0.2);
  border-color: rgba(79, 172, 254, 0.3);
  color: rgba(79, 172, 254, 0.9);
}

.keyword-tag.lesson-science {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.3);
  color: rgba(168, 85, 247, 0.9);
}

.keyword-tag.lesson-language {
  background: rgba(255, 120, 73, 0.2);
  border-color: rgba(255, 120, 73, 0.3);
  color: rgba(255, 120, 73, 0.9);
}

.keyword-tag.category-tag {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}
