.themes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.theme-card {
  overflow: hidden;
  display: grid;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--theme-color, var(--accent)) 14%, transparent), transparent 42%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
}

.theme-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.theme-card-topbar {
  height: 5px;
  background: var(--theme-color, var(--theme-none));
}

.theme-card-body {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.theme-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-header-copy {
  min-width: 0;
}

.theme-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--theme-color, var(--theme-none));
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

.theme-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-count {
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.theme-count strong {
  color: var(--text);
}

.theme-actions {
  display: flex;
  gap: 8px;
}

.theme-actions .btn {
  flex: 1;
}

.theme-card-new {
  min-height: 228px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  border: 2px dashed rgba(123, 109, 255, 0.26);
  border-radius: var(--radius-md);
  color: color-mix(in srgb, var(--text) 64%, var(--accent));
  background:
    radial-gradient(circle at top right, rgba(123, 109, 255, 0.12), transparent 36%),
    radial-gradient(circle at bottom left, rgba(249, 115, 22, 0.1), transparent 34%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
}

.theme-card-new:hover {
  color: var(--accent);
  border-color: rgba(123, 109, 255, 0.46);
  box-shadow: 0 18px 34px rgba(91, 74, 226, 0.14);
}

.theme-card-new i {
  font-size: 30px;
  margin-bottom: 12px;
}

.themes-empty-state {
  gap: 14px;
  min-height: 260px;
  margin-top: 18px;
  justify-items: center;
  padding: 40px 32px;
  border-style: solid;
  border-color: rgba(123, 109, 255, 0.16);
  background:
    radial-gradient(circle at top right, rgba(123, 109, 255, 0.12), transparent 34%),
    radial-gradient(circle at bottom left, rgba(249, 115, 22, 0.1), transparent 32%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
}

.themes-empty-state .empty-state-icon {
  color: #fff;
  background: linear-gradient(135deg, #7b6dff, #ff8a5b);
  box-shadow: 0 14px 26px rgba(91, 74, 226, 0.2);
}

.themes-empty-state h3 {
  font-size: 26px;
  letter-spacing: -0.03em;
}

.themes-empty-state p {
  max-width: 620px;
  font-size: 16px;
  text-align: center;
}

.themes-empty-state .btn {
  margin-top: 8px;
}

@media (max-width: 1024px) {
  .themes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .themes-grid {
    grid-template-columns: 1fr;
  }

  .theme-actions {
    flex-direction: column;
  }

  .themes-empty-state {
    padding: 30px 20px;
  }
}
