/* Themes library */
.themes-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  align-items: flex-end;
}

.themes-toolbar .search-wrap {
  flex: 1 1 280px;
  max-width: 420px;
}

.themes-toolbar__sort {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.themes-toolbar__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.themes-select {
  appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--white);
  padding: 0.65rem 2rem 0.65rem 0.85rem;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a1a1aa' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.themes-tags {
  margin-bottom: var(--space-xl);
}

.theme-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .theme-grid { grid-template-columns: repeat(3, 1fr); }
}

.theme-store-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.theme-store-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.theme-store-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-900);
}

.theme-store-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.theme-store-card:hover .theme-store-card__media img {
  transform: scale(1.04);
}

.theme-store-card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
  pointer-events: none;
}

.theme-store-card:hover .theme-store-card__shine {
  transform: translateX(120%);
}

.theme-store-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg);
  flex: 1;
}

.theme-store-card__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}

.theme-store-card__title a {
  color: var(--white);
  text-decoration: none;
}

.theme-store-card__title a:hover {
  color: var(--gray-200);
}

.theme-store-card__author {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.theme-store-card__author a {
  color: #5865f2;
  text-decoration: none;
}

.theme-store-card__author a:hover {
  text-decoration: underline;
}

.theme-store-card__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--gray-400);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.theme-store-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.theme-store-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-sm);
}

.theme-store-card__download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
}

.theme-store-card__stats {
  display: flex;
  gap: var(--space-md);
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.theme-store-card__stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.themes-attribution {
  margin-top: var(--space-3xl);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.themes-attribution a {
  color: var(--gray-300);
}

.themes-empty {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.themes-empty code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--gray-300);
}
